Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idle时间使用默认的60s,严格的按照每60s调用一次,偶发性发现服务连不上 #53

Open
yinhaomin opened this issue Apr 27, 2018 · 2 comments

Comments

@yinhaomin
Copy link

idle时间使用默认的60s,严格的按照每60s调用一次,偶发性发现服务连不上。
报错如下:

java.lang.reflect.UndeclaredThrowableException: null
        at com.sun.proxy.$Proxy122.helloWorld(Unknown Source)
        at com.hf.process.web.listener.PmpRpcListener.monitorPmpRpcServer(PmpRpcListener.java:74)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
        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:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException: null
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.baidu.jprotobuf.pbrpc.client.ha.HaProtobufRpcProxy.invoke(HaProtobufRpcProxy.java:375)
        at com.baidu.jprotobuf.pbrpc.spring.HaProtobufRpcProxyBean.invoke(HaProtobufRpcProxyBean.java:86)
        at com.baidu.jprotobuf.pbrpc.spring.HaRpcProxyFactoryBean.invoke(HaRpcProxyFactoryBean.java:179)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        ... 16 common frames omitted
Caused by: java.lang.RuntimeException: Unable to validate object
        at com.baidu.jprotobuf.pbrpc.transport.ChannelPool.getChannel(ChannelPool.java:85)
        at com.baidu.jprotobuf.pbrpc.transport.RpcChannel.getConnection(RpcChannel.java:72)
        at com.baidu.jprotobuf.pbrpc.client.ProtobufRpcProxy.invoke(ProtobufRpcProxy.java:453)
        at com.sun.proxy.$Proxy126.helloWorld(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.baidu.jprotobuf.pbrpc.client.ha.lb.LoadBalanceProxyFactoryBean.doInvoke(LoadBalanceProxyFactoryBean.java:496)
        at com.baidu.jprotobuf.pbrpc.client.ha.lb.LoadBalanceProxyFactoryBean.invokeWithMaxTry(LoadBalanceProxyFactoryBean.java:441)
        at com.baidu.jprotobuf.pbrpc.client.ha.lb.LoadBalanceProxyFactoryBean.invoke(LoadBalanceProxyFactoryBean.java:410)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy122.helloWorld(Unknown Source)
        ... 25 common frames omitted
Caused by: java.util.NoSuchElementException: Unable to validate object
        at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:506)
        at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
        at com.baidu.jprotobuf.pbrpc.transport.ChannelPool.getChannel(ChannelPool.java:79)
        ... 38 common frames omitted
@jhunters
Copy link
Collaborator

这种现象是有可能的, 也算正常现象。因为你的时间配置的是一致,就会有可能你刚拿到连接池对象,服务就close该链接,就会出现 这种情况。 你只要使用的是Ha的配置,会自己重试一个新的链接的

@yinhaomin
Copy link
Author

好的,感谢回复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants