ECONNRESET

722 views
Skip to first unread message

Lukas Sekerak

unread,
Oct 26, 2018, 1:21:57 PM10/26/18
to rabbitmq-users
Hello,

we install RabbitMQ at Amazon EC2. Client can not connet to the server.
Client show this error message:

cause: { Error: read ECONNRESET
    at _errnoException (util.js:1024:11)
    at TCP.onread (net.js:618:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' },

Server logs show this error:
2018-10-26 17:00:37.347 [info] <0.21451.0> accepting AMQP connection <0.21451.0> (188.167.251.242:42991 -> 172.30.0.139:5672)
2018-10-26 17:00:47.343 [error] <0.21451.0> closing AMQP connection <0.21451.0> (188.167.251.242:42991 -> 172.30.0.139:5672):
{handshake_timeout,frame_header}


RabbitMQ status
[{pid,31106},
 {running_applications,
     [{rabbitmq_management,"RabbitMQ Management Console","3.7.8"},
      {rabbitmq_management_agent,"RabbitMQ Management Agent","3.7.8"},
      {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.7.8"},
      {cowboy,"Small, fast, modern HTTP server.","2.2.2"},
      {amqp_client,"RabbitMQ AMQP Client","3.7.8"},
      {cowlib,"Support library for manipulating Web protocols.","2.1.0"},
      {rabbit,"RabbitMQ","3.7.8"},
      {mnesia,"MNESIA  CXC 138 12","4.15.3.2"},
      {rabbit_common,
          "Modules shared by rabbitmq-server and rabbitmq-erlang-client",
          "3.7.8"},
      {ranch_proxy_protocol,"Ranch Proxy Protocol Transport","1.5.0"},
      {ranch,"Socket acceptor pool for TCP protocols.","1.5.0"},
      {ssl,"Erlang/OTP SSL application","8.2.6.2"},
      {public_key,"Public key infrastructure","1.5.2"},
      {asn1,"The Erlang ASN1 compiler version 5.0.5.1","5.0.5.1"},
      {recon,"Diagnostic tools for production use","2.3.2"},
      {os_mon,"CPO  CXC 138 46","2.4.4"},
      {xmerl,"XML parser","1.3.16"},
      {inets,"INETS  CXC 138 49","6.5.2.4"},
      {crypto,"CRYPTO","4.2.2.2"},
      {jsx,"a streaming, evented json parsing toolkit","2.8.2"},
      {lager,"Erlang logging framework","3.6.3"},
      {goldrush,"Erlang event stream processor","0.1.9"},
      {compiler,"ERTS  CXC 138 10","7.1.5.2"},
      {syntax_tools,"Syntax tools","2.1.4.1"},
      {syslog,"An RFC 3164 and RFC 5424 compliant logging framework.","3.4.3"},
      {sasl,"SASL  CXC 138 11","3.1.2"},
      {stdlib,"ERTS  CXC 138 10","3.4.5"},
      {kernel,"ERTS  CXC 138 10","5.4.3.2"}]},
 {os,{unix,linux}},
 {erlang_version,
     "Erlang/OTP 20 [erts-9.3.3.4] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:64] [hipe] [kernel-poll:true]\n"},
 {memory,
     [{connection_readers,0},
      {connection_writers,0},
      {connection_channels,0},
      {connection_other,16768},
      {queue_procs,16560},
      {queue_slave_procs,0},
      {plugins,1937904},
      {other_proc,23766480},
      {metrics,197680},
      {mgmt_db,339304},
      {mnesia,76200},
      {other_ets,2250600},
      {binary,608264},
      {msg_index,29296},
      {code,28635379},
      {atom,1131721},
      {other_system,10452476},
      {allocated_unused,16639288},
      {reserved_unallocated,0},
      {strategy,rss},
      {total,[{erlang,69458632},{rss,78901248},{allocated,86097920}]}]},
 {alarms,[]},
 {listeners,[{clustering,25672,"::"},{amqp,5672,"::"},{http,15672,"::"}]},
 {vm_memory_calculation_strategy,rss},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,821021900},
 {disk_free_limit,50000000},
 {disk_free,13505609728},
 {file_descriptors,
     [{total_limit,32668},
      {total_used,2},
      {sockets_limit,29399},
      {sockets_used,0}]},
 {processes,[{limit,1048576},{used,376}]},
 {run_queue,0},
 {uptime,12264},
 {kernel,{net_ticktime,60}}]


Client is "amqplib": "0.5.1".
Server URL is: amqp://admin:X...@18.204.222.X:5672

What i am doing wrong?


Michael Klishin

unread,
Oct 26, 2018, 3:53:52 PM10/26/18
to rabbitm...@googlegroups.com
There is a doc guide that covers connectivity troubleshootign [1].
"ECONNRESET" is UNIX wizard speak for "TCP connection was rejected by the server".
Perhaps your security group settings are worth revisiting. See [2]. 


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Lukas Sekerak

unread,
Oct 29, 2018, 9:29:27 AM10/29/18
to rabbitmq-users
Hello,

thank you for your help. I tried everything. Client have same problem. 

I prepare clean new server, with Rabbit MQ only.
All ports are open.

Can you help me with testing server? 

Server is created, user and password should be working. Web interface is working also on this machine.

2018-10-29 13:20:27.800 [warning] <0.764.0> closing AMQP connection <0.764.0> (95.102.177.65:57634 -> 172.30.0.254:5672):
{handshake_timeout,frame_header}

Kit Sirota

unread,
Oct 29, 2018, 11:23:30 AM10/29/18
to rabbitmq-users
Lukas,

This seems like security group issue somewhere in the AWS account.  My initial hunch was maybe you bound the AMQP port to the internal IP, but looking at your deployment its set to 0.0.0.0.

Also I just checked via telnet and I was able to hit your node via port 5672, did you change something?  

This goes without saying, since this environment is currently visible to the work and using default creds, I would not test any real code against this until you at least lock it down with a user and move it to an internal IP.  

Kit

Lukas Sekerak

unread,
Oct 29, 2018, 1:28:07 PM10/29/18
to rabbitmq-users
Hello Kit,

this is our test server, just to reproduce problem. You can you use it, test everything as you need. Soon we will turn it off.
Yeah, at AWS is inbound /out bound traffic opened from port 0 - 65000.

I explore all topics at Google group - there are similar problems with old Rabbit MQ 3.6. I am sure, that i install last version.
Now i am debugging via WireSharh - as you can see there is "Connection start" packet. Heh :D

So I really dont know what i am doing wrong. Are you able connect to the server?

Lukas


Skica.png

Lukas Sekerak

unread,
Oct 29, 2018, 3:13:17 PM10/29/18
to rabbitmq-users
Hello guys,

ty all for help. I find the problem . 

Problem is in the amqplib client library. With another library i am able to connect.
Also I find that amqplib is in the conflict with pmx library, which monitor ports.

Have a nice day

Lukas

Kit Sirota

unread,
Oct 30, 2018, 4:21:45 PM10/30/18
to rabbitmq-users
Glad to hear you got to the bottom of it.  Thanks for posting back with the resolution!

Lorenzo Solano

unread,
Jun 27, 2019, 12:16:34 PM6/27/19
to rabbitmq-users
Hi Lukas,


Having a similar issue, could you tell which library you finally use that was able to connect?


Tks in advance,


On Monday, October 29, 2018 at 3:13:17 PM UTC-4, Lukas Sekerak wrote:

Michael Klishin

unread,
Jun 30, 2019, 5:38:52 PM6/30/19
to rabbitmq-users
This list uses one question per thread. Please refrain from posting new questions to existing threads.

[1] is a good starting point for network connectivity issues.


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages