Sorry about the multiple threads post.
This is the /usr/local/var/log/rabbitmq/rab...@localhost.log=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Server startup complete; 10 plugins started.
* rabbitmq_management_visualiser
* rabbitmq_management
* rabbitmq_web_dispatch
* webmachine
* mochiweb
* rabbitmq_stomp
* rabbitmq_amqp1_0
* rabbitmq_mqtt
* rabbitmq_management_agent
* amqp_client
=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Statistics garbage collector started for table aggr_node_node_stats_coarse_node_node_stats with interval 5000.
=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Statistics garbage collector started for table aggr_connection_stats_coarse_conn_stats with interval 5000.
=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Statistics garbage collector started for table aggr_connection_stats_process_stats with interval 5000.
=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Statistics garbage collector started for table channel_stats with interval 5000.
=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Statistics garbage collector started for table connection_stats with interval 5000.
=INFO REPORT==== 24-Mar-2017::16:05:39 ===
accepting AMQP connection <0.26115.0> (
127.0.0.1:50227 ->
127.0.0.1:5672)
=INFO REPORT==== 24-Mar-2017::16:05:44 ===
accepting AMQP connection <0.26151.0> (
127.0.0.1:50228 ->
127.0.0.1:5672)
=WARNING REPORT==== 24-Mar-2017::16:05:47 ===
closing AMQP connection <0.26115.0> (
127.0.0.1:50227 ->
127.0.0.1:5672):
client unexpectedly closed TCP connection
=INFO REPORT==== 24-Mar-2017::16:05:49 ===
accepting AMQP connection <0.26203.0> (
127.0.0.1:50229 ->
127.0.0.1:5672)
=WARNING REPORT==== 24-Mar-2017::16:05:52 ===
closing AMQP connection <0.26151.0> (
127.0.0.1:50228 ->
127.0.0.1:5672):
client unexpectedly closed TCP connection
=WARNING REPORT==== 24-Mar-2017::16:05:57 ===
closing AMQP connection <0.26203.0> (
127.0.0.1:50229 ->
127.0.0.1:5672):
client unexpectedly closed TCP connection
and this is the code:
Exception occurs at the line connection = factory.newConnection();, so I'm sure I'm not closing any connections which cause the RabbitMQ problem.
I disabled the antivirus and firewall but problem persists.
private void connectToServer() throws Exception {
log.info("Attempting to create a connection factory");
ConnectionFactory factory = new ConnectionFactory();
factory.setRequestedHeartbeat(6000);
factory.setHost(server);
factory.setUsername(user);
factory.setPassword(password);
factory.setAutomaticRecoveryEnabled(true);
connection = factory.newConnection();
log.info("connection{}", connection);
channel = connection.createChannel();
}
Wireshark results:
Installed wireshark and observed the packets. There are a few red
coloured bad TCP packets, but the majority of TCP packets are purple, so
they seem to be going through.
No. Time Source Destination Protocol Length Info
1 0.000000 127.0.0.1 127.0.0.1 TCP 68 49258 → 4369 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=32 TSval=562020689 TSecr=0 SACK_PERM=1
2 0.000085 127.0.0.1 127.0.0.1 TCP 68 4369 → 49258 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=16344 WS=32 TSval=562020689 TSecr=562020689 SACK_PERM=1
3 0.000107 127.0.0.1 127.0.0.1 TCP 56 49258 → 4369 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562020689 TSecr=562020689
4 0.000123 127.0.0.1 127.0.0.1 TCP 56 [TCP Window Update] 4369 → 49258 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562020689
6 0.000204 127.0.0.1 127.0.0.1 TCP 56 4369 → 49258 [ACK] Seq=1 Ack=10 Win=408288 Len=0 TSval=562020689 TSecr=562020689
7 0.000227 127.0.0.1 127.0.0.1 EPMD 76 EPMD_PORT2_RESP OK rabbit port=25672
8 0.000242 127.0.0.1 127.0.0.1 TCP 56 4369 → 49258 [FIN, ACK] Seq=21 Ack=10 Win=408288 Len=0 TSval=562020689 TSecr=562020689
9 0.000246 127.0.0.1 127.0.0.1 TCP 56 49258 → 4369 [ACK] Seq=10 Ack=21 Win=408256 Len=0 TSval=562020689 TSecr=562020689
10 0.000263 127.0.0.1 127.0.0.1 TCP 56 49258 → 4369 [ACK] Seq=10 Ack=22 Win=408256 Len=0 TSval=562020689 TSecr=562020689
11 0.000269 127.0.0.1 127.0.0.1 TCP 56 [TCP Out-Of-Order] 4369 → 49258 [FIN, ACK] Seq=21 Ack=10 Win=408288 Len=0 TSval=562020689
12 0.000277 127.0.0.1 127.0.0.1 TCP 56 [TCP Dup ACK 6#1] 4369 → 49258 [ACK] Seq=22 Ack=10 Win=408288 Len=0 TSval=562020689
13 0.000284 127.0.0.1 127.0.0.1 TCP 56 [TCP Dup ACK 10#1] 49258 → 4369 [ACK] Seq=10 Ack=22 Win=408256 Len=0 TSval=562020689
14 0.000301 127.0.0.1 127.0.0.1 TCP 56 49258 → 4369 [FIN, ACK] Seq=10 Ack=22 Win=408256 Len=0 TSval=562020689 TSecr=562020689
15 0.000320 127.0.0.1 127.0.0.1 TCP 56 4369 → 49258 [ACK] Seq=22 Ack=11 Win=408288 Len=0 TSval=562020689 TSecr=562020689
20 34.738306 127.0.0.1 127.0.0.1 TCP 68 49265 → 5672 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=32 TSval=562055411 TSecr=0 SACK_PERM=1
21 34.738438 127.0.0.1 127.0.0.1 TCP 68 5672 → 49265 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=16344 WS=32 TSval=562055411 TSecr=562055411 SACK_PERM=1
22 34.738487 127.0.0.1 127.0.0.1 TCP 56 49265 → 5672 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562055411 TSecr=562055411
23 34.738534 127.0.0.1 127.0.0.1 TCP 56 [TCP Window Update] 5672 → 49265 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562055411
24 34.750146 127.0.0.1 127.0.0.1 AMQP 64 Protocol-Header 0-9-1
25 34.750187 127.0.0.1 127.0.0.1 TCP 56 5672 → 49265 [ACK] Seq=1 Ack=9 Win=408288 Len=0 TSval=562055422 TSecr=562055422
26 39.758239 127.0.0.1 127.0.0.1 TCP 56 49265 → 5672 [FIN, ACK] Seq=9 Ack=1 Win=408288 Len=0 TSval=562060425 TSecr=562055422
27 39.758282 127.0.0.1 127.0.0.1 TCP 56 5672 → 49265 [ACK] Seq=1 Ack=10 Win=408288 Len=0 TSval=562060425 TSecr=562060425
28 39.758299 127.0.0.1 127.0.0.1 TCP 56 [TCP Dup ACK 22#1] 49265 → 5672 [ACK] Seq=10 Ack=1 Win=408288 Len=0 TSval=562060425 TSecr=562060425
29 39.767564 127.0.0.1 127.0.0.1 TCP 68 49269 → 5672 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=32 TSval=562060434 TSecr=0 SACK_PERM=1
30 39.767625 127.0.0.1 127.0.0.1 TCP 68 5672 → 49269 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=16344 WS=32 TSval=562060434 TSecr=562060434 SACK_PERM=1
31 39.767644 127.0.0.1 127.0.0.1 TCP 56 49269 → 5672 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562060434 TSecr=562060434
32 39.767658 127.0.0.1 127.0.0.1 TCP 56 [TCP Window Update] 5672 → 49269 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562060434 TSecr=562060434
33 39.767876 127.0.0.1 127.0.0.1 AMQP 64 Protocol-Header 0-9-1
34 39.767910 127.0.0.1 127.0.0.1 TCP 56 5672 → 49269 [ACK] Seq=1 Ack=9 Win=408288 Len=0 TSval=562060434 TSecr=562060434
35 42.751610 127.0.0.1 127.0.0.1 AMQP 555 Connection.Start
36 42.751723 127.0.0.1 127.0.0.1 TCP 44 49265 → 5672 [RST] Seq=10 Win=0 Len=0
37 44.773437 127.0.0.1 127.0.0.1 TCP 56 49269 → 5672 [FIN, ACK] Seq=9 Ack=1 Win=408288 Len=0 TSval=562065436 TSecr=562060434
38 44.773467 127.0.0.1 127.0.0.1 TCP 56 5672 → 49269 [ACK] Seq=1 Ack=10 Win=408288 Len=0 TSval=562065436 TSecr=562065436
39 44.773479 127.0.0.1 127.0.0.1 TCP 56 [TCP Dup ACK 31#1] 49269 → 5672 [ACK] Seq=10 Ack=1 Win=408288 Len=0 TSval=562065436
40 44.775943 127.0.0.1 127.0.0.1 TCP 68 49272 → 5672 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=32 TSval=562065438 TSecr=0 SACK_PERM=1
41 44.776037 127.0.0.1 127.0.0.1 TCP 68 5672 → 49272 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=16344 WS=32 TSval=562065438 TSecr=562065438 SACK_PERM=1
42 44.776057 127.0.0.1 127.0.0.1 TCP 56 49272 → 5672 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562065438 TSecr=562065438