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.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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):