内网部署测试,nacos服务器地址112,启动了log和getway服务。另一台地址113,启动test服务。nacos正常注册test服务成功,test服务无法正常调用,报错如下

Blade 已结 1 4003
iis
iis 2019-06-17 13:03
悬赏:3


内网部署测试,nacos配置与开发文档一致无修改,CommonConstant的NACOS_DEV_ADDR地址修改为192.168.0.112:8848。

nacos服务器地址192.168.0.112,启动了log和getway服务。另一台地址192.168.0.113,启动test服务。nacos正常注册test服务成功,test服务无法正常调用,报错如下


java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance/list after all servers([192.168.0.112:8848]) tried: failed to req API:http://192.168.0.112:8848/nacos/v1/ns/instance/list. code:500 msg: java.net.SocketTimeoutException: connect timed out

at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:380)

at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:304)

at com.alibaba.nacos.client.naming.net.NamingProxy.queryList(NamingProxy.java:217)

at com.alibaba.nacos.client.naming.core.HostReactor.updateServiceNow(HostReactor.java:273)

at com.alibaba.nacos.client.naming.core.HostReactor$UpdateTask.run(HostReactor.java:318)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)

at java.util.concurrent.FutureTask.run(FutureTask.java)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)



1条回答
  •  admin
    admin (楼主)
    2019-06-17 13:20

    test服务不和nacos服务在同一台服务器。报错也显示 connect timed out,排查下是否网络不联通

    作者追问:2019-06-17 13:20

    image.png

    113可以ping通112,是在一个局域网下面

    作者追问:2019-06-17 13:20

    image.png

    nacos里显示test服务正常,以为是112防火墙的问题,关掉后仍然报此异常

    0 讨论(2)
提交回复