Spring Cloud Gateway failed to start, and gives the following exception:
service-gateway | 2020-01-02 13:44:55.910 INFO 22 --- [ main] c.n.discovery.InstanceInfoReplicator : InstanceInfoReplicator onDemand update allowed rate per min is 4
service-gateway | 2020-01-02 13:44:55.915 INFO 22 --- [ main] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1577943895914 with initial instances count: 11
service-gateway | 2020-01-02 13:44:55.916 INFO 22 --- [ main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application SERVICE-GATEWAY with eureka with status UP
service-gateway | 2020-01-02 13:44:55.917 INFO 22 --- [ main] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1577943895917, current=UP, previous=STARTING]
service-gateway | 2020-01-02 13:44:55.923 INFO 22 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-GATEWAY/a5881e80ffd5:service-gateway:1790: registering service...
service-gateway | 2020-01-02 13:44:55.991 INFO 22 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-GATEWAY/a5881e80ffd5:service-gateway:1790 - registration status: 204
service-gateway | 2020-01-02 13:44:56.051 WARN 22 --- [ main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'eurekaAutoServiceRegistration'; nested exception is reactor.core.Exceptions$ErrorCallbackNotImplemented: java.lang.IllegalArgumentException: Unable to find GatewayFilterFactory with name
service-gateway | 2020-01-02 13:44:56.083 INFO 22 --- [ main] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ...
service-gateway | 2020-01-02 13:44:59.085 INFO 22 --- [ main] com.netflix.discovery.DiscoveryClient : Unregistering ...
service-gateway | 2020-01-02 13:44:59.093 INFO 22 --- [ main] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-GATEWAY/a5881e80ffd5:service-gateway:1790 - deregister status: 200
service-gateway | 2020-01-02 13:44:59.104 INFO 22 --- [ main] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient
In spring cloud gateway code that used to create filter it says:
GatewayFilterFactory factory = this.gatewayFilterFactories.get(definition.getName());
if (factory == null) {
throw new IllegalArgumentException("Unable to find GatewayFilterFactory with name " + definition.getName());
}
so if it failed to to create the gatewayFilterFactory, the exception should gives a message:
"Unable to find GatewayFilterFactory with name <some name>
", But there is no such thing in my log, just "Unable to find GatewayFilterFactory with name ". After 2 days of research and I finally found, there is an error in my config file:
- id: api_assets
uri: lb://BACKEND
predicates:
- Path=/api/assets/**
filters:
- name: AuditFilter
-
A LIST OF FILTER NAMES WITH A BLANK ONE
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.