Rabbitmq client loosing connection and does not recover - rabbitmq

I am using Rabbitmq 3.8.16 with Vertx 3.9.4 Rabbitmq client for my backend application and noticed that sometimes the client looses the connection and it fails to recover correctly (autorecovery is turned ON). It means that after the recovery, It stops to consume messages and the durable queues has no consumers.
This happens randomly and with different exceptions. Since I am using Vertx Rabbitmq client, I cannot create different channel per consumer/publisher, I have something like 10 publishers and 10 consumers on the same node (same connection same channel) sometimes reaching up to 400 messages per second. Can it cause this kind of issues ??
Other problem can be that I have a queues representing websocket connections to my backend, these websocket connections are short living so it quite often declare and then remove a queue representing this user session. Is that a problem for Rabbitmq ?
From the Rabbitmq log I found following exceptions which were related to the connection crash:
First one :
2021-09-08 08:14:15.321 [error] <0.24867.686> ** Generic server <0.24867.686> terminating
** Last message in was {'$gen_cast',{method,{'basic.publish',0,<<"NOTIFICATION_EXCHANGE">>,<<"BROADCAST_NOTIFICATION_ADDRESS">>,false,false},{content,60,none,<<0,0>>,rabbit_framing_amqp_0_9_1,[<<"{MY_MESSAGE}">>]},flow}}
** When Server state == {ch,{conf,running,rabbit_framing_amqp_0_9_1,1,<0.24846.686>,<0.24862.686>,<0.24846.686>,<<"172.20.24.177:60848 -> 172.20.28.73:5672">>,undefined,{user,<<"backend">>,[],[{rabbit_auth_backend_internal,none}]},<<"backend">>,<<"8a4a4f71-251a-4ab6-85f6-50d594db46b9">>,<0.24850.686>,[{<<"exchange_exchange_bindings">>,bool,true},{<<"connection.blocked">>,bool,true},{<<"authentication_failure_close">>,bool,true},{<<"basic.nack">>,bool,true},{<<"publisher_confirms">>,bool,true},{<<"consumer_cancel_notify">>,bool,true}],none,200,134217728,900000,#{},1000000000},{lstate,<0.24877.686>,false},none,4927,{2,{[{4926,<<"amq.ctag-ckMzQHTLitAIZ86qk0_R0Q">>,1631088855286,{{'backend_SERVICE_QUEUE','rabbit#rabbitmq-server-2.rabbitmq-nodes.rabbitmq'},321}}],[{4925,<<"amq.ctag-xDoqkK1VmPptIM9OG3YaPw">>,1631088855286,{{'backend_SERVICE_QUEUE','rabbit#rabbitmq-server-2.rabbitmq-nodes.rabbitmq'},321}}]}},#{'backend_9fb541c5-a9ae-4bbc-99a4-ff444316b3f1' => {resource,<<"backend">>,queue,<<"9fb541c5-a9ae-4bbc-99a4-ff444316b3f1">>},'backend_5f188762-0a66-47e3-bfa8-76aa11481cb9' => {resource,<<"backend">>,queue,<<"5f188762-0a66-47e3-bfa8-76aa11481cb9">>},'backend_e4a3cec7-3f6f-4b05-bdf2-ade8a087425d' => {resource,<<"backend">>,queue,<<"e4a3cec7-3f6f-4b05-bdf2-ade8a087425d">>},'backend_e7a9834a-7ddc-4690-a317-4f19433edafd' => {resource,<<"backend">>,queue,<<"e7a9834a-7ddc-4690-a317-4f19433edafd">>},'backend_6fdcc521-4ff1-4721-bf12-cefffe1181eb' => ...,...},...}
** Reason for termination ==
** {{error,noproc},[{rabbit_fifo_client,enqueue,3,[{file,"src/rabbit_fifo_client.erl"},{line,168}]},{rabbit_quorum_queue,deliver,3,[{file,"src/rabbit_quorum_queue.erl"},{line,754}]},{rabbit_amqqueue,'-deliver/3-fun-3-',4,[{file,"src/rabbit_amqqueue.erl"},{line,2239}]},{lists,foldl,3,[{file,"lists.erl"},{line,1267}]},{rabbit_amqqueue,deliver,3,[{file,"src/rabbit_amqqueue.erl"},{line,2236}]},{rabbit_channel,deliver_to_queues,2,[{file,"src/rabbit_channel.erl"},{line,2204}]},{rabbit_channel,handle_method,3,[{file,"src/rabbit_channel.erl"},{line,1375}]},{rabbit_channel,handle_cast,2,[{file,"src/rabbit_channel.erl"},{line,643}]}]}
2021-09-08 08:14:15.321 [error] <0.24867.686> CRASH REPORT Process <0.24867.686> with 0 neighbours exited with reason: {error,noproc} in rabbit_fifo_client:enqueue/3 line 168 in gen_server2:terminate/3 line 1183
2021-09-08 08:14:15.322 [error] <0.24859.686> Supervisor {<0.24859.686>,rabbit_channel_sup} had child channel started with rabbit_channel:start_link(1, <0.24846.686>, <0.24862.686>, <0.24846.686>, <<"172.20.24.177:60848 -> 172.20.28.73:5672">>, rabbit_framing_amqp_0_9_1, {user,<<"backend">>,[],[{rabbit_auth_backend_internal,none}]}, <<"backend">>, [{<<"exchange_exchange_bindings">>,bool,true},{<<"connection.blocked">>,bool,true},{<<"authentica...">>,...},...], <0.24850.686>, <0.24877.686>) at <0.24867.686> exit with reason {error,noproc} in rabbit_fifo_client:enqueue/3 line 168 in context child_terminated
2021-09-08 08:14:15.322 [error] <0.24859.686> Supervisor {<0.24859.686>,rabbit_channel_sup} had child channel started with rabbit_channel:start_link(1, <0.24846.686>, <0.24862.686>, <0.24846.686>, <<"172.20.24.177:60848 -> 172.20.28.73:5672">>, rabbit_framing_amqp_0_9_1, {user,<<"backend">>,[],[{rabbit_auth_backend_internal,none}]}, <<"backend">>, [{<<"exchange_exchange_bindings">>,bool,true},{<<"connection.blocked">>,bool,true},{<<"authentica...">>,...},...], <0.24850.686>, <0.24877.686>) at <0.24867.686> exit with reason reached_max_restart_intensity in context shutdown
2021-09-08 08:14:15.323 [error] <0.24846.686> Error on AMQP connection <0.24846.686> (172.20.24.177:60848 -> 172.20.28.73:5672, vhost: 'backend', state: running), channel 1:
{{error,noproc},
[{rabbit_fifo_client,enqueue,3,
[{file,"src/rabbit_fifo_client.erl"},{line,168}]},
{rabbit_quorum_queue,deliver,3,
[{file,"src/rabbit_quorum_queue.erl"},{line,754}]},
{rabbit_amqqueue,'-deliver/3-fun-3-',4,
[{file,"src/rabbit_amqqueue.erl"},{line,2239}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1267}]},
{rabbit_amqqueue,deliver,3,[{file,"src/rabbit_amqqueue.erl"},{line,2236}]},
{rabbit_channel,deliver_to_queues,2,
[{file,"src/rabbit_channel.erl"},{line,2204}]},
{rabbit_channel,handle_method,3,
[{file,"src/rabbit_channel.erl"},{line,1375}]},
{rabbit_channel,handle_cast,2,
[{file,"src/rabbit_channel.erl"},{line,643}]}]}
2021-09-08 08:14:15.323 [warning] <0.24846.686> Non-AMQP exit reason '{{error,noproc},[{rabbit_fifo_client,enqueue,3,[{file,"src/rabbit_fifo_client.erl"},{line,168}]},{rabbit_quorum_queue,deliver,3,[{file,"src/rabbit_quorum_queue.erl"},{line,754}]},{rabbit_amqqueue,'-deliver/3-fun-3-',4,[{file,"src/rabbit_amqqueue.erl"},{line,2239}]},{lists,foldl,3,[{file,"lists.erl"},{line,1267}]},{rabbit_amqqueue,deliver,3,[{file,"src/rabbit_amqqueue.erl"},{line,2236}]},{rabbit_channel,deliver_to_queues,2,[{file,"src/rabbit_channel.erl"},{line,2204}]},{rabbit_channel,handle_method,3,[{file,"src/rabbit_channel.erl"},{line,1375}]},{rabbit_channel,handle_cast,2,[{file,"src/rabbit_channel.erl"},{line,643}]}]}'
Another one that I noticed is :
2021-09-02 14:59:43.260 [error] <0.17646.16> closing AMQP connection <0.17646.16> (172.20.23.201:35420 -> 172.20.36.197:5672):
missed heartbeats from client, timeout: 60s
2021-09-02 14:59:43.263 [info] <0.29592.28> Closing all channels from '172.20.23.201:35420 -> 172.20.36.197:5672' because it has been closed
And the last one :
2021-09-08 09:47:14.948 [warning] <0.7610.564> segment_writer: skipping segment as directory /var/lib/rabbitmq/mnesia/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/quorum/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/ORCHES3OXCNJJBB4VW does not exist
2021-09-08 09:47:14.948 [warning] <0.7611.564> segment_writer: failed to open segment file /var/lib/rabbitmq/mnesia/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/quorum/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/ORCHES0C5F3P5Y6WKO/00000001.segmenterror: enoent
2021-09-08 09:47:14.948 [warning] <0.199.564> segment_writer: failed to open segment file /var/lib/rabbitmq/mnesia/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/quorum/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/ORCHES9RZ4RFC37MDG/00000001.segmenterror: enoent
2021-09-08 09:47:14.948 [warning] <0.7611.564> segment_writer: skipping segment as directory /var/lib/rabbitmq/mnesia/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/quorum/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/ORCHES0C5F3P5Y6WKO does not exist
2021-09-08 09:47:14.948 [warning] <0.199.564> segment_writer: skipping segment as directory /var/lib/rabbitmq/mnesia/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/quorum/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/ORCHES9RZ4RFC37MDG does not exist
2021-09-08 09:47:14.950 [warning] <0.7600.564> segment_writer: failed to open segment file /var/lib/rabbitmq/mnesia/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/quorum/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/ORCHESAQL00HNNSPK4/00000001.segmenterror: enoent
2021-09-08 09:47:14.950 [warning] <0.7600.564> segment_writer: skipping segment as directory /var/lib/rabbitmq/mnesia/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/quorum/rabbit#rabbitmq-server-1.rabbitmq-nodes.rabbitmq/ORCHESAQL00HNNSPK4 does not exist
On the client side I noticed :
15:11:30.816 [vert.x-eventloop-thread-0]Fail to handle message
com.rabbitmq.client.AlreadyClosedException: connection is already closed due to connection error; cause: java.lang.IllegalStateException: Unsolicited delivery - see Channel.setDefaultConsumer to handle this case.
at com.rabbitmq.client.impl.AMQConnection.ensureIsOpen(AMQConnection.java:172)
at com.rabbitmq.client.impl.AMQConnection.createChannel(AMQConnection.java:550)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.createChannel(AutorecoveringConnection.java:165)
at io.vertx.rabbitmq.impl.RabbitMQClientImpl.forChannel(RabbitMQClientImpl.java:476)
at io.vertx.rabbitmq.impl.RabbitMQClientImpl.basicPublish(RabbitMQClientImpl.java:194)
at io.vertx.reactivex.rabbitmq.RabbitMQClient.basicPublish(RabbitMQClient.java:363)
at io.vertx.reactivex.rabbitmq.RabbitMQClient.lambda$rxBasicPublish$9(RabbitMQClient.java:376)
at io.vertx.reactivex.rabbitmq.RabbitMQClient$$Lambda$699/0x00000000102c38c0.accept(Unknown Source)
at io.vertx.reactivex.impl.AsyncResultCompletable.subscribeActual(AsyncResultCompletable.java:44)
or
08:14:15.330 [AMQP Connection 10.100.56.15:5672] WARN com.rabbitmq.client.impl.ForgivingExceptionHandler - An unexpected connection driver error occured (Exception message: Connection reset)
08:14:15.332 [AMQP Connection 10.100.56.15:5672] INFO io.vertx.rabbitmq.impl.RabbitMQClientImpl - RabbitMQ connection shutdown! The client will attempt to reconnect automatically
com.rabbitmq.client.ShutdownSignalException: connection error; protocol method: #method<connection.close>(reply-code=541, reply-text=INTERNAL_ERROR, class-id=0, method-id=0)
at com.rabbitmq.client.impl.AMQConnection.startShutdown(AMQConnection.java:916)
at com.rabbitmq.client.impl.AMQConnection.shutdown(AMQConnection.java:906)
at com.rabbitmq.client.impl.AMQConnection.handleConnectionClose(AMQConnection.java:844)
at com.rabbitmq.client.impl.AMQConnection.processControlCommand(AMQConnection.java:799)
at com.rabbitmq.client.impl.AMQConnection$1.processAsync(AMQConnection.java:242)
at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:178)
at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:111)
at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:650)
at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:48)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:597)
Since those errors are not clear to my, does anybody has an idea why is this happening ??
Thank you for your help

Related

RabbitMQ/AMQP channel/connection is not open

in our solution (LoRa WAN - Chirpstack application server and network server) we use RabbitMQ server. Frames are transported with use MQTT and AMQP depends on device. In last 2 months 2 times we noticed errors with AMQP.
To fix this we had to restart chirpstack-application-server. But in production it is not possible to always fix it in these way. Could you help me?
I saw that in v3.8.1 * Fix AMQP re-connect issue.
… but I am not sure that this bug was about same
network-server: 3.8.0
application-server: 3.9.0
RabbitMQ: 3.8.2 + Erlang 22.0.7
Output from journalctl:
May 17 11:24:19 loranet-srv-01.emitel.local chirpstack-application-server[32693]: time=“2021-05-17T11:24:19+02:00” level=error msg=“integration/multi: integration error” ctx_id=3c2a7651-03f0-4f34-9ac5-bbeaefce92f0 error=“publish event error: Exception (504) Reason: “channel/connection is not open”” integration="*amqp.Integration"
logs from RabbitMQ crash log:
2021-06-03 03:59:06.403 [info] <0.25055.366> connection <0.25055.366> (127.0.0.1:59682 → 127.0.0.1:5672): user ‘logstash’ authenticated and granted access to vhost ‘/’
2021-06-03 03:59:06.409 [info] <0.24970.366> connection <0.24970.366> (127.0.0.1:59684 → 127.0.0.1:5672): user ‘logstash’ authenticated and granted access to vhost ‘/’
2021-06-03 04:01:17.436 [warning] <0.32299.304> closing AMQP connection <0.32299.304> (10.93.0.1:60538 → 10.93.0.2:5672, vhost: ‘/’, user: ‘chirpstack_as’):
client unexpectedly closed TCP connection
2021-06-03 04:01:18.517 [info] <0.25425.366> MQTT vhost picked using plugin configuration or default
2021-06-03 04:01:18.711 [warning] <0.24203.212> MQTT disconnecting client “172.20.102.1:60372 → 10.93.0.2:1883” with duplicate id ‘logger-1334’
2021-06-03 04:01:18.712 [info] <0.25425.366> accepting MQTT connection <0.25425.366> (172.20.102.1:51255 → 10.93.0.2:1883, client id: logger-1334)
2021-06-03 04:01:24.927 [info] <0.25471.366> MQTT vhost picked using plugin configuration or default
2021-06-03 04:01:26.472 [warning] <0.24249.212> MQTT disconnecting client “172.20.102.1:60371 → 10.93.0.2:1883” with duplicate id ‘logger-2755’
2021-06-03 04:01:26.474 [info] <0.25471.366> accepting MQTT connection <0.25471.366> (172.20.102.1:51297 → 10.93.0.2:1883, client id: logger-2755)
2021-06-03 04:01:30.096 [info] <0.24814.366> MQTT vhost picked using plugin configuration or default
2021-06-03 04:01:31.290 [error] <0.32645.304> MQTT: a socket write failed, the socket might already be closed
2021-06-03 04:01:31.290 [info] <0.32645.304> MQTT connection “10.93.0.1:44382 → 10.93.0.2:1883” will terminate because peer closed TCP connection
2021-06-03 04:01:35.104 [error] <0.24814.366> MQTT cannot accept a connection: client ID registration timed out
2021-06-03 04:01:35.104 [error] <0.24814.366> MQTT cannot accept connection 10.93.0.1:35330 → 10.93.0.2:1883 due to an internal error or unavailable component
2021-06-03 04:01:36.291 [error] <0.32645.304> ** Generic server <0.32645.304> terminating
** Last message in was {tcp_closed,#Port<0.1814243>}
** When Server state == {state,#Port<0.1814243>,“10.93.0.1:44382 → 10.93.0.2:1883”,true,undefined,true,running,{none,<0.32296.304>},<0.32638.304>,false,none,{proc_state,#Port<0.1814243>,#{“application/+/device/+/tx” => [0]},{<<“amq.ctag
-YOowwvGDd4Gio7wHkLEpDQ”>>,undefined},{0,nil},{0,nil},undefined,1,“AckMrCeAAx2bHcmZcnfOzg”,true,undefined,{<0.32618.304>,undefined},<0.32622.304>,<<“amq.topic”>>,{amqp_adapter_info,{0,0,0,0,0,65535,2653,2},1883,{0,0,0,0,0,65535,2653,1},4
4382,<<“10.93.0.1:44382 → 10.93.0.2:1883”>>,{‘MQTT’,“N/A”},[{variable_map,#{<<“client_id”>> => <<“AckMrCeAAx2bHcmZcnfOzg”>>}},{channels,1},{channel_max,1},{frame_max,0},{client_properties,[{<<“product”>>,longstr,<<“MQTT client”>>},{clie
nt_id,longstr,<<“AckMrCeAAx2bHcmZcnfOzg”>>}]},{ssl,false}]},none,<0.530.0>,{auth_state,<<“chirpstack_as”>>,{user,<<“chirpstack_as”>>,[‘Chirpstack’],[{rabbit_auth_backend_internal,none}]},<<"/">>},#Fun<rabbit_mqtt_processor.0.50925783>,{0
,0,0,0,0,65535,2653,1},#Fun<rabbit_mqtt_util.4.100928214>,#Fun<rabbit_mqtt_util.5.100928214>},<0.32622.304>,{state,fine,5000,#Ref<0.2613465786.3301179395.25474>}}
** Reason for termination ==
** {{badmatch,{timeout,{mqtt_node,‘rabbit#loraapp-srv-01’}}},[{rabbit_mqtt_processor,close_connection,1,[{file,“src/rabbit_mqtt_processor.erl”},{line,900}]},{rabbit_mqtt_reader,do_terminate,2,[{file,“src/rabbit_mqtt_reader.erl”},{line,24
2}]},{gen_server2,terminate,3,[{file,“src/gen_server2.erl”},{line,1169}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,259}]}]}
** In ‘terminate’ callback with reason ==
** {shutdown,conn_closed}
2021-06-03 04:01:36.291 [error] <0.32645.304> CRASH REPORT Process <0.32645.304> with 1 neighbours exited with reason: no match of right hand value {timeout,{mqtt_node,‘rabbit#loraapp-srv-01’}} in rabbit_mqtt_processor:close_connection/1
line 900 in gen_server2:terminate/3 line 1172
2021-06-03 04:01:36.292 [error] <0.32621.304> Supervisor {<0.32621.304>,amqp_channel_sup} had child channel started with amqp_channel:start_link(direct, <0.32622.304>, 1, <0.32619.304>, {<<“10.93.0.1:44382 → 10.93.0.2:1883”>>,1}) at <0.
32618.304> exit with reason no match of right hand value {timeout,{mqtt_node,‘rabbit#loraapp-srv-01’}} in rabbit_mqtt_processor:close_connection/1 line 900 in context child_terminated
2021-06-03 04:01:36.292 [error] <0.32640.304> Supervisor {<0.32640.304>,rabbit_mqtt_connection_sup} had child rabbit_mqtt_reader started with rabbit_mqtt_reader:start_link(<0.32638.304>, {acceptor,{0,0,0,0,0,0,0,0},1883}) at <0.32645.304
exit with reason no match of right hand value {timeout,{mqtt_node,‘rabbit#loraapp-srv-01’}} in rabbit_mqtt_processor:close_connection/1 line 900 in context child_terminated
2021-06-03 04:01:36.292 [error] <0.32621.304> Supervisor {<0.32621.304>,amqp_channel_sup} had child channel started with amqp_channel:start_link(direct, <0.32622.304>, 1, <0.32619.304>, {<<“10.93.0.1:44382 → 10.93.0.2:1883”>>,1}) at <0.
32618.304> exit with reason reached_max_restart_intensity in context shutdown
2021-06-03 04:01:36.292 [error] <0.32640.304> Supervisor {<0.32640.304>,rabbit_mqtt_connection_sup} had child rabbit_mqtt_reader started with rabbit_mqtt_reader:start_link(<0.32638.304>, {acceptor,{0,0,0,0,0,0,0,0},1883}) at <0.32645.304
exit with reason reached_max_restart_intensity in context shutdown
2021-06-03 04:01:36.292 [error] <0.32622.304> ** Generic server <0.32622.304> terminating
** Last message in was {‘EXIT’,<0.32645.304>,{{badmatch,{timeout,{mqtt_node,‘rabbit#loraapp-srv-01’}}},[{rabbit_mqtt_processor,close_connection,1,[{file,“src/rabbit_mqtt_processor.erl”},{line,900}]},{rabbit_mqtt_reader,do_terminate,2,[{f
ile,“src/rabbit_mqtt_reader.erl”},{line,242}]},{gen_server2,terminate,3,[{file,“src/gen_server2.erl”},{line,1169}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,259}]}]}}
** When Server state == {state,amqp_direct_connection,{state,‘rabbit#loraapp-srv-01’,{user,<<“chirpstack_as”>>,[‘Chirpstack’],[{rabbit_auth_backend_internal,none}]},<<"/">>,{amqp_params_direct,<<“chirpstack_as”>>,<<“SUhIVgLkkrUfG6R/boaoY
Fhn9qAYI+ygy5qch5P7abl3ORsRMBTw4JnorNUjeMKW”>>,<<"/">>,‘rabbit#loraapp-srv-01’,{amqp_adapter_info,{0,0,0,0,0,65535,2653,2},1883,{0,0,0,0,0,65535,2653,1},44382,<<“10.93.0.1:44382 → 10.93.0.2:1883”>>,{‘MQTT’,“3.1.1”},[{variable_map,#{<<“c
lient_id”>> => <<“AckMrCeAAx2bHcmZcnfOzg”>>}},{channels,1},{channel_max,1},{frame_max,0},{client_properties,[{<<“product”>>,longstr,<<“MQTT client”>>},{client_id,longstr,<<“AckMrCeAAx2bHcmZcnfOzg”>>}]},{ssl,false}]},[]},{amqp_adapter_inf
o,{0,0,0,0,0,65535,2653,2},1883,{0,0,0,0,0,65535,2653,1},44382,<<“10.93.0.1:44382 → 10.93.0.2:1883”>>,{‘MQTT’,“3.1.1”},[{variable_map,#{<<“client_id”>> => <<“AckMrCeAAx2bHcmZcnfOzg”>>}},{channels,1},{channel_max,1},{frame_max,0},{client
_properties,[{<<“product”>>,longstr,<<“MQTT client”>>},{client_id,longstr,<<“AckMrCeAAx2bHcmZcnfOzg”>>}]},{ssl,false}]},<0.32624.304>,undefined,1621256199087},<0.32637.304>,{amqp_params_direct,<<“chirpstack_as”>>,<<“SUhIVgLkkrUfG6R/boaoY
Fhn9qAYI+ygy5qch5P7abl3ORsRMBTw4JnorNUjeMKW”>>,<<"/">>,‘rabbit#loraapp-srv-01’,{amqp_adapter_info,{0,0,0,0,0,65535,2653,2},1883,{0,0,0,0,0,65535,2653,1},44382,<<“10.93.0.1:44382 → 10.93.0.2:1883”>>,{‘MQTT’,“3.1.1”},[{variable_map,#{<<“c
lient_id”>> => <<“AckMrCeAAx2bHcmZcnfOzg”>>}},{channels,1},{channel_max,1},{frame_max,0},{client_properties,[{<<“product”>>,longstr,<<“MQTT client”>>},{client_id,longstr,<<“AckMrCeAAx2bHcmZcnfOzg”>>}]},{ssl,false}]},[]},0,[{<<“capabilities”>>,table,[{<<“publisher_confirms”>>,bool,true},{<<“exchange_exchange_bindings”>>,bool,true},…]},…],…}
** Reason for termination ==
** “stopping because dependent process <0.32645.304> died: {{badmatch,\n {timeout,\n {mqtt_node,\n ‘rabbit#loraapp-srv-01’}}},\n [{rabbit_mqtt_processor,\n close_connection,1,\n [{file,\n “src/rabbit_mqtt_processor.erl”},\n {line,900}]},\n {rabbit_mqtt_reader,\n do_terminate,2,\n [{file,\n “src/rabbit_mqtt_reader.erl”},\n {line,242}]},\n {gen_server2,\n terminate,3,\n [{file,\n “src/gen_server2.erl”},\n {line,1169}]},\n {proc_lib,wake_up,3,\n [{file,\n “proc_lib.erl”},\n {line,25…”
2021-06-03 04:01:36.293 [error] <0.32622.304> CRASH REPORT Process <0.32622.304> with 0 neighbours exited with reason: “stopping because dependent process <0.32645.304> died: {{badmatch,\n {timeout,\n {mqtt_node,\n ‘rabbit#loraapp-srv-01’}}},\n [{rabbit_mqtt_processor,\n close_connection,1,\n …” in gen_server:handle_common_reply/8 line 751
2021-06-03 04:01:36.293 [error] <0.32641.304> Supervisor {<0.32641.304>,amqp_connection_sup} had child connection started with amqp_gen_connection:start_link(<0.32651.304>, {amqp_params_direct,<<“chirpstack_as”>>,<<“SUhIVgLkkrUfG6R/boaoYFhn9qAYI+ygy5qch5P7abl3ORsRMBTw4Jn…”>>,…}) at <0.32622.304> exit with reason “stopping because dependent process <0.32645.304> died: {{badmatch,\n {timeout,\n {mqtt_node,\n ‘rabbit#loraapp-srv-01’}}},\n [{rabbit_mqtt_processor,\n close_connection,1,\n …” in context child_terminated
2021-06-03 04:01:36.293 [error] <0.32641.304> Supervisor {<0.32641.304>,amqp_connection_sup} had child connection started with amqp_gen_connection:start_link(<0.32651.304>, {amqp_params_direct,<<“chirpstack_as”>>,<<“SUhIVgLkkrUfG6R/boaoYFhn9qAYI+ygy5qch5P7abl3ORsRMBTw4Jn…”>>,…}) at <0.32622.304> exit with reason reached_max_restart_intensity in context shutdown
2021-06-03 04:01:36.293 [error] <0.295.305> ** Generic server <0.295.305> terminating
** Last message in was {‘EXIT’,<0.32618.304>,{{badmatch,{timeout,{mqtt_node,‘rabbit#loraapp-srv-01’}}},[{rabbit_mqtt_processor,close_connection,1,[{file,“src/rabbit_mqtt_processor.erl”},{line,900}]},{rabbit_mqtt_reader,do_terminate,2,[{file,“src/rabbit_mqtt_reader.erl”},{line,242}]},{gen_server2,terminate,3,[{file,“src/gen_server2.erl”},{line,1169}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,259}]}]}}
** When Server state == {ch,{conf,running,rabbit_framing_amqp_0_9_1,1,<0.32618.304>,<0.32618.304>,<0.32622.304>,<<“10.93.0.1:44382 → 10.93.0.2:1883”>>,undefined,{user,<<“chirpstack_as”>>,[‘Chirpstack’],[{rabbit_auth_backend_internal,none}]},<<"/">>,<<“mqtt-subscription-AckMrCeAAx2bHcmZcnfOzgqos0”>>,<0.32624.304>,[{<<“publisher_confirms”>>,bool,true},{<<“exchange_exchange_bindings”>>,bool,true},{<<“basic.nack”>>,bool,true},{<<“consumer_cancel_notify”>>,bool,true},{<<“connection.blocked”>>,bool,true},{<<“authentication_failure_close”>>,bool,true}],none,10,134217728,undefined,#{<<“client_id”>> => <<“AckMrCeAAx2bHcmZcnfOzg”>>}},{lstate,<0.289.305>,false},none,1,{0,{[],[]}},#{<0.458.0> => {resource,<<"/">>,queue,<<“mqtt-subscription-fe80:1:3:26002:1:1:1:27qos1”>>},<0.24213.212> => {resource,<<"/">>,queue,<<“mqtt-subscription-logger-2755qos0”>>},<0.24242.212> => {resource,<<"/">>,queue,<<“mqtt-subscription-logger-1422qos0”>>},<0.32291.304> => {resource,<<"/">>,queue,<<“mqtt-subscription-AckMrCeAAx2bHcmZcnfOzgqos0”>>},<0.6870.353> => {resource,<<"/">>,queue,<<“mqtt-subscription-mqtt_15e1c9e9.577696qos1”>>}},{state,#{<0.458.0> => #Ref<0.2613465786.3254779908.20375>,<0.24213.212> => #Ref<0.2613465786.3479699457.204624>,<0.24242.212> => #Ref<0.2613465786.3479699457.204623>,<0.32291.304> => #Ref<0.2613465786.3479699457.202162>,<0.6870.353> => #Ref<0.2613465786.3520331777.196060>},erlang},#{<<“amq.ctag-YOowwvGDd4Gio7wHkLEpDQ”>> => {{amqqueue,{resource,<<"/">>,queue,<<“mqtt-subscription-AckMrCeAAx2bHcmZcnfOzgqos0”>>},false,true,none,[],<0.32291.304>,[],[],[],undefined,undefined,[],[],live,0,[],<<"/">>,#{user => <<“chirpstack_as”>>},rabbit_classic_queue,#{}},{true,10,false,[]}}},#{<0.32291.304> => {1,{<<“amq.ctag-YOowwvGDd4Gio7wHkLEpDQ”>>,…}}},…}
** Reason for termination ==
** {{badmatch,{timeout,{mqtt_node,‘rabbit#loraapp-srv-01’}}},[{rabbit_mqtt_processor,close_connection,1,[{file,“src/rabbit_mqtt_processor.erl”},{line,900}]},{rabbit_mqtt_reader,do_terminate,2,[{file,“src/rabbit_mqtt_reader.erl”},{line,242}]},{gen_server2,terminate,3,[{file,“src/gen_server2.erl”},{line,1169}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,259}]}]}
2021-06-03 04:01:36.294 [error] <0.295.305> CRASH REPORT Process <0.295.305> with 0 neighbours exited with reason: no match of right hand value {timeout,{mqtt_node,‘rabbit#loraapp-srv-01’}} in rabbit_mqtt_processor:close_connection/1 line 900 in gen_server2:terminate/3 line 1183
2021-06-03 04:01:36.294 [error] <0.292.305> Supervisor {<0.292.305>,rabbit_channel_sup} had child channel started with rabbit_channel:start_link(1, <0.32618.304>, <0.32618.304>, <0.32622.304>, <<“10.93.0.1:44382 → 10.93.0.2:1883”>>, rabbit_framing_amqp_0_9_1, {user,<<“chirpstack_as”>>,[‘Chirpstack’],[{rabbit_auth_backend_internal,none}]}, <<"/">>, [{<<“publisher_confirms”>>,bool,true},{<<“exchange_exchange_bindings”>>,bool,true},{<<“basic.nack”>>,…},…], <0.32624.304>, <0.289.305>, {amqp_params_direct,<<“chirpstack_as”>>,<<“SUhIVgLkkrUfG6R/boaoYFhn9qAYI+ygy5qch5P7abl3ORsRMBTw4Jn…”>>,…}) at <0.295.305> exit with reason no match of right hand value {timeout,{mqtt_node,‘rabbit#loraapp-srv-01’}} in rabbit_mqtt_processor:close_connection/1 line 900 in context child_terminated
2021-06-03 04:01:36.294 [error] <0.292.305> Supervisor {<0.292.305>,rabbit_channel_sup} had child channel started with rabbit_channel:start_link(1, <0.32618.304>, <0.32618.304>, <0.32622.304>, <<“10.93.0.1:44382 → 10.93.0.2:1883”>>, rabbit_framing_amqp_0_9_1, {user,<<“chirpstack_as”>>,[‘Chirpstack’],[{rabbit_auth_backend_internal,none}]}, <<"/">>, [{<<“publisher_confirms”>>,bool,true},{<<“exchange_exchange_bindings”>>,bool,true},{<<“basic.nack”>>,…},…], <0.32624.304>, <0.289.305>, {amqp_params_direct,<<“chirpstack_as”>>,<<“SUhIVgLkkrUfG6R/boaoYFhn9qAYI+ygy5qch5P7abl3ORsRMBTw4Jn…”>>,…}) at <0.295.305> exit with reason reached_max_restart_intensity in context shutdown
2021-06-03 04:01:37.105 [info] <0.24828.366> MQTT vhost picked using plugin configuration or default
2021-06-03 04:01:42.113 [error] <0.24828.366> MQTT cannot accept a connection: client ID registration timed out
2021-06-03 04:01:42.113 [error] <0.24828.366> MQTT cannot accept connection 10.93.0.1:35338 → 10.93.0.2:1883 due to an internal error or unavailable component
2021-06-03 04:01:46.115 [info] <0.25564.366> MQTT vhost picked using plugin configuration or default
2021-06-03 04:01:46.662 [info] <0.25564.366> accepting MQTT connection <0.25564.366> (10.93.0.1:35358 → 10.93.0.2:1883, client id: 1M4VrmghPWJsSOFRncBEeA)
2021-06-04 03:07:30.005 [info] <0.26138.369> accepting AMQP connection <0.26138.369> (10.104.1.131:46242 → 10.93.0.2:5672)
{bad_header,<<“GET / HT”>>}
2021-06-04 03:07:35.040 [error] <0.26349.369> MQTT cannot parse a frame on connection ‘10.104.1.131:60008 → 10.93.0.2:1883’, unparseable payload: <<73,0,0,0,102,0,0,0>>, error: {{badmatch,<<>>}, [{rabbit_mqtt_frame,parse_frame,3,[{file,“src/rabbit_mqtt_frame.erl”},{line,104}]},{rabbit_mqtt_reader,parse,2,[{file,“src/rabbit_mqtt_reader.erl”},{line,358}]},{rabbit_mqtt_reader,process_received_bytes,2,[{file,“src/rabbit_mqtt_reader.erl”},{line,289}]},{gen_server2,handle_msg,2,[{file,“src/gen_server2.erl”},{line,1067}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,249}]}]}
2021-06-04 03:07:35.047 [info] <0.24610.369> accepting AMQP connection <0.24610.369> (10.104.1.131:48490 → 10.93.0.2:5672)
2021-06-04 03:07:35.047 [error] <0.24610.369> closing AMQP connection <0.24610.369> (10.104.1.131:48490 → 10.93.0.2:5672):
{bad_header,<<0,0,0,22,128,1,0,1>>}
2021-06-04 03:07:35.054 [info] <0.26587.369> accepting AMQP connection <0.26587.369> (10.104.1.131:48500 → 10.93.0.2:5672)
2021-06-04 03:07:35.054 [error] <0.26587.369> closing AMQP connection <0.26587.369> (10.104.1.131:48500 → 10.93.0.2:5672):
{bad_version,{0,0,0,0}}
2021-06-04 03:07:35.063 [info] <0.26586.369> accepting AMQP connection <0.26586.369> (10.104.1.131:48506 → 10.93.0.2:5672)
2021-06-04 03:07:35.068 [info] <0.26439.369> accepting AMQP connection <0.26439.369> (10.104.1.131:48512 → 10.93.0.2:5672)
2021-06-04 03:07:35.068 [error] <0.26439.369> closing AMQP connection <0.26439.369> (10.104.1.131:48512 → 10.93.0.2:5672):
{bad_version,{2,0,9,1}}
2021-06-04 03:07:36.067 [warning] <0.26586.369> closing AMQP connection <0.26586.369> (10.104.1.131:48506 → 10.93.0.2:5672):
client unexpectedly closed TCP connection
2021-06-04 03:08:22.338 [error] <0.28654.369> MQTT cannot parse a frame on connection ‘10.104.1.131:51810 → 10.93.0.2:1883’, unparseable payload: <<“GET / HTTP/1.1\r\nConnection: Close\r\nHost: loraapp-srv-01\r\nPragma: no-cache\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, /\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n”>>, error: {{badmatch,<<“T / HTTP/1.1\r\nConnection: Close\r\nHost: loraapp-srv-01\r\nPragma: no-cac”>>}, [{rabbit_mqtt_frame,parse_frame,3,[{file,“src/rabbit_mqtt_frame.erl”},{line,104}]},{rabbit_mqtt_reader,parse,2,[{file,“src/rabbit_mqtt_reader.erl”},{line,358}]},{rabbit_mqtt_reader,process_received_bytes,2,[{file,“src/rabbit_mqtt_reader.erl”},{line,289}]},{gen_server2,handle_msg,2,[{file,“src/gen_server2.erl”},{line,1067}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,249}]}]}

I have a RabbitMQ container that has regularly "unexpected_frame" exceptions, what does that mean?

I have an application that is pushing data into RabbitMQ and then some other apps are subscribing to the different exchanges.
But recently, I keep having errors like this after a few hours:
2020-07-09 12:45:12.670 [error] <0.23578.1> Error on AMQP connection <0.23578.1> (172.18.0.5:48230 ->
172.18.0.3:5672, vhost: '/', user: 'guest', state: running), channel 6:
operation basic.publish caused a connection exception unexpected_frame:
"expected content header for class 60, got non content"
2020-07-09 12:45:12.674 [info] <0.23578.1> closing AMQP connection <0.23578.1> (172.18.0.5:48230 ->
172.18.0.3:5672, vhost: '/'
On the client side, I get messages like this:
"Already closed: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer,
code=505, text='UNEXPECTED_FRAME - expected content body, got non content body frame instead',
classId=60, methodId=40"
This is on a docker container.
What could this error be about?
You are sharing a channel for concurrent publishing, use below code
lock (ch) { ch.BasicPublish(); }

Zookeeper can not run becuase of Invalid config

The problem is when I run "./zkServer.sh start" , zookeeper STRATED. But when I check the status, it shows:
Error contacting service. It is probably not running.
I create three nodes on vmware, and my config is
tickTime=2000
dataDir=/usr/src/zookeeper
clientPort=2181
initLimit=10
syncLimit=5
server.1=192.168.237.129:2888:3888
server.2=192.168.237.130:2888:3888
server.3=192.168.237.132:2888:3888
I've already created myid:
myid and zookeeper creates zookeeper_server.pid each time when I start zookeeper
Zookeper does not use myid, but creates a new random zookeeper_server.pid each time.
Below is the zookeeper.out:
2016-06-09 19:06:28,768 [myid:] - INFO [main:QuorumPeerConfig#103] - Reading configuration from: /usr/src/zookeeper-3.4.6/bin/../conf/zoo.cfg
2016-06-09 19:06:28,778 [myid:] - INFO [main:QuorumPeerConfig#340] - Defaulting to majority quorums
2016-06-09 19:06:28,779 [myid:] - ERROR [main:QuorumPeerMain#85] - Invalid config, exiting abnormally
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing /usr/src/zookeeper-3.4.6/bin/../conf/zoo.cfg
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:123)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:101)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Caused by: java.lang.IllegalArgumentException: /usr/src/zookeeper/myid file is missing
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:350)
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:119)
... 2 more
Invalid config, exiting abnormally

Red5 demo apps showing error

I am getting following while connecting to red5 demo apps :
NetConnection.Connect.Closed
[WARN] [ConnectionChecker-1] org.red5.server.net.rtmp.RTMPConnManager - Connection GN0PSGBZE63TF has exceeded the max inactivity threshold of 60000 ms
[INFO] [NioProcessor-5] org.red5.server.net.rtmp.RTMPMinaConnection - Connection is closed:
[WARN] [NioProcessor-5] org.red5.server.net.rtmp.RTMPMinaIoHandler - Connection was not found for GN0PSGBZE63TF
[ERROR] [RTMPConnectionExecutor-3] org.red5.server.service.ServiceInvoker - Method getApplicationList with parameters [] not found in org.red5.server.Context#4989fa8
[WARN] [RTMPConnectionExecutor-3] org.red5.server.service.ServiceInvoker - Service not found: installer
[WARN] [ConnectionChecker-1] org.red5.server.net.rtmp.RTMPConnManager - Connection Q6TFXYIXBD4T4 has exceeded the max inactivity threshold of 60000 ms
[INFO] [NioProcessor-9] org.red5.server.net.rtmp.RTMPMinaConnection - Connection is closed:
[WARN] [NioProcessor-9] org.red5.server.net.rtmp.RTMPMinaIoHandler - Connection was not found for Q6TFXYIXBD4T4
[root#vps red5]# ^C
A few things are happening here:
Your client connection is timing out
The method you attempted to call doesn't exist
The installer service isn't installed or running
Obviously I dont know what happened before the first line "NetConnection.Connect.Closed" so I can't assume much about that missing section. To fix 1-3, you probably just need to add the installer app to your install. Grab all the stuff in this location and put it in your red5/webapps/installer directory: https://github.com/Red5/red5-server/tree/master/src/main/server/webapps/installer

Apache Camel fails after proxy when hitting the endPoint. SocketException

Can someone provide your thoughts. what is going wrong on my configuration.
This was one approach:
public CamelContext camelContext() throws Exception {
final SpringCamelContext camelContext = new SpringCamelContext();
camelContext.getProperties().put("http.proxyHost","webproxy.lon.corp.services");
camelContext.getProperties().put("http.proxyPort","80");
camelContext.addRoutes(new CortellisRouteBuilder(env));
return camelContext;
}
Second Approach
https4://xxxxxx/xxxx/ws/rs/xx-v1/match?authUsername=someUsernamexxx&authPassword=xxxxxxxxx&authMethod=Digest&proxyHost=webproxy.services.xxx.com&proxyPort=80&proxyAuthScheme=http4
both does not work. below is the exception that i receive. it does 3 retires and then fails.
Exchange[
Id ID-UC193537-TPL-A-54917-1428598980021-0-2
ExchangePattern InOut
Headers {breadcrumbId=ID-UC193537-TPL-A-54917-1428598980021-0-1,
CamelAcceptContentType=application/x-www-form-urlencoded,
CamelHttpMethod=POST,camelHttpQuery=text=Paracetamol,
camelRedelivered=false, CamelRedeliveryCounter=0}
BodyType null
Body [Body is null]]
====================================================================
I/O exception (java.net.SocketException) caught when processing request:
Software caused connection abort: recv failed
2015-04-09 18:04:36,876 - INFO [http-apr-8080-exec-
4:HttpMethodDirector.executeWithRetry#445] - Retrying request
2015-04-09 18:04:37,015 - INFO [http-apr-8080-exec-
4:HttpMethodDirector.executeWithRetry#439] - I/O exception
(java.net.SocketException) caught when processing request: Software caused
connection abort: recv failed
2015-04-09 18:04:37,015 - INFO [http-apr-8080-exec-
4:HttpMethodDirector.executeWithRetry#445] - Retrying request
2015-04-09 18:04:37,167 - INFO [http-apr-8080-exec-
4:HttpMethodDirector.executeWithRetry#439] - I/O exception
(java.net.SocketException) caught when processing request: Software caused
connection abort: recv failed
2015-04-09 18:04:37,168 - INFO [http-apr-8080-exec-
4:HttpMethodDirector.executeWithRetry#445] - Retrying request
2015-04-09 18:04:37,298 - ERROR [http-apr-8080-exec-
4:MarkerIgnoringBase.error#161] - Failed delivery for (MessageId: ID-
UC193537-TPL-A-54917-1428598980021-0-1 on ExchangeId: ID-UC193537-TPL-A-
54917-1428598980021-0-2). Exhausted after delivery attempt: 1 caught:
java.net.SocketException: Software caused connection abort: recv failed
====================================================================
java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:173)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
at sun.security.ssl.InputRecord.read(InputRecord.java:480)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:934)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:709)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at
This error can occur when the local network system aborts a connection, see e.g. java.net.SocketException: Software caused connection abort: recv failed.
The proxy server may abort the connection. Can you try to connect to your service directly (= not through your proxy)?
cortellis.ontologiesNerUrl=https4://xxxx/ls-api-ws/ws/rs/xxxx-v1/ner?proxyPort=80&proxyHost=xxxxxxxx&authMethod=Basic&authUsername=TR_Internal_024&authPassword=ZTYA5S1KLF7WCDMN&**proxyAuthScheme=http4**
with addition of proxyAuthScheme=http4 it worked for rest based URL, But not for SOAP based URL
i have picked the latest camel version 2.15.1