nacos远程部署,公共服务远程部署,本地服务启动后,访问不了

Blade 已结 2 9803
wangtian
wangtian 2020-02-02 18:20

一、该问题的重现步骤是什么?

1. 远程(外网ip)部署nacos

2. 远程(外网ip)启动公共服务(用户、鉴权、日志、系统、网关)

3. 本地(内网)启动demo服务


二、你期待的结果是什么?实际看到的又是什么?

我期待:能通过远程(公网ip)的nacos、网关访问内网的demo服务

实际:不能访问,因为内网的ip不是公网ip


补充:公网的服务访问可以正常,就是demo不能访问。实际开发需要将公共服务部署到公网,与内网的服务进行协作开发。


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

任何版本都存在这个情况

跟操作系统、产品和版本没有关系


四、请提供详细的错误堆栈信息,这很重要。

io.netty.channel.ConnectTimeoutException: connection timed out: /192.168.0.9:7007
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$2.run(AbstractEpollChannel.java:563) ~[netty-transport-native-epoll-4.1.43.Final-linux-x86_64.jar!/:4.1.43.Final]
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:150) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413) ~[netty-transport-native-epoll-4.1.43.Final-linux-x86_64.jar!/:4.1.43.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_242]
2020-02-02 18:04:41.582 ERROR 2555 --- [or-http-epoll-1] a.w.r.e.AbstractErrorWebExceptionHandler : [9c146097] 500 Server Error for HTTP GET "/blade-develop/datasource/select"
io.netty.channel.ConnectTimeoutException: connection timed out: /192.168.0.9:7007
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$2.run(AbstractEpollChannel.java:563) ~[netty-transport-native-epoll-4.1.43.Final-linux-x86_64.jar!/:4.1.43.Final]
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:150) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413) ~[netty-transport-native-epoll-4.1.43.Final-linux-x86_64.jar!/:4.1.43.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.43.Final.jar!/:4.1.43.Final]

五、若有更多详细信息,请在下面提供。

谢谢


2条回答
  •  gd_xwq@qq.com
    2021-01-04 18:22

    image.png

    我也是想配成外网,用这种方式配置,结果所有的微服务都是这个ip和端口了,不知道是什么原因?


    我的微服务部署在两台服务器(不在一个局域网)

提交回复