Open 15210494746 opened 8 years ago
补充下,hessian序列化时: com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation public Object decode(Channel channel, InputStream input) throws IOException { ...... int argNum = in.readInt();//读取异常 if (argNum >= 0) { } 想确认下,如果consumer和provider使用的dubbo版本为2.5.3,可以正常使用monitor么? 现在的情况是,启动后注册正常,monitor启动正常,除了统计数据无法入库,即无法调用monitorService.collect()外,其他都没问题。 我尝试了几种序列化的方法:java、hessian、json都存在问题。仔细看了接口和请求参数,未见在dubbox2.8.4中对URL模型做任何改动。 能请教下,问题出在哪么?
很抱歉,我们生产环境中使用的是dubbox 针对dubbo 2.5.x版本,有的同学已经测试能用,可以在dubbo的交流群里面问一下,希望您也能正常使用
dubbo交流群QQ号?
解决了吗? @15210494746
我改了代码解决了。判断一下dubbo的version
JSON序列化,异常信息如下: [23 22:53:30,692] [INFO ] [DubboMonitorSendTimer-thread-1] [] monitor.dubbo.DubboMonitor - [DUBBO] Send statistics to monitor zookeeper://127.0.0.1:2181/com.alibaba.dubbo.monitor.MonitorService?anyhost=true&application=dubbo-monitor&check=false&delay=-1&dubbo=2.5.3&generic=false&interface=com.alibaba.dubbo.monitor.MonitorService&methods=lookup,collect&pid=463&revision=2.8.4&serialization=json&side=provider×tamp=1448263156442, dubbo version: 2.5.3, current host: 192.168.6.56 [23 22:53:30,781] [ERROR] [DubboMonitorSendTimer-thread-1] [] monitor.dubbo.DubboMonitor - [DUBBO] Unexpected error occur at send statistic, cause: Failed to invoke the method collect in the service com.alibaba.dubbo.monitor.MonitorService. Tried 3 times of the providers 192.168.1.55:1234 from the registry 127.0.0.1:2181 on the consumer 192.168.6.56 using the dubbo version 2.5.3. Last error is: Failed to invoke remote method: collect, provider: dubbo://192.168.1.55:1234/com.alibaba.dubbo.monitor.MonitorService?anyhost=true&application=dubbo-monitor&check=false&delay=-1&dubbo=2.8.4&generic=false&interface=com.alibaba.dubbo.monitor.MonitorService&methods=lookup,collect&pid=463&revision=2.8.4&serialization=json&side=provider×tamp=1448263156442, cause: Failed to send message Request [id=1169, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=collect, parameterTypes=[class com.alibaba.dubbo.common.URL], arguments=[count://192.168.6.56:1234/com.comisys.gudong.server.service.IOrgService/queryMyPayAccountList?application=lanxin-service-provider&concurrent=1&consumer=192.168.1.54&elapsed=15&failure=0&input=404&interface=com.comisys.gudong.server.service.IOrgService&max.concurrent=1&max.elapsed=15&max.input=404&max.output=0&method=queryMyPayAccountList&output=0&success=1×tamp=1448290410692], attachments={path=com.alibaba.dubbo.monitor.MonitorService, interface=com.alibaba.dubbo.monitor.MonitorService, version=0.0.0}]] to /192.168.1.55:1234, cause: null, dubbo version: 2.5.3, current host: 192.168.6.56 com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method collect in the service com.alibaba.dubbo.monitor.MonitorService. Tried 3 times of the providers 192.168.1.55:1234 from the registry 127.0.0.1:2181 on the consumer 192.168.6.56 using the dubbo version 2.5.3. Last error is: Failed to invoke remote method: collect, provider: dubbo://192.168.1.55:1234/com.alibaba.dubbo.monitor.MonitorService?anyhost=true&application=dubbo-monitor&check=false&delay=-1&dubbo=2.8.4&generic=false&interface=com.alibaba.dubbo.monitor.MonitorService&methods=lookup,collect&pid=463&revision=2.8.4&serialization=json&side=provider×tamp=1448263156442, cause: Failed to send message Request [id=1169, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=collect, parameterTypes=[class com.alibaba.dubbo.common.URL], arguments=[count://192.168.6.56:1234/com.comisys.gudong.server.service.IOrgService/queryMyPayAccountList?application=lanxin-service-provider&concurrent=1&consumer=192.168.1.54&elapsed=15&failure=0&input=404&interface=com.comisys.gudong.server.service.IOrgService&max.concurrent=1&max.elapsed=15&max.input=404&max.output=0&method=queryMyPayAccountList&output=0&success=1×tamp=1448290410692], attachments={path=com.alibaba.dubbo.monitor.MonitorService, interface=com.alibaba.dubbo.monitor.MonitorService, version=0.0.0}]] to /192.168.1.55:1234, cause: null at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:101) at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:227) at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72) at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52) at com.alibaba.dubbo.common.bytecode.proxy0.collect(proxy0.java) at com.alibaba.dubbo.monitor.dubbo.DubboMonitor.send(DubboMonitor.java:113) at com.alibaba.dubbo.monitor.dubbo.DubboMonitor$1.run(DubboMonitor.java:70) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to send message Request [id=1169, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=collect, parameterTypes=[class com.alibaba.dubbo.common.URL], arguments=[count://192.168.6.56:1234/com.comisys.gudong.server.service.IOrgService/queryMyPayAccountList?application=lanxin-service-provider&concurrent=1&consumer=192.168.1.54&elapsed=15&failure=0&input=404&interface=com.comisys.gudong.server.service.IOrgService&max.concurrent=1&max.elapsed=15&max.input=404&max.output=0&method=queryMyPayAccountList&output=0&success=1×tamp=1448290410692], attachments={path=com.alibaba.dubbo.monitor.MonitorService, interface=com.alibaba.dubbo.monitor.MonitorService, version=0.0.0}]] to /192.168.1.55:1234, cause: null at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:108) at com.alibaba.dubbo.remoting.transport.AbstractClient.send(AbstractClient.java:270) at com.alibaba.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:51) at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeChannel.request(HeaderExchangeChannel.java:112) at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeClient.request(HeaderExchangeClient.java:91) at com.alibaba.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.request(ReferenceCountExchangeClient.java:81) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:96) at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:144) at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91) at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:53) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91) at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91) at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:74) at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:53) at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:77)