dubbo 部署到服务器上获取的ip不是本机ip,应该怎么配置

rqenqsqc  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(54)

2023-02-23 11:20:15.839 ERROR 27333 --- [eCheck-thread-1] o.a.d.r.e.s.header.ReconnectTimerTask : [DUBBO] Fail to connect toHeaderExchangeClient [channel=org.apache.dubbo.remoting.transport.netty4.NettyClient [52.9.217.50:0 -> /52.9.217.50:20881]], dubbo version: 3.1.5, current host: 52.9.217.50, error code: 6-16. This may be caused by , go to https://dubbo.apache.org/faq/6/16 to find instructions.

org.apache.dubbo.remoting.RemotingException: client(url: dubbo://52.9.217.50:20881/cn.mengkee.recruit.customer.dubbo.RemoteUserService?anyhost=true&application=recruit-merchant&background=false&cache=false&check=false&codec=dubbo&deprecated=false&dubbo=2.0.2&dubbo.endpoints=[{"port":20881,"protocol":"dubbo"}]&dubbo.metadata.revision=7ea25d0c28c45eaad4c3052a07e8f723&dubbo.metadata.storage-type=remote&dynamic=true&generic=false&group=DUBBO_GROUP&heartbeat=60000&interface=cn.mengkee.recruit.customer.dubbo.RemoteUserService&logger=slf4j&metadata-type=remote&methods=deleteById,queryPage,selectById,update,updateCommissionId,updateRealInfo,updateStatus&pid=27333&qos.accept.foreign.ip=false&qos.enable=false&register-mode=instance&register.ip=52.9.217.50&release=3.1.5&revision=1.0.0&service-name-mapping=true&side=consumer&sticky=false&timeout=3000&timestamp=1677085802235&unloadClusterRelated=false&validation=true&version=1.0.0) failed to connect to server /52.9.217.50:20881 client-side timeout 3000ms (elapsed: 3001ms) from netty client 52.9.217.50 using dubbo version 3.1.5
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:238)
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:171)
at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:220)
at org.apache.dubbo.remoting.transport.AbstractClient.reconnect(AbstractClient.java:274)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.reconnect(HeaderExchangeClient.java:171)
at org.apache.dubbo.remoting.exchange.support.header.ReconnectTimerTask.doTask(ReconnectTimerTask.java:52)
at org.apache.dubbo.remoting.exchange.support.header.AbstractTimerTask.run(AbstractTimerTask.java:87)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:653)
at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:732)
at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:454)
at java.lang.Thread.run(Thread.java:750)

yws3nbqq

yws3nbqq2#

你得确保获取自己的本机ip的地址方式是正确的。而配置ip地址在官网解释是多网卡选择或指定VIP及域名时使用,为空则自动查找本机IP,建议不要配置,让Dubbo自动获取本机IP。如果你要配置可以通过dubbo.protocol.host进行一个手动配置。详细更多的配置选项,你可以通过查看此链接 官网配置手册

相关问题