You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "48038411 (via GitHub)" <gi...@apache.org> on 2024/02/19 02:45:49 UTC
[I] 关于服务提供者返回调用结果给消费者报错链接被拒绝 [dubbo]
48038411 opened a new issue, #13759:
URL: https://github.com/apache/dubbo/issues/13759
<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
## Ask your question here
我有两台机器,A与B,A机器上搭建了nacos与A服务,B机器搭建了B服务。A服务与B服务的dubbo均注册到了A机器上的nacos上,之前一直没有问题,最近频繁报错。业务场景为:B服务收到设备消息后调用A服务,将设备置为在线状态。目前B服务并未报错,但是B服务调用了A服务之后,A服务会出现错误,错误代码为`2024-02-19 10:24:17,083 [ERROR] [Dubbo-framework-metadata-retry-thread-1] o.a.d.r.c.m.MetadataUtils[163] : [DUBBO] Failed to get app metadata for revision d37d1188b682ea942018f335b2ef3660 for type local from instance 192.168.0.240:20880, dubbo version: 3.0.9, current host: 172.20.0.1
org.apache.dubbo.rpc.RpcException: Fail to create remoting client for service(dubbo://192.168.0.240:20880/org.apache.dubbo.metadata.MetadataService?codec=dubbo&connections=1&corethreads=2&dubbo=2.0.2&group=gateway&heartbeat=60000&port=20880&protocol=dubbo&release=3.0.9&retries=0&side=provider&threadpool=cached&threads=100&timeout=5000&version=1.0.0): client(url: dubbo://192.168.0.240:20880/org.apache.dubbo.metadata.MetadataService?codec=dubbo&connections=1&corethreads=2&dubbo=2.0.2&group=gateway&heartbeat=60000&port=20880&protocol=dubbo&release=3.0.9&retries=0&side=provider&threadpool=cached&threads=100&timeout=5000&version=1.0.0) failed to connect to server /192.168.0.240:20880, error message is:Connection refused: /192.168.0.240:20880
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.initClient(DubboProtocol.java:632)
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.getClients(DubboProtocol.java:442)
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.protocolBindingRefer(DubboProtocol.java:410)
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.refer(DubboProtocol.java:401)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:77)
at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:85)
at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:74)
at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.refer(ProtocolSerializationWrapper.java:52)
at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
at org.apache.dubbo.registry.client.metadata.MetadataUtils.referProxy(MetadataUtils.java:135)
at org.apache.dubbo.registry.client.metadata.MetadataUtils.getRemoteMetadata(MetadataUtils.java:156)
at org.apache.dubbo.registry.client.AbstractServiceDiscovery.getRemoteMetadata(AbstractServiceDiscovery.java:169)
at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.doOnEvent(ServiceInstancesChangedListener.java:152)
at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.onEvent(ServiceInstancesChangedListener.java:112)
at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener$AddressRefreshRetryTask.run(ServiceInstancesChangedListener.java:523)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
Caused by: org.apache.dubbo.remoting.RemotingException: client(url: dubbo://192.168.0.240:20880/org.apache.dubbo.metadata.MetadataService?codec=dubbo&connections=1&corethreads=2&dubbo=2.0.2&group=gateway&heartbeat=60000&port=20880&protocol=dubbo&release=3.0.9&retries=0&side=provider&threadpool=cached&threads=100&timeout=5000&version=1.0.0) failed to connect to server /192.168.0.240:20880, error message is:Connection refused: /192.168.0.240:20880
at org.apache.dubbo.remoting.transport.netty4.NettyClient.doConnect(NettyClient.java:192)
at org.apache.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:214)
at org.apache.dubbo.remoting.transport.AbstractClient.<init>(AbstractClient.java:74)
at org.apache.dubbo.remoting.transport.netty4.NettyClient.<init>(NettyClient.java:89)
at org.apache.dubbo.remoting.transport.netty4.NettyTransporter.connect(NettyTransporter.java:40)
at org.apache.dubbo.remoting.Transporter$Adaptive.connect(Transporter$Adaptive.java)
at org.apache.dubbo.remoting.Transporters.connect(Transporters.java:74)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchanger.connect(HeaderExchanger.java:39)
at org.apache.dubbo.remoting.exchange.Exchangers.connect(Exchangers.java:107)
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.initClient(DubboProtocol.java:628)
... 21 common frames omitted
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /192.168.0.240:20880
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
2024-02-19 10:24:18,084 [ERROR] [Dubbo-framework-metadata-retry-thread-1] o.a.d.r.c.AbstractServiceDiscovery[189] : [DUBBO] Failed to get metadata for revision after 3 retries, revision=d37d1188b682ea942018f335b2ef3660, dubbo version: 3.0.9, current host: 172.20.0.1
2024-02-19 10:24:18,084 [ERROR] [Dubbo-framework-metadata-retry-thread-1] o.a.d.r.c.e.l.ServiceInstancesChangedListener[336] : [DUBBO] 1/1 revisions failed to get metadata from remote: d37d1188b682ea942018f335b2ef3660 , dubbo version: 3.0.9, current host: 172.20.0.1
2024-02-19 10:24:18,084 [ERROR] [Dubbo-framework-metadata-retry-thread-1] o.a.d.r.c.e.l.ServiceInstancesChangedListener[176] : [DUBBO] Address refresh failed because of Metadata Server failure, wait for retry or new address refresh event., dubbo version: 3.0.9, current host: 172.20.0.1` dubbo版本是3.0.9,nacos版本是2.1。调用协议是dubbo,A服务与B服务为同一局域网下机器。
请问是什么问题,A服务与B服务通过Nacos互相调用,需要单独开启20880端口吗,之前没有开端口为什么不会报错。调用代码为 ` @DubboReference
private DeviceService deviceService;
deviceService.deviceOnline(deviceMessage.getDeviceNo());
` 服务提供者代码为`@DubboService(timeout = 5000)
public class DefaultDeviceService extends BaseService implements DeviceService `
配置都一样,都是`dubbo:
consumer:
check: false
timeout: 3000
retries: 0
producer:
check: false
application:
name: gateway
protocol:
name: dubbo
port: -1
registry:
address: nacos://对方局域网IP地址:8848
metadata-report:
address: nacos://对方局域网IP地址:8848
config-center:
address: nacos://对方局域网IP地址:8848
reference:
check:
false
qos:
enable:
false`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 关于服务提供者返回调用结果给消费者报错链接被拒绝 [dubbo]
Posted by "48038411 (via GitHub)" <gi...@apache.org>.
48038411 closed issue #13759: 关于服务提供者返回调用结果给消费者报错链接被拒绝
URL: https://github.com/apache/dubbo/issues/13759
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 关于服务提供者返回调用结果给消费者报错链接被拒绝 [dubbo]
Posted by "48038411 (via GitHub)" <gi...@apache.org>.
48038411 commented on issue #13759:
URL: https://github.com/apache/dubbo/issues/13759#issuecomment-2041281819
> 你是如何解决的?
机器不互通,我的部署环境是两台内网机器,使用Docker分别部署在两台机器上,一开始设定部署的时候网络模式为host,与主机共享网络空间,而内网环境下所有端口是全部开放的,这样是一直稳定的,后面我在性能调优的时候去掉了host网络模式,然后docker容器没有放开20880端口,就导致返回调用结果失败了,实际是要放开20880等相关的端口的
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 关于服务提供者返回调用结果给消费者报错链接被拒绝 [dubbo]
Posted by "vhypnus (via GitHub)" <gi...@apache.org>.
vhypnus commented on issue #13759:
URL: https://github.com/apache/dubbo/issues/13759#issuecomment-2041281075
你是如何解决的?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 关于服务提供者返回调用结果给消费者报错链接被拒绝 [dubbo]
Posted by "xiohuchi (via GitHub)" <gi...@apache.org>.
xiohuchi commented on issue #13759:
URL: https://github.com/apache/dubbo/issues/13759#issuecomment-1960616093
可能机器不互通
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org