When I test the Dubbo call, the background suddenly prints out this. The call function can be provided normally. I don't know where my problem is
当我测试dubbo调用的时候,后台突然打印出这个,调用功能能正常提供,我不知道这是我哪里的问题
When I test the Dubbo call, the background suddenly prints out this. The call function can be provided normally. I don't know where my problem is
当我测试dubbo调用的时候,后台突然打印出这个,调用功能能正常提供,我不知道这是我哪里的问题
7条答案
按热度按时间z2acfund1#
What's the error message that your application received?
h7wcgrx32#
2020-04-21 19:43:37.022 - WARN 27390 --- [DubboServerHandler-172.18.30.18:20001-thread-10] o.a.d.r.p.d.LazyConnectExchangeClient [lineno:138]: safe guard client , should not be called ,must have a bug.
java.lang.IllegalStateException: safe guard client , should not be called ,must have a bug.
at org.apache.dubbo.rpc.protocol.dubbo.LazyConnectExchangeClient.warning(LazyConnectExchangeClient.java:138) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.protocol.dubbo.LazyConnectExchangeClient.request(LazyConnectExchangeClient.java:127) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.request(ReferenceCountExchangeClient.java:91) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:100) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:162) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.invoke(AsyncToSyncInvoker.java:52) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:78) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:89) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:81) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:51) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:81) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:55) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:81) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:82) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:259) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:82) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:74) [dubbo-2.7.6.jar!/:2.7.6]
at org.apache.dubbo.common.bytecode.proxy5.getWebsiteSolrRes(proxy5.java) [dubbo-2.7.6.jar!/:2.7.6]
ddrv8njm3#
I have the same problem.
when the provider is restarted, the consumer prints it every 5k calls.
I saw that when the server shutdown , the client will become
LazyConnectExchangeClient
https://github.com/apache/dubbo/blob/4aaaea43ae75bee99837183c5be37ca2cb942741/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClient.java#L182-L199how can I fix it and avoid this print out ?
ldfqzlk84#
Any response for this issue?
h22fl7wq5#
When I test the Dubbo call, the background suddenly prints out this. The call function can be provided normally. I don't know where my problem is
当我测试dubbo调用的时候,后台突然打印出这个,调用功能能正常提供,我不知道这是我哪里的问题
我也遇到这个问题,调用是正常的。用2.7以下的老版本不会有问题
5jdjgkvh6#
What's the error message that your application received?
我也遇到了这个问题,我使用的是2.7.8的版本,虽然可以正常调用,但是强迫症的我,看到这个报错真是太扎心了,这到底是什么问题造成的啊?
rjee0c157#
看源码可能原因是,业务代码中出现错误导致调用了close方法,dubbo框架中做了处理,做了一个标记,标识这个被业务关闭的连接为幽灵客户端,每5000次告警一次,具体可能需要排查哪里出错导致调用了close方法。
源码如下:
//幽灵client,
private LazyConnectExchangeClient replaceWithLazyClient(){
//这个操作只为了防止程序bug错误关闭client做的防御措施,初始client必须为false状态
URL lazyUrl = url.addParameter(Constants.LAZY_CONNECT_INITIAL_STATE_KEY, Boolean.FALSE)
.addParameter(Constants.RECONNECT_KEY, Boolean.FALSE)
.addParameter(Constants.SEND_RECONNECT_KEY, Boolean.TRUE.toString())
.addParameter("warning", Boolean.TRUE.toString())
.addParameter(LazyConnectExchangeClient.REQUEST_WITH_WARNING_KEY, true)
.addParameter("_client_memo", "referencecounthandler.replacewithlazyclient");