我的消費約一週工作正常,那麼消費者線程死亡,記錄了以下錯誤:驗證失敗彈簧AMQP超時
It seems the Authentication failure is caused by BufferedInputStream.read timeout, and I want to know if there is a way to treat the Authentication failure as a non-fatal and do not kill the consumer thread. and I think the timeout issue is just caused by network issue not the Authentication failure, since this consumer already worked for one week.
org.springframework.amqp.rabbit.listener.exception.FatalListenerStartupException: Authentication failure
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:460)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1171)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.PossibleAuthenticationFailureException: Possibly caused by authentication failure
at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:61)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:296)
at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:524)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$1.createConnection(ConnectionFactoryUtils.java:85)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:135)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:71)
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:456)
... 2 more
Caused by: com.rabbitmq.client.PossibleAuthenticationFailureException: Possibly caused by authentication failure
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:341)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:824)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:736)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:283)
... 7 more
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66) at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36) at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:366) at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:233) at com.rabbitmq.client.impl.AMQChannel.rpc(AMQChannel.java:211) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:326)
產生的原因:在com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java在com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66) 連接錯誤 :com.rabbitmq.client.ShutdownSignalException: 36) 在com.rabbitmq.client.impl.AMQChannel $ BlockingRpcContinuation.getReply(AMQChannel.java:366) 在com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:233) 在com.rabbitmq。 client.impl.AMQChannel.rpc(AMQChannel.java:211) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:326) –
導致:java.net.SocketException:連接超時 在java .net.SocketInputStream.socketRead0(本地方法) at java.net.SocketInputStream.read(SocketInputStream.java:152) at java.net.SocketInputStream.read(SocketInputStream.java:122) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235 ) at java.io.BufferedInputStream.read(BufferedInputStream.java:254) at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288) at com.rabbitmq.client.impl.Frame.readFrom(Frame.java :94) at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:138) –
第一次問這裏的問題,並總是得到您的文章似乎包含沒有正確格式化爲代碼的代碼。請使用代碼工具欄按鈕或CTRL + K鍵盤快捷鍵將所有代碼縮進4個空格。要獲得更多編輯幫助,請單擊[?]工具欄圖標。所以我添加一些意見來發布我的問題 –