nacos-group / nacos-docker

This project contains a Docker image meant to facilitate the deployment of Nacos .
Apache License 2.0
1.43k stars 909 forks source link

server is DOWNnow, detailed error message: Optional[Distro protocol is not initialized] #200

Closed easydu2002 closed 3 years ago

easydu2002 commented 3 years ago

环境

配置相关

192.168.213.128是虚拟机ip,192.168.43.31是主机ip,可以互通,无防火墙! docker K3%6 M P YM 2G TDX7`8`H 9XW602EVAYW0D5O2 08R@ A W_HF%DXYZAZRQ8`%I %7 NM


~$G`SWA_YXM6 9QN53$Y$F

nginx PB`DL6HSY2SNB)2CI@Q8OSW

spring boot M5ZUN%X0ZP0R9ZG 2{J7S5V

问题

浏览器访问正常 9@@}J~RYNLHKKM`(@ `C` J

程序报错👇

2021-07-18 20:49:18.058 ERROR [service-product,,] 22220 --- [           main] c.a.c.n.registry.NacosServiceRegistry    : nacos registry, service-product register failed...NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAddr='192.168.213.128:8848', endpoint='', namespace='', watchDelay=30000, logName='', service='service-product', weight=1.0, clusterName='DEFAULT', group='DEFAULT_GROUP', namingLoadCacheAtStart='false', metadata={preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip='192.168.213.1', networkInterface='', port=8081, secure=false, accessKey='', secretKey='', heartBeatInterval=null, heartBeatTimeout=null, ipDeleteTimeout=null}},

com.alibaba.nacos.api.exception.NacosException: failed to req API:/nacos/v1/ns/instance after all servers([192.168.213.128:8848]) tried: ErrCode:503, ErrMsg:server is DOWNnow, detailed error message: Optional[Distro protocol is not initialized]
        at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:556) ~[nacos-client-1.4.1.jar:na]
    at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:498) ~[nacos-client-1.4.1.jar:na]
    at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:493) ~[nacos-client-1.4.1.jar:na]
    at com.alibaba.nacos.client.naming.net.NamingProxy.registerService(NamingProxy.java:246) ~[nacos-client-1.4.1.jar:na]
    at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:212) ~[nacos-client-1.4.1.jar:na]
        ......

nacos.log👇 5ON7PUQHE2}XE3((__$C~ E

paderlol commented 3 years ago

grpc的端口没有放出来,2.0以后服务端grpc通讯端口等于主端口+1000, 这些在官方文档有说明,我的例子里面也有写

easydu2002 commented 3 years ago

grpc的端口没有放出来,2.0以后服务端grpc通讯端口等于主端口+1000, 这些在官方文档有说明,我的例子里面也有写

ok了,谢谢!

dotaZealot commented 1 year ago

grpc的端口没有放出来,2.0以后服务端grpc通讯端口等于主端口+1000, 这些在官方文档有说明,我的例子里面也有写

宝,k8s也遇到了这个问题,service、node均打开了+1000端口,还是不好使,能帮看看吗 @paderlol https://github.com/nacos-group/nacos-k8s/issues/358