周梦康 发表于 2021-11-08 66 次浏览 标签 : arthas
java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED
  at com.aliyun.ots.thirdparty.org.apache.util.Asserts.check(Asserts.java:40)
  at com.aliyun.ots.thirdparty.org.apache.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:112)
  at com.aliyun.ots.thirdparty.org.apache.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:66)
  at com.alicloud.openservices.tablestore.core.http.AsyncServiceClient.asyncSendRequest(AsyncServiceClient.java:150)
  at com.alicloud.openservices.tablestore.core.OperationLauncher.asyncInvokePost(OperationLauncher.java:152)
  at com.alicloud.openservices.tablestore.core.GetRowLauncher.fire(GetRowLauncher.java:52)
  at com.alicloud.openservices.tablestore.InternalClient.getRow(InternalClient.java:473)
  at com.alicloud.openservices.tablestore.SyncClient.getRow(SyncClient.java:231)

官方的文档解释 https://helpcdn.aliyun.com/document_detail/58520.html
但是我没有找到代码里有显性的 shutdown 方法的调用。

[arthas@32219]$ stack com.alicloud.openservices.tablestore.InternalClient shutdown -v -n 5 '1==1'
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 279 ms, listenerId: 1
Condition express: 1==1 , result: true
ts=2021-11-09 09:48:59;thread_name=main;id=a7;is_daemon=false;priority=5;TCCL=com.taobao.pandora.boot.loader.ReLaunchURLClassLoader@5a2e4553
    @com.alicloud.openservices.tablestore.InternalClient.shutdown()
        at com.alicloud.openservices.tablestore.AsyncClient.shutdown(AsyncClient.java:358)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:364)
        at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:287)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:583)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:555)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:954)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:516)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:961)
        at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1034)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:555)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:123)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:666)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:353)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:300)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1082)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1071)
        at com.xx.xxApplication.main(UccProviderApplication.java:25)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.taobao.pandora.boot.loader.LaunchRunner.run(LaunchRunner.java:38)
        at java.lang.Thread.run(Thread.java:882)

查看源码可以看到应该是应用启动出现异常了

查看错误日志发现是 oss 网络不通,导致最后bean创建失败抛异常。

2021-11-09 09:48:59.152 ERROR 32219 --- [main] [] [] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ossPool' defined in class path resource [com/alibaba/boot/AliyunOSSAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.boot.OssPool]: Factory method 'ossPool' threw exception;nested exception is com.alibaba.boot.AliyunOssPoolException: init pool failed
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1177)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1072)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:123)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:666)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:353)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:300)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1082)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1071)
        at com.aliyun.xxx.xxxProviderApplication.main(xxxProviderApplication.java:25)
        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:498)
        at com.taobao.pandora.boot.loader.LaunchRunner.run(LaunchRunner.java:38)
        at java.lang.Thread.run(Thread.java:882)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.boot.OssPool]: Factory method 'ossPool' threw exception; nested exception is com.alibaba.boot.AliyunOssPoolException: init pool failed
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
        ... 24 common frames omitted
Caused by: com.alibaba.boot.AliyunOssPoolException: init pool failed
        at com.alibaba.boot.OssPool.initPool(OssPool.java:29)
        at com.alibaba.boot.OssPool.<init>(OssPool.java:15)
        at com.alibaba.boot.AliyunOSSAutoConfiguration.ossPool(AliyunOSSAutoConfiguration.java:34)
        at com.alibaba.boot.AliyunOSSAutoConfiguration$$EnhancerBySpringCGLIB$$ad96fc0b.CGLIB$ossPool$0(<generated>)
        at com.alibaba.boot.AliyunOSSAutoConfiguration$$EnhancerBySpringCGLIB$$ad96fc0b$$FastClassBySpringCGLIB$$243e841f.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
        at com.alibaba.boot.AliyunOSSAutoConfiguration$$EnhancerBySpringCGLIB$$ad96fc0b.ossPool(<generated>)
        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:498)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
        ... 25 common frames omitted
Caused by: com.aliyun.oss.ClientException: Connect to xxx-image.oss-cn-beijing.aliyuncs.com:80 [xxx-image.oss-cn-beijing.aliyuncs.com/59.xxx.xxx.219] failed: connect timed out
[ErrorCode]: ConnectionTimeout
[RequestId]: Unknown
        at com.aliyun.oss.common.utils.ExceptionFactory.createNetworkException(ExceptionFactory.java:71)
        at com.aliyun.oss.common.comm.DefaultServiceClient.sendRequestCore(DefaultServiceClient.java:141)
        at com.aliyun.oss.common.comm.ServiceClient.sendRequestImpl(ServiceClient.java:133)
        at com.aliyun.oss.common.comm.ServiceClient.sendRequest(ServiceClient.java:70)
        at com.aliyun.oss.internal.OSSOperation.send(OSSOperation.java:83)
        at com.aliyun.oss.internal.OSSOperation.doOperation(OSSOperation.java:145)
        at com.aliyun.oss.internal.OSSOperation.doOperation(OSSOperation.java:102)
        at com.aliyun.oss.internal.OSSBucketOperation.getBucketAcl(OSSBucketOperation.java:321)
        at com.aliyun.oss.internal.OSSBucketOperation.doesBucketExists(OSSBucketOperation.java:433)
        at com.aliyun.oss.OSSClient.doesBucketExist(OSSClient.java:438)
        at com.aliyun.oss.OSSClient.doesBucketExist(OSSClient.java:433)
        at com.alibaba.boot.EnhancedOssClient.doesBucketExist(EnhancedOssClient.java:224)
        at com.alibaba.boot.OssPool.initPool(OssPool.java:24)
        ... 37 common frames omitted
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to xxx-image.oss-cn-beijing.aliyuncs.com:80 [xxx-image.oss-cn-beijing.aliyuncs.com/59.xxx.xxx.219] failed: connect timed out
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:xxx)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:xxx)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
        at com.aliyun.oss.common.comm.DefaultServiceClient.sendRequestCore(DefaultServiceClient.java:138)

👇 下面是我的公众号,高质量的博文我会第一时间同步到公众号,给个关注吧!

评论列表