我们使用spring-boot-starter-amqp.1.7.4.Release。当我们试图终止此过程时,无法停止它。
这是线程转储。请帮助我?
================================================ =========
"Thread-57" #104 prio=5 os_prio=0 tid=0x00007f4420038800 nid=0x39f6 in Object.wait() [0x00007f443d8d2000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:49)
- locked <0x000000008ad818e0> (a com.rabbitmq.utility.BlockingValueOrException)
at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:91)
- locked <0x000000008ad818e0> (a com.rabbitmq.utility.BlockingValueOrException)
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:32)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:366)
at com.rabbitmq.client.impl.ChannelN.basicCancel(ChannelN.java:1280)
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.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:980)
- locked <0x0000000089d2a198> (a java.lang.Object)
at com.sun.proxy.$Proxy107.basicCancel(Unknown Source)
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.basicCancel(BlockingQueueConsumer.java:392)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doShutdown(SimpleMessageListenerContainer.java:902)
- locked <0x0000000089d2ac98> (a java.lang.Object)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.shutdown(AbstractMessageListenerContainer.java:558)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.destroy(AbstractMessageListenerContainer.java:522)
at org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistry.destroy(RabbitListenerEndpointRegistry.java:210)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:256)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:576)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:552)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:953)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:521)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.destroySingletons(FactoryBeanRegistrySupport.java:227)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:960)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1035)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1011)
at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:933)
- locked <0x0000000088706660> (a java.lang.Object)
"SIGTERM handler" #310 daemon prio=9 os_prio=0 tid=0x00007f4430014800 nid=0x39f1 in Object.wait() [0x00007f44588d9000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Thread.join(Thread.java:1252)
- locked <0x0000000089e1f030> (a org.springframework.context.support.AbstractApplicationContext$1)
at java.lang.Thread.join(Thread.java:1326)
at java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:106)
at java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:46)
at java.lang.Shutdown.runHooks(Shutdown.java:123)
at java.lang.Shutdown.sequence(Shutdown.java:167)
at java.lang.Shutdown.exit(Shutdown.java:212)
- locked <0x00000000877fa068> (a java.lang.Class for java.lang.Shutdown)
at java.lang.Terminator$1.handle(Terminator.java:52)
at sun.misc.Signal$1.run(Signal.java:212)
at java.lang.Thread.run(Thread.java:748)
================================================ =========
springBootVersion = "1.5.7.RELEASE"
compile "org.springframework.boot:spring-boot-starter:$springBootVersion"
compile "org.springframework:spring-tx:$springVersion"
compile "org.springframework:spring-core:$springVersion"
compile "org.springframework:spring-beans:$springVersion"
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-expression:$springVersion"
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-context-support:$springVersion"
compile "org.springframework.boot:spring-boot-starter-amqp:$springBootVersion"
================================================ ==========
答案 0 :(得分:0)
1.7.4已有2年历史了;当前的1.7.x版本是1.7.12。
类似地,当前的引导1.5.x版本是1.5.19。
此外,与Spring Framework一起使用的Boot的正确版本是2.0.x。当前的2.0.x版本是2.0.8(春季5.0.12)。
通常最好使用let boot manage all the dependency versions(有gradle插件)。
那样,您不必担心哪个版本与哪个版本兼容。
我建议,首先,您应正确调整版本并更新版本。
话虽如此,线程在Rabbitmq Java客户端(在basicCancel
上)被阻塞。
at com.rabbitmq.client.impl.ChannelN.basicCancel(ChannelN.java:1280)
我不知道什么情况会导致这种情况。应用程序日志中有什么有趣的东西吗?
您最好问rabbitmq工程师是什么原因造成的;他们比堆栈溢出监视rabbitmq-users
Google组的频率要高得多。