PLEASE HELP me - RabbitMQ localhost management failing to launch with port 5672 errors in the log file

3,577 views
Skip to first unread message

Vyankatesh Suryawanshi

unread,
Nov 6, 2022, 9:26:06 PM11/6/22
to rabbitmq-users
Hello All,

I hope you all are doing good!


I have installed RabbitMQ version "rabbitmq-server-3.11.2.exe" and Erlang version "otp_win64_25.1.1.exe" on Windows 10 machine.

I am very new to RabbitMQ and I am unable to launch RabbitMQ management portal. I enabled the RabbitMQ management plugin as well.

Searched the internet with all sorts of suggestions on StackOverflow, Google groups and other forums and all of them failed.

In the log files I find a whole lot of errors like below.

2022-11-07 11:50:09.594000+10:00 [error] <0.697.0> Failed to start TCP listener [::]:5672, error: {{shutdown,
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                  {failed_to_start_child,
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                   {ranch_embedded_sup,
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                    {acceptor,
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                     {0,0,0,0,0,0,0,0},
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                     5672}},
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                   {shutdown,
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                    {failed_to_start_child,
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                     {ranch_listener_sup,
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                      {acceptor,
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                       {0,0,0,0,0,0,0,0},
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                       5672}},
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                     {shutdown,
2022-11-07 11:50:09.594000+10:00 [error] <0.697.0>                                                      {failed_to_start_child,

2022-11-07 11:50:09.594000+10:00 [error] <0.704.0> Failed to start Ranch listener {acceptor,{0,0,0,0,0,0,0,0},5672} in ranch_tcp:listen(#{connection_type => supervisor,handshake_timeout => 5000,max_connections => infinity,num_acceptors => 10,num_conns_sups => 1,socket_opts => [{cacerts,'...'},{key,'...'},{cert,'...'},{ip,{0,0,0,0,0,0,0,0}},{port,5672},inet6,{backlog,128},{nodelay,true},{linger,{true,0}},{exit_on_close,false}]}) for reason eacces (permission denied)

=erl_crash_dump:0.5
Mon Nov  7 12:50:21 2022
Slogan: init terminating in do_boot ({error,{could_not_start_listener,::,5672,{{shutdown,{_}},{child,undefined,rabbit_tcp_listener_sup_:::5672,{

I have disabled McAfee firewall, I have added port 5672 to McAfee firewall, reinstalled the app at least 10 times, opened the port 5672 in windows firewall security, tried on docker images as well but my 3 days efforts failed to start it.

I have attached RabbitMQ and Erlang log files in here, please provide your valuable suggestions.

Great thanks for your kind consideration.

Regards,
Vyankatesh
RabbitMQ error screen.JPG
erl_crash.dump
rabbit@DESKTOP-1G4MV0I.log

Vilius Šumskas

unread,
Nov 7, 2022, 12:59:22 AM11/7/22
to rabbitm...@googlegroups.com

Hi,

 

you are probably running another instance of RabbitMQ or something else on port 5672 on the same machine.

 

Get-Process -Id (Get-NetTCPConnection -LocalPort 5672).OwningProcess

 

in PowerShell should show you what‘s occupying it.

 

--

    Vilius

--
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 view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/63731dd6-eb78-4fd1-882f-28919b47cd8bn%40googlegroups.com.

Vyankatesh Suryawanshi

unread,
Nov 7, 2022, 5:19:55 AM11/7/22
to rabbitmq-users
Hi Vilius,

I was struggling for last 3 days to understand the root cause of it and I cannot thank you enough for this help!!! :-)

When I ran the command provided by you in PS it showed that Java process was occupying port 5671.
I uninstalled Java, restarted the RabbitMQ service in services.msc, enabled RabbitMQ mgmt plugins and BOOM!

It worked like a charm, thanks once again!

Now, the question in my mind since Java also needs same port like rabbitmq which 5672 then what will happen if somebody needs both of them.

Thanks!

Vilius Šumskas

unread,
Nov 7, 2022, 8:03:53 AM11/7/22
to rabbitm...@googlegroups.com

JVM (or Java as you call it) doesn‘t need any ports. It‘s just a vehicle to launch Java applications.

 

If any of your Java applications require the same port as RabbitMQ and you require them to run on the same machine you have an usual option, either change listening port of your Java application or change listener port of RabbitMQ. See https://www.rabbitmq.com/networking.html#interfaces

Vyankatesh Suryawanshi

unread,
Nov 7, 2022, 7:43:39 PM11/7/22
to rabbitmq-users
Thank you Vilius for kind response, appreciate it!

Since I have installed RabbitMQ server on my personal local laptop successfully. 
I am using .NET application on my local machine to connect to this rabbitmq on my same local machine.

Now, the question in my mind is whether the port number 5672 is needed only by RabbitMQ server or only by client (my local machine) or this port 5672 is needed both at client and sever locations?

Many thanks!
Vyankatesh

Michal Kuratczyk

unread,
Nov 8, 2022, 1:55:51 AM11/8/22
to rabbitm...@googlegroups.com
Hi,

This has little to do with RabbitMQ as such - it's about how the TCP protocol works. Generally speaking, you have a server listening on a port, usually a well-known port (eg. 80 for HTTP, 443 for HTTPS, 5672 for AMQP) and a client app that will get a random port assigned for the duration of a connection. When both the client and the server are on the same machine you use two ports, but only the server uses the well known port (5672). Indeed, two different servers can't listen on the same port on the same IP address though.

For example, here I have 3 local connections to a local RabbitMQ server (screenshot from RabbitMQ Management UI). 39696, 39710 and 39720 are source ports for these connections and they are all connected to 127.0.0.1:5672 (not pictured here, it kind of assumed because it's RabbitMQ listing the connections):
Screenshot 2022-11-08 at 07.52.32.png

Best,



--
Michał
RabbitMQ team
Reply all
Reply to author
Forward
Message has been deleted
0 new messages