Install/start fails when hostname is numeric

Bug #1529033 reported by Joseph Santaniello
This bug affects 2 people
Affects Status Importance Assigned to Milestone
rabbitmq-server (Ubuntu)

Bug Description

If a machine has a hostname made up entirely of numbers, install and start will fail reporting:

ERROR: epmd error for host "1234": badarg (unknown POSIX error)

This can be duplicated:

hostame 1234
echo localhost 1234 > /etc/hosts
apt-get install rabbitmq-server

results in:

Setting up rabbitmq-server (3.2.4-1) ...
 * Starting message broker rabbitmq-server * FAILED - check /var/log/rabbitmq/startup_\{log, _err\}
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error processing package rabbitmq-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

But try:

hostname testing
echo testing > /etc/hosts
apt-get install rabbitmq-server

and it works.

I'm not sure if this is a rabbitmq-server "bug" or an epmd (I always chuckle when I write that...) bug, but it cropped up when installing rabbitmq-server to play with OpenStack so I figured I'd submit it here.

Revision history for this message
Breno Leitão (breno-leitao) wrote :

I do not consider this as a bug, 'ping' is not able to work also.

➜ ~ hostnamectl
   Static hostname: 1610
         Icon name: computer-vm
           Chassis: vm
        Machine ID: da29c08f2e840385b1d700a257211f57
           Boot ID: f0dad3c50b2d42bb998955dee24cdef8
    Virtualization: kvm
  Operating System: Ubuntu 16.10
            Kernel: Linux 4.8.0-040800rc6-generic
      Architecture: ppc64-le
➜ ~ hostnamectl
➜ ~ ping 1610
connect: Invalid argument
➜ ~ cat /etc/hosts | grep 1610 1610

Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I'm pretty sure an all numeric hostname is considered just invalid by most measures. For example, along the same lines as Breno points out, "getent hosts 1234" returns nonsensical results.

So this is Won't Fix or Invalid by design across the Unix/Linux ecosystem I believe. RFC952/RFC1123 say that an all numeric hostname is invalid in DNS, so if you want the system to participate in DNS (ie. the Internet) then this does not make sense either.

Changed in rabbitmq-server (Ubuntu):
status: New → Invalid
Revision history for this message
Jeffrey Honig (jchonig) wrote :

RFC1123 explicitly states that an all numeric hostname valid:

 2.1 Host Names and Numbers

      The syntax of a legal Internet host name was specified in RFC-952
      [DNS:4]. One aspect of host name syntax is hereby changed: the
      restriction on the first character is relaxed to allow either a
      letter or a digit. Host software MUST support this more liberal

Changed in rabbitmq-server (Ubuntu):
status: Invalid → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in rabbitmq-server (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

I take that to mean that a system needs to cope with _other_ hosts having numeric hostnames when communicating with them over the Internet. It doesn't mandate that a given host must be able to be configured by its user to have a numeric Unix hostname. It's perfectly reasonable for a system architecture to have additional restrictions on its own hostname over what the Internet permits.

You have, at best, a wishlist item that Ubuntu (or other POSIX-like or Unix-like distributions if you wish) support all-numeric hostnames. Although you might want this for rabbitmq-server, it is really a general wishlist item, not one that is specific to rabbitmq-server.

I don't believe that this is something that will ever be supported by any Linux distribution because it goes quite deep into how underlying APIs operate - for example to tell the difference between a host specified by IP and a host specified by name.

If you want to take this further, re-opening the bug won't help. This is an architecture level wishlist item that would impact many packages. The appropriate bug status is somewhere between Invalid and Won't Fix because it isn't something that I believe the Ubuntu project (or even the wider ecosystem) considers to be a problem that is worth addressing.

Changed in rabbitmq-server (Ubuntu):
status: Confirmed → Invalid
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.