Page 1 of 1

/etc/hosts defines host name 'localhost' more than once

Posted: Thu Apr 27, 2017 11:23 am
by AaronD
I have encountered this error:

Code: Select all

/etc/hosts defines host name 'localhost' more than once
twice now while upgrading to 17.2 and while localhost was defined twice (once for ipv4 and once for ipv6 which is actually fine), the real problem was that the actual host name of the machine had been defined for two ipv4 addresses 127.0.0.1 and the actual ip address of the machine:

Code: Select all

127.0.0.1  localhost localhost.localdomain scrutinizer.mynetwork localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.1 scrutinizer.mynetwork
in both cases the solution was to remove the hostname from the 127.0.0.1 line:

Code: Select all

127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.1 scrunitizer.mynetwork
after that running the installer completed without incident.