protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - unknown delivery tag 2, class-id=60, method-id=80)
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - unknown delivery tag 18 - 后面的忘了
INFO | jvm 1 | 2017/02/23 14:28:43 | at java.lang.Thread.run(Thread.java:745)
INFO | jvm 1 | 2017/02/23 14:28:43 | Exception in thread "LDService-Worker-3" com.rabbitmq.client.AlreadyClosedException: channel is already closed due to channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - unknown delivery tag 2, class-id=60, method-id=80)
INFO | jvm 1 | 2017/02/23 14:28:43 | at com.rabbitmq.client.impl.AMQChannel.ensureIsOpen(AMQChannel.java:195)
INFO | jvm 1 | 2017/02/23 14:28:43 | at com.rabbitmq.client.impl.AMQChannel.transmit(AMQChannel.java:309)
INFO | jvm 1 | 2017/02/23 14:28:43 | at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:657)
INFO | jvm 1 | 2017/02/23 14:28:43 | at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:640)
INFO | jvm 1 | 2017/02/23 14:28:43 | at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:631)
INFO | jvm 1 | 2017/02/23 14:28:43 | at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.basicPublish(AutorecoveringChannel.java:168)
INFO | jvm 1 | 2017/02/23 14:28:43 | at com.ld.net.remoting.rmq.XXX$DealRequest.processRequest(XXX.java:567)
INFO | jvm 1 | 2017/02/23 14:28:43 | at com.ld.net.remoting.rmq.XXX$3$1.run(XXX.java:208)
INFO | jvm 1 | 2017/02/23 14:28:43 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
INFO | jvm 1 | 2017/02/23 14:28:43 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
原因:经多次重复测试,应该是客户端double ack的原因。
如果启用了批量ack的,将channel.basicAck(envelope.getDeliveryTag(), true); 改为channel.basicAck(envelope.getDeliveryTag(), false);
否则,检查下是否在basicConsume的时候设置了autoAck,同时业务代码里面又调用了channel.basicAck。
除此之外,还可能有下列错误:
com.rabbitmq.client.ShutdownSignalException: clean channel shutdown; protocol method: #method<channel.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0)
INFO | jvm 1 | 2017/02/24 10:28:59 | 17-02-24 10:28:58 ERROR CF-TP-37 XXX$3.handleDelivery(XXX.java:226): 处理消息的时候发生异常,会导致channel关闭,需要重启
INFO | jvm 1 | 2017/02/24 10:28:59 | java.util.concurrent.RejectedExecutionException: Task XXXX.$3$1@722bfd74 rejected from java.util.concurrent.ThreadPoolExecutor@33b8fcd1[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 476]
INFO | jvm 1 | 2017/02/24 10:28:59 | at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)
INFO | jvm 1 | 2017/02/24 10:28:59 | at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
INFO | jvm 1 | 2017/02/24 10:28:59 | at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
INFO | jvm 1 | 2017/02/24 10:28:59 | at XXX.$3.handleDelivery(LDMultiServiceBeanConfigurer.java:205)
INFO | jvm 1 | 2017/02/24 10:28:59 | at com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:144)
INFO | jvm 1 | 2017/02/24 10:28:59 | at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:99)
INFO | jvm 1 | 2017/02/24 10:28:59 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
INFO | jvm 1 | 2017/02/24 10:28:59 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
INFO | jvm 1 | 2017/02/24 10:28:59 | at java.lang.Thread.run(Thread.java:745)
这不一定是MQ自身的问题,有可能是客户端有其他的非MQ相关的异常没有被捕获导致线程抛出异常,进而导致相关MQ消费者线程也异常,详细看日志。
protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - unknown delivery tag 2, class-id=60, method-id=80)的更多相关文章
- RabbitMQ 信道(channel)挂掉,但连接仍然存在,同时出现错误:Received remote Channel.Close (406): PRECONDITION_FAILED - unknown delivery tag x 的问题
该问题经过一番试验,发现是消费者(consumer)程序逻辑错误导致:在消息处理的回调函数中多次ack或nack. 开启Python日志,并在回调函数中两次ack得到如下信息: F:\software ...
- 解决:Could not parse response code.Server Reply: SSH-2.0-OpenSSH_5.3
[摘要:办理:org.apache.commons.net.MalformedServerReplyException: Could not parse response code.Server Re ...
- AMQP close-reason, initiated by Peer, code=406
错误: AMQPclose-reason, initiated by Peer, code=406, text="PRECONDITION_FAILED -inequivalent arg ...
- open数据库报错ERROR at line 1: ORA-03113: end-of-file on communication channel Process ID: 3880 Session ID: 125 Serial number: 3
1.今天打开数据时,失败,报错 ERROR at line 1:ORA-03113: end-of-file on communication channelProcess ID: 3880Sessi ...
- 论文笔记 - Noisy Channel Language Model Prompting for Few-Shot Text Classification
Direct && Noise Channel 进一步把语言模型推理的模式分为了: 直推模式(Direct): 噪声通道模式(Noise channel). 直观来看: Direct ...
- requestsManager:didFailRequest:withError: Error Domain=com.albertodebortoli.goldraccoon Code=-1000 "(null)" UserInfo={message=Unknown error!}
场景:最近IOS开发中需要用到FTP上传,最初是用GoldRaccoon 看后台FTPServer日志,一直都是disconnected.自己对FTP也是懂些皮毛,所以只剩下一坑的无奈.FTP服务器是 ...
- RabbitMQ-如何保证消息在99.99%的情况下不丢失
1. 简介 MQ虽然帮我们解决了很多问题,但是也带来了很多问题,其中最麻烦的就是,如何保证消息的可靠性传输. 我们在聊如何保证消息的可靠性传输之前,先考虑下哪些情况下会出现消息丢失的情况. 首先,上图 ...
- rabbitmq 重复ACK导致消息丢失
rabbitmq 重复确认导致消息丢失 背景 rabbitmq 在应用场景中,大多采用工作队列 work-queue的模式. 在一个常见的工作队列模式中,消费者 worker 将不断的轮询从队列中拉取 ...
- 【rabbitmq】rabbitmq概念解析--消息确认--示例程序
概述 本示例程序全部来自rabbitmq官方示例程序,rabbitmq-demo: 官方共有6个demo,针对不同的语言(如 C#,Java,Spring-AMQP等),都有不同的示例程序: 本示例程 ...
随机推荐
- js贪心算法---背包问题
/* * @param {Object} capacity 背包容量 6 * @param {Object} weights 物品重量 [2,3,4] * @param {Object} values ...
- js关卡函数,throat函数实现,定时运行函数
function throat(callback,num){ var timer = null; callback = callback || function(){}; return functio ...
- numpy.meshgrid()
numpy提供的numpy.meshgrid()函数可以让我们快速生成坐标矩阵X,Y 语法:X,Y = numpy.meshgrid(x, y)输入:x,y,就是网格点的横纵坐标列向量(非矩阵)输出: ...
- Anaconda 使用指南
Anaconda 使用指南 参考文章: 致Python初学者:Anaconda入门使用指南 Anaconda使用总结 概述 很多学习python的初学者甚至学了有一段时间的人接触到anaconda或者 ...
- shell基础:用户自定义变量
- Tomcat任意文件上传漏洞CVE-2017-12615
文章来源:https://blog.csdn.net/qq1124794084/article/details/78044756 漏洞影响的tomcat版本为tomcat7.0.0-7.0.81版本 ...
- Install the mongdb
#!/bin/bash#Function: Install the mongdb#Author: WangDonghui#Date: 20180124 #Installing mongdbecho & ...
- JavaScript-模拟收银台小程序
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- 大数据处理框架之Strom:Storm集群环境搭建
搭建环境 Red Hat Enterprise Linux Server release 7.3 (Maipo) zookeeper-3.4.11 jdk1.7.0_80 Pyth ...
- Lua语言总结
[1]要退出交互模式和解释器,只需输入“os.exit()” [2]在交互模式执行程序块可以使用函数dofile,这个函数就可以立即执行一个文件.应用示例:dofile("f:/myLua/ ...