RabbitMQ works fine in the wifi network in which I set up the RabbitMQ in a laptop running Arch Linux. However, when I use the same laptop in a different wifi network, I get the following error:
machinery: worker.go:42: Going to retry launching the worker. Error: Dial: dial tcp 0.0.0.0:5672: getsockopt: connection refused
machinery: retry.go:20: Retrying in x seconds
I have no clue as to why RabbitMQ works in one network and not in the other. I tried changing the url in the /etc/rabbitmq/rabbitmq-env.conf
but there is no effect.
Here is the initial terminal output from RabbitMQ: `
machinery: worker.go:27: Launching a worker with the following settings:
machinery: worker.go:28: - Broker: amqp://0.0.0.0:5672
machinery: worker.go:29: - ResultBackend: amqp://0.0.0.0:5672
machinery: worker.go:30: - Exchange: machinery_exchange
machinery: worker.go:31: - ExchangeType: direct
machinery: worker.go:32: - DefaultQueue: machinery_tasks
machinery: worker.go:33: - BindingKey: machinery_key
`
First, I checked the status using:
sudo systemctl status rabbitmq
where, I got the message:
ERROR: epmd error for host "yourhostname": timeout (timed out establishing tcp connection)
Then, I addeded the following entry in /etc/hosts
:
127.0.0.1 yourhostname.localgroup yourhostname
Then, I restarted rabbitmq using:
sudo systemctl restart rabbitmq
I did not change any configuration in /etc/rabbitmq/rabbitmq-env.conf