Failed to start Ranch listener {acceptor,{0,0,0,0,0,0,0,0},15672}

715 views
Skip to first unread message

Marvin Reichmann

unread,
Nov 17, 2020, 9:57:06 AM11/17/20
to rabbitmq-users
I changed the Port to 15678 via config, it shows up in the log as well, but ranch listener is still trying to start on 15672. am i missing a config option somewhere?

LOG:

2020-11-17 14:29:35.923 [info] <0.694.0> Running boot step rabbit_mgmt_reset_handler defined by app rabbitmq_management

2020-11-17 14:29:35.923 [info] <0.694.0> Running boot step rabbit_management_load_definitions defined by app rabbitmq_management

2020-11-17 14:29:35.970 [info] <0.759.0> Management plugin: HTTP (non-TLS) listener started on port 15678

2020-11-17 14:29:36.011 [error] <0.865.0> Failed to start Ranch listener {acceptor,{0,0,0,0,0,0,0,0},15672} in ranch_tcp:listen([{cacerts,'...'},{key,'...'},{cert,'...'},{port,15672}]) for reason eaddrinuse (address already in use)
2020-11-17 14:29:36.012 [info] <0.863.0> supervisor: {<0.863.0>,ranch_listener_sup}, errorContext: start_error, reason: {listen_error,{acceptor,{0,0,0,0,0,0,0,0},15672},eaddrinuse}, offender: [{pid,undefined},{id,ranch_acceptors_sup},{mfargs,{ranch_acceptors_sup,start_link,[{acceptor,{0,0,0,0,0,0,0,0},15672},ranch_tcp]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]
2020-11-17 14:29:36.012 [error] <0.863.0> Supervisor {<0.863.0>,ranch_listener_sup} had child ranch_acceptors_sup started with ranch_acceptors_sup:start_link({acceptor,{0,0,0,0,0,0,0,0},15672}, ranch_tcp) at undefined exit with reason {listen_error,{acceptor,{0,0,0,0,0,0,0,0},15672},eaddrinuse} in context start_error
{removed_failing_handle2020-11-17 14:29:36.012 [info] <0.865.0> [{initial_call,{supervisor,ranch_acceptors_sup,['Argument__1']}},{pid,<0.865.0>},{registered_name,[]},{error_info,{exit,{listen_error,{acceptor,{0,0,0,0,0,0,0,0},15672},eaddrinuse},[{ranch_acceptors_sup,listen_error,5,[{file,"src/ranch_acceptors_sup.erl"},{line,66}]},{supervisor,init,1,[{file,"supervisor.erl"},{line,301}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,417}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,385}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}},{ancestors,[<0.863.0>,rabbit_web_dispatch_sup,<0.749.0>]},{message_queue_len,0},{messages,[]},{links,[<0.863.0>]},{dictionary,[{logger,error_logger}]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,28},{reductions,1390}], []
r,rabbit_log}

Luke Bakken

unread,
Nov 17, 2020, 11:48:46 AM11/17/20
to rabbitmq-users
Hi Marvin,

We can't assist without the following information:
  • RabbitMQ and Erlang version.
  • A full copy of all RabbitMQ configuration files. Attach to your response.
Thanks,
Luke

Marvin Reichmann

unread,
Nov 18, 2020, 4:52:10 AM11/18/20
to rabbitmq-users
I'm using rabbitmq v3.8.9 with management plugin. no idea what erlang version that equates to.
I have tried using multiple different docker images from the official rabbitmq dockerhub. error persists no matter what.

it seems to me as if cowboy is still trying to allocate port 15672 despite being configured otherwise.
I already tried excluding consul from the equation, but that made no difference as expected.

my rabbitmq.conf below, everything else is default.

loopback_users.guest = false
listeners.tcp.default = 5678
management.tcp.port = 15678
prometheus.tcp.port = 15698
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_consul
cluster_formation.consul.host = localhost
cluster_formation.consul.port = 8501
cluster_formation.consul.scheme = https
cluster_formation.consul.svc_addr_auto = true
cluster_formation.consul.svc_addr_use_nodename = false
cluster_formation.consul.include_nodes_with_warnings = true

Luke Bakken

unread,
Nov 18, 2020, 8:43:18 AM11/18/20
to rabbitmq-users
Hello,

Your configuration file appears correct. Please attach a complete log file as well. 

Since you're using docker we need to know how you're starting the container. Ideally, provide a way for us to reproduce the problem.

Thanks,
Luke

Marvin Reichmann

unread,
Nov 18, 2020, 8:47:37 AM11/18/20
to rabbitmq-users
I just managed to 'fix' the issue by explicitly defining an management.ssl.port as well. 
As I'm not using SSL in this setup i just put some dummy cert in there to suppress the following ssl cert error, but it seems by defining an SSL port cowboy seems to let go of the default port somehow.

rather strange. or is this the intended behavior? the documentation does not seem to mention this.

Kind Regards,

Marvin

Luke Bakken

unread,
Nov 18, 2020, 8:54:47 AM11/18/20
to rabbitmq-users
Hi Marvin,

That should not be necessary. Providing your complete log file would help, as well as a docker file I could run to see the same issue.

Thanks,
Luke

Marvin Reichmann

unread,
Nov 18, 2020, 9:21:40 AM11/18/20
to rabbitmq-users
Hi Luke,

I attached the Dockerfile I use and the log file from a run without my 'Fix'. 
I can reproduce this issue every single time with this configuration.

Kind Regards,

Marvin

rmq.zip
Reply all
Reply to author
Forward
0 new messages