Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nacos2.0.2 Whitelabel Error Page #6149

Closed
tenduts opened this issue Jun 24, 2021 · 4 comments
Closed

nacos2.0.2 Whitelabel Error Page #6149

tenduts opened this issue Jun 24, 2021 · 4 comments
Labels
status/invalid This doesn't seem right

Comments

@tenduts
Copy link

tenduts commented Jun 24, 2021

When I used spring cloud Alibaba to link to Nacos 2.0.2, the following problems occurred. However, when I used Nacos 2.0.1 on other servers to connect to MySQL database under Nacos 2.0.2, I used spring cloud Alibaba to connect to Nacos 2.0.1 again, and the problem disappeared.

This shows that it's a nacos2.0.2 bug

当我使用springCloud Alibaba 链接nacos 2.0.2的时候产生了如下问题,但是我用位于其他的服务器的nacos 2.0.1来连接nacos2.0.2下的mysql数据库的,再次使用springCloud Alibaba来连接nacos2.0.1,问题消失了。

这说明是nacos2.0.2的bug
nacos_error.txt

2021-06-23 17:27:32.895 ERROR 71857 --- [ main] com.alibaba.nacos.client.naming LN:617 [NA] failed to request

com.alibaba.nacos.api.exception.NacosException:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Jun 23 05:27:33 EDT 2021
There was an unexpected error (type=Bad Request, status=400).
receive invalid redirect request from peer 172.16.77.18

at com.alibaba.nacos.client.naming.net.NamingProxy.callServer(NamingProxy.java:615)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:526)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:498)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:493)
at com.alibaba.nacos.client.naming.net.NamingProxy.registerService(NamingProxy.java:246)
at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:212)
at com.alibaba.cloud.nacos.registry.NacosServiceRegistry.register(NacosServiceRegistry.java:74)
at com.alibaba.cloud.nacos.registry.NacosServiceRegistry$$FastClassBySpringCGLIB$$ca3a8dbd.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:47)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:56)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692)
at com.alibaba.cloud.nacos.registry.NacosServiceRegistry$$EnhancerBySpringCGLIB$$181c4183.register()
at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.register(AbstractAutoServiceRegistration.java:239)
at com.alibaba.cloud.nacos.registry.NacosAutoServiceRegistration.register(NacosAutoServiceRegistration.java:78)
at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.start(AbstractAutoServiceRegistration.java:138)
at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.bind(AbstractAutoServiceRegistration.java:101)
at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.onApplicationEvent(AbstractAutoServiceRegistration.java:88)
at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.onApplicationEvent(AbstractAutoServiceRegistration.java:47)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361)
at org.springframework.boot.web.reactive.context.WebServerManager.start(WebServerManager.java:56)
at org.springframework.boot.web.reactive.context.WebServerStartStopLifecycle.start(WebServerStartStopLifecycle.java:40)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554)
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:62)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236)
at com.yjupi.apple.GatewayApplication.main(GatewayApplication.java:20)

2021-06-23 17:27:33.035 ERROR 71857 --- [ main] com.alibaba.nacos.client.naming LN:552 request: /nacos/v1/ns/instance failed, servers: [172.16.77.18:8001], code: 500, msg:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Jun 23 05:27:34 EDT 2021
There was an unexpected error (type=Bad Request, status=400).
receive invalid redirect request from peer 172.16.77.18

2021-06-23 17:27:33.036 ERROR 71857 --- [ main] c.a.c.n.registry.NacosServiceRegistry LN:79 nacos registry, oneths-gateway register failed...NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAddr='172.16.77.18:8001', endpoint='', namespace='3f502917-651a-45fe-8107-770b927b0ad3', watchDelay=30000, logName='', service='oneths-gateway', weight=1.0, clusterName='DEFAULT', group='DEV_GROUP', namingLoadCacheAtStart='false', metadata={preserved.register.source=SPRING_CLOUD, management.context-path=/actuator}, registerEnabled=true, ip='192.168.0.105', networkInterface='', port=9527, secure=false, accessKey='', secretKey='', heartBeatInterval=null, heartBeatTimeout=null, ipDeleteTimeout=null}},

Caused by: com.alibaba.nacos.api.exception.NacosException: failed to req API:/nacos/v1/ns/instance after all servers([172.16.77.18:8001]) tried: ErrCode:400, ErrMsg:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Jun 23 05:27:34 EDT 2021
There was an unexpected error (type=Bad Request, status=400).
receive invalid redirect request from peer 172.16.77.18

at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:556)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:498)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:493)
at com.alibaba.nacos.client.naming.net.NamingProxy.registerService(NamingProxy.java:246)
at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:212)
at com.alibaba.cloud.nacos.registry.NacosServiceRegistry.register(NacosServiceRegistry.java:74)
... 44 common frames omitted

@KomachiSion
Copy link
Collaborator

但是报错显示的是你集群创建有问题也。

请求出现了非责任节点的转发。receive invalid redirect request from peer 172.16.77.18

要不然就是有的节点升级到了2.X模式有的还是1.X模式,要不然就是节点列表数量不一致导致责任节点计算结果不一致。但是不论哪种都是集群创建有问题。

@KomachiSion KomachiSion added kind/bug Category issues or prs related to bug. status/need feedback and removed kind/bug Category issues or prs related to bug. labels Jun 24, 2021
@tenduts
Copy link
Author

tenduts commented Jun 25, 2021

确实如你所说,是nacos集群配错了

@jiangtianyou
Copy link

确实如你所说,是nacos集群配错了

想请教下是哪里配错了呢?我参考检察下我们的

@wskiawv
Copy link

wskiawv commented Mar 6, 2023

#6149 (comment)
是什么配置引起的?我们也想参考一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants