当前位置:网站首页>gateway先启动其他微服务,在启动网关,网关启动不了,且无异常日志;先启动网关,所有服务能正常启动
gateway先启动其他微服务,在启动网关,网关启动不了,且无异常日志;先启动网关,所有服务能正常启动
2022-06-11 20:56:00 【qq_21480329】
升级spring boot到2.7.0,gateway先启动其他微服务,在启动网关,网关启动不了,但是网关也没有任何异常日志,仅仅是一直等待状态,查看nacos服务未正常注册;先启动网关,所有服务能正常启动,产看nacos服务,所有服务能正常注册。
最终发现是Feign导致,Spring Cloud Gateway使用OpenFeign卡死,启动不了。当在gateway网关中使用Feign时,就会导致gateway网关启动一直卡着,然而也不报错。
日志无异常情况,详细日志如下:
:: Spring Boot :: (v2.7.0)
2022-06-04 20:41:37.627 INFO 28144 --- [ main] c.a.n.c.c.impl.LocalConfigInfoProcessor : LOCAL_SNAPSHOT_PATH:/Users/carter/nacos/config
2022-06-04 20:41:37.644 INFO 28144 --- [ main] c.a.nacos.client.config.impl.Limiter : limitTime:5.0
2022-06-04 20:41:37.712 INFO 28144 --- [ main] c.a.nacos.client.config.utils.JvmUtil : isMultiInstance:false
2022-06-04 20:41:37.731 WARN 28144 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[gateway] & group[DEFAULT_GROUP]
2022-06-04 20:41:37.757 WARN 28144 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[gateway.yml] & group[DEFAULT_GROUP]
2022-06-04 20:41:37.758 INFO 28144 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-gateway.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-gateway,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-allows.yaml,DEFAULT_GROUP'}]
2022-06-04 20:41:37.764 INFO 28144 --- [ main] com.cloud.gateway.GatewayApplication : No active profile set, falling back to 1 default profile: "default"
2022-06-04 20:41:38.210 INFO 28144 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2022-06-04 20:41:38.211 INFO 28144 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2022-06-04 20:41:38.225 INFO 28144 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5 ms. Found 0 Redis repository interfaces.
2022-06-04 20:41:38.346 INFO 28144 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=d6da96dc-ee00-3f1d-b951-2210fa3441c0
2022-06-04 20:41:38.356 INFO 28144 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'validatorConfiguration' of type [com.common.exception.validation.ValidatorConfiguration$$EnhancerBySpringCGLIB$$8078cc58] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-06-04 20:41:38.370 INFO 28144 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'validator' of type [org.hibernate.validator.internal.engine.ValidatorImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-06-04 20:41:38.465 INFO 28144 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-06-04 20:41:38.467 INFO 28144 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-06-04 20:41:38.470 INFO 28144 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'reactorDeferringLoadBalancerExchangeFilterFunction' of type [org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-06-04 20:41:39.656 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [After]
2022-06-04 20:41:39.656 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Before]
2022-06-04 20:41:39.656 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Between]
2022-06-04 20:41:39.656 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Cookie]
2022-06-04 20:41:39.656 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Header]
2022-06-04 20:41:39.656 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Host]
2022-06-04 20:41:39.656 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Method]
2022-06-04 20:41:39.656 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Path]
2022-06-04 20:41:39.657 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Query]
2022-06-04 20:41:39.657 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [ReadBody]
2022-06-04 20:41:39.657 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [RemoteAddr]
2022-06-04 20:41:39.657 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [XForwardedRemoteAddr]
2022-06-04 20:41:39.657 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Weight]
2022-06-04 20:41:39.657 INFO 28144 --- [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [CloudFoundryRouteService]
2022-06-04 20:41:39.699 INFO 28144 --- [oundedElastic-1] com.alibaba.nacos.client.naming : initializer namespace from System Property :null
2022-06-04 20:41:39.699 INFO 28144 --- [oundedElastic-1] com.alibaba.nacos.client.naming : initializer namespace from System Environment :null
2022-06-04 20:41:39.699 INFO 28144 --- [oundedElastic-1] com.alibaba.nacos.client.naming : initializer namespace from System Property :null
2022-06-04 20:41:39.842 INFO 28144 --- [oundedElastic-3] com.alibaba.nacos.client.naming : new ips(1) service: [email protected]@user-center -> [{"instanceId":"192.168.1.108#9002#DEFAULT#[email protected]@user-center","ip":"192.168.1.108","port":9002,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"[email protected]@user-center","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000}]
2022-06-04 20:41:39.847 INFO 28144 --- [oundedElastic-3] com.alibaba.nacos.client.naming : current ips:(1) service: [email protected]@user-center -> [{"instanceId":"192.168.1.108#9002#DEFAULT#[email protected]@user-center","ip":"192.168.1.108","port":9002,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"[email protected]@user-center","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000}]
2022-06-04 20:43:43.034 WARN 28144 --- [.naming.updater] com.alibaba.nacos.client.naming : out of date data received, old-t: 1654346563261, new-t: 0
日志图片:
解决方案:
1.修改配置
由于配置了spring.cloud.gateway.discovery.locator.enabled = true导致,改为false或者去掉该配置,因为默认为false,但是该方案会导致动态路由不能加载,影响微服务调用。
gateway:
discovery:
locator:
enabled: false
2.feign注入使用懒加载方式
// 关键:这里必须使用@Lazy
@Lazy
@Autowired
private Oauth2Client oauth2Client;
相关大数据学习demo地址:
https://github.com/carteryh/big-data
边栏推荐
- Redis fourth session - redis high performance principle (multiplexing) and high availability analysis (backup, master-slave)
- var 和 let的区别_let 和 var的区别
- [computer exemption] the Internet of things and ubiquitous intelligence research center of Harbin Institute of technology recruits 2023 graduate students (Master, doctoral and direct doctoral) from un
- Oracle case: ora-00600: internal error code, arguments: [4187]
- Research and Analysis on the market status of polybutene-1 in China from 2021 to 2027 and forecast report on its development prospect
- 13 r basic exercises
- MySQL installation free configuration tutorial under Windows mysql-5.6.51-winx64 Zip version
- Release of version 5.6 of rainbow, add multiple installation methods, and optimize the topology operation experience
- unity package manager starting server stuck(Unity啟動卡在starting server,然後報錯)
- Explanation of each column output by explain statement
猜你喜欢
![[nk] deleted number of 100 C Xiaohong in Niuke practice match](/img/f1/a99600e1800c087aceb60a559dee39.png)
[nk] deleted number of 100 C Xiaohong in Niuke practice match

Redis第四话 -- redis高性能原理(多路复用)和高可用分析(备份、主从)
![[data visualization] use Apache superset to visualize Clickhouse data](/img/4b/a73c2eb810f1d2b492e950afb2d0bc.png)
[data visualization] use Apache superset to visualize Clickhouse data

8 r subset

Black circle display implementation

黑圆圈显示实现

Role of RESNET residual block

频域滤波器

Final examination of theory and practice of socialism with Chinese characteristics 1

9 r remove missing values
随机推荐
The difference between VaR and let_ The difference between let and VaR
14 r basic exercises
[computer exemption] the Internet of things and ubiquitous intelligence research center of Harbin Institute of technology recruits 2023 graduate students (Master, doctoral and direct doctoral) from un
[data visualization] Apache superset 1.2.0 tutorial (II) - Quick Start (visualizing King hero data)
可综合RTL代码设计方法和注意事项
Current situation and future development trend of tropical forage seed market in the world and China from 2022 to 2028
Final examination of Dialectics of nature 1
Compilation process of program
Pyqt5 technical part - set the default value of qcombobox drop-down box and get the current selection of the drop-down box
应用场景:现场直播节目制作NDI技术中PoE网卡的广泛应用
IDEA中,运行yarn命令,显示无法加载文件,因为在此系统上禁用运行脚本
Js 监听滚动触底加载更多_浏览器滚动触底加载更多
Redis fourth session - redis high performance principle (multiplexing) and high availability analysis (backup, master-slave)
UI automated interview questions
新品发布:国产单电口千兆网卡正式量产!
Current situation and future development trend of global and Chinese cogeneration system market from 2022 to 2028
php pcntl_fork 创建多个子进程解析
Product information | Poe network card family makes a collective appearance, the perfect partner of machine vision!
Serval and Rooted Tree(CF1153D)-DP
8 r subset