Can't access RabbitMQ management after deploying to Fly

Hi all,

I appreciate this might not be a Fly related question, sorry if it’s a bit nooby.

I’ve been having trouble accessing the management UI after deploying RabbitMQ to Fly. Not only this, but I can’t make any http requests to the management rest api. Everything I do results in a ERR_CONNECTION_RESET

Interestingly I did get rabbit to work with my .NET application, it was consuming events so the non management side of it has been working, however that broke recently and I’m trying to find out why.

I always proxy both 5672 and 15672 when trying to work with it locally, so something I’m trying to do is PUT to localhost:15672/api/users/ but connection reset.

In my logs, I get these messages very frequently,

2023-10-30T17:06:29.598 app[d8d9349b35d5d8] lhr [info] 2023-10-30 17:06:29.597583+00:00 [debug] <0.2243.0> accepting AMQP connection <0.2243.0> (172.19.203.129:64888 -> 172.19.203.130:5672)

2023-10-30T17:06:29.598 app[d8d9349b35d5d8] lhr [info] 2023-10-30 17:06:29.597691+00:00 [debug] <0.2243.0> closing AMQP connection <0.2243.0> (172.19.203.129:64888 -> 172.19.203.130:5672):

2023-10-30T17:06:29.598 app[d8d9349b35d5d8] lhr [info] 2023-10-30 17:06:29.597691+00:00 [debug] <0.2243.0> connection_closed_with_no_data_received

2023-10-30T17:06:44.599 app[d8d9349b35d5d8] lhr [info] 2023-10-30 17:06:44.598725+00:00 [debug] <0.2250.0> accepting AMQP connection <0.2250.0> (172.19.203.129:41748 -> 172.19.203.130:5672)

2023-10-30T17:06:44.599 app[d8d9349b35d5d8] lhr [info] 2023-10-30 17:06:44.598844+00:00 [debug] <0.2250.0> closing AMQP connection <0.2250.0> (172.19.203.129:41748 -> 172.19.203.130:5672):

2023-10-30T17:06:44.599 app[d8d9349b35d5d8] lhr [info] 2023-10-30 17:06:44.598844+00:00 [debug] <0.2250.0> connection_closed_with_no_data_received

I’ve followed a very similar question in this community a lot when trying to get this working. My set up is very similar, but with a few changes. In that question, the port = "15672" threw errors for me in VSCode, so I changed it to be a number not a string and it stopped complaining.

I’m guessing this is something about fly networking that I’m missing?

Dockerfile

FROM rabbitmq:3.12.7-management-alpine
COPY ./prod.conf /etc/rabbitmq/rabbitmq.conf
RUN rabbitmq-plugins enable rabbitmq_management
EXPOSE 15672

I used the exact same management version as the one in the referenced questioned too, that had the same issues so I just upgraded to a later one. Pretty sure I don’t need that EXPOSE one too.

prod.conf

# listeners.http.default = 15672
listeners.tcp.default = 5672
default_user = u
default_pass = p
default_vhost = test
log.console = true
log.console.level = debug
management.listener.port = 15672
management.listener.ssl = false

fly.toml

app = "rabbit"
primary_region = "lhr"

[build]
  dockerfile = "Dockerfile"

# # rabbitmq main
[[services]]
  http_checks = []
  internal_port = 5672
  protocol = "tcp"
  script_checks = []

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "60s"


# rabbitmq admin
[[services]]
  http_checks = []
  internal_port = 15672
  protocol = "tcp"
  script_checks = []
  
  [[services.ports]]
    handlers = ["http"]
    port = 15672

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

Cheers! I’m at my wits end with this

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.