Cannot send, channel has already failed:
Failed Cannot has already channel send
2023-09-27 14:24:48 时间
背景:
一个同事往这个队列发数据,另一个同事从这个队列取数据,进行解析。
这是昨天同事昨天消费者 消费activemq 队列,一开始有正常,运行了一段时间后,发现突然消费者变为零了。因为有监控。之后怎么也连不上。然后报了这个错。
javax.jms.JMSException: Cannot send, channel has already failed: tcp://IP:61616
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1409)
at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1496)
at org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:524)
分析:
本以为是同事写的程序有问题,就用本地写了一个最简单的取数据程序,依旧是报这个错。
为了不让队列监控一直报警,就让发送数据的同事A 停止 生产者程序。
突然之后就可以正常取程序了。
问题锁定:
这才怀疑是生产者出现的问题。是因为他每次发送消息都new 一个连接。导致超出默认最大连接数1000 。所以无法再有连接队列,导致队列无法连接
发生这个错误,去检查下自己代码,是否是每次都创建一个连接,而没有关闭连接。
一般分为两种连接
一种是长连接,适用于处于一值发送数据,
一种短连接,就是连接了,发送完数据,就关闭连接
</div>
相关文章
- Trouble Connecting to sql server Login failed. "The login is from an untrusted domain and cannot be used with Windows authentication"
- spark任务执行过程中经常性的failed但是任务并没有失败最后总能跑完
- fatal: Authentication failed for解决方法
- Module build failed: TypeError: Cannot read property ‘match‘ of undefined at Object.解决
- Failed to parse PID from file /run/nginx.pid: Invalid argument
- docker中timedatectrl命令报“Failed to create bus connection: No such file or directory”
- python 'libinstall' failed [libinstall] Error 1 解决办法
- SpringBoot运行出现 Lookup method resolution failed; nested exception is java.lang.IllegalStateException
- org.apache.kafka.common.KafkaException: Socket server failed to bind to 114.115.20.100:9092: Cannot
- git克隆源码时提示fatal: HTTP request failed怎么办?
- SVN svnserve.conf: Option expected 的解决方法 以及 Authorization failed 的解决方法
- Nignx出现failed (3: The system cannot find the path specified)问题
- 记录实验室深度学习服务器显卡硬件故障的排查——RmInitAdapter failed! rm_init_adapter failed
- centos httpd 重啓顯示 `httpd: apr_sockaddr_info_get() failed for`
- vue type check failed for prop . Expected Number, got String
- (xTaskNotify)- assert failed! 错误的修复