rabbitmq fails to start unless /etc/hosts is set a specific way

Bug #1199474 reported by frotz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
rabbitmq-server (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

As described in http://comments.gmane.org/gmane.comp.networking.rabbitmq.general/18293, rabbitmq fails to start if /etc/hosts does not contain a line causing the hostname to resolve to 127.0.0.1. In other words, /etc/hosts needs to have a line like this if the host in question is named "dopey".

127.0.0.1 localhost dopey

Doing this to /etc/hosts is not necessarily a desirable thing

Tags: hosts rabbitmq
Changed in rabbitmq-server (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
frotz (frotz) wrote :

Not only is the workaround potentially undesirable, it can be extremely infuriating when trying to figure out why RabbitMQ won't start.

Revision history for this message
Simon MacMullen (simon-macmullen) wrote :

Please see what I said in that thread:

http://permalink.gmane.org/gmane.comp.networking.rabbitmq.general/18295

The assertion that the hostname needs to resolve to 127.0.0.1 via /etc/hosts is untrue. The hostname needs to resolve to an IP address of the machine, via DNS or /etc/hosts or whatever.

Note also that the OP in that thread eventually traced their problem to a firewall.

James Page (james-page)
Changed in rabbitmq-server (Ubuntu):
status: New → Confirmed
Changed in rabbitmq-server (Ubuntu):
assignee: nobody → MD NADEEM (mail2nadeem92)
Changed in rabbitmq-server (Ubuntu):
assignee: MD NADEEM (mail2nadeem92) → nobody
Revision history for this message
jokins (jokins3532) wrote :

RabbitMQ failing to start unless the /etc/hosts file is configured in a specific way could indicate a DNS or hostname resolution issue. RabbitMQ heavily relies on proper hostname resolution for its internal communication and clustering. If you're facing such a situation, here are steps you can take to address it:

Check RabbitMQ Logs:
Examine RabbitMQ logs to identify any specific error messages related to hostname resolution or networking.

DNS Configuration:
Ensure that your server's DNS configuration is correct. Verify that it can resolve both forward and reverse DNS queries for itself and other nodes in the cluster.

Hostname Consistency:
Check that the hostname configured in your system matches the hostname used in RabbitMQ's configuration. Inconsistent hostnames can cause communication issues.

IP Address vs Hostname:
RabbitMQ sometimes prefers using IP addresses instead of hostnames. Ensure that your /etc/hosts file contains both the IP address and hostname of the RabbitMQ node.

Node Names:
RabbitMQ nodes should have unique and consistent names. These names should be resolvable among each other.

Clustering Configuration:
If you are running a RabbitMQ cluster, ensure that each node's configuration (including the /etc/hosts entries) is consistent across the cluster.

Check Loopback Addresses:
Sometimes, using the loopback address (127.0.0.1 or localhost) can cause issues. Consider using the actual IP address or hostname in your configurations.

Network Interfaces:
Check if your network interfaces are properly configured and active. A misconfigured network interface can lead to hostname resolution problems.

Firewall and Security Software:
Firewall rules and security software might interfere with network communication. Ensure that necessary ports are open and RabbitMQ is allowed to communicate.

Restart Services:
After making changes to /etc/hosts or other configurations, restart RabbitMQ and related services to ensure the changes take effect.

Consult RabbitMQ Documentation:
RabbitMQ's official documentation might have specific troubleshooting steps related to networking and hostname resolution.

Seek Professional Help:
If the issue persists, it might be worth seeking assistance from professionals who are experienced with RabbitMQ and network troubleshooting.

Remember that improper changes to system configurations can lead to unexpected issues. Always backup your configuration files and system settings before making any changes, and proceed with caution.https://www.uvadhesiveglue.com/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.