|Title: ||Unable to resolve host name localhost|
|Author: ||Michael Marxmeier|
Acessing the database may fail with an error message
X0: Unable to resolve host name localhost
Fatal error #-700 while opening database
Secondary status = -2
DBOPEN(9): REMOTE: Unable to connect server [-700:-2]
This message indicates a system configuration problem.
Eloquence fails to translate the host name "localhost"
(that indicates the local system) to the appropriate
IP address (127.0.0.1).
Usually this indicates that DNS lookup of hostnames
is configured for the system (the /etc/resolv.conf
file specifies a list of nameservers) but the DNS
server does not specify a localhost entry.
In addition the /etc/nsswitch.conf files does not
specify a fallback to /etc/hosts (or the /etc/hosts
configuration file does not include an entry for
How to fix it:
As a quick workaround the EQ_DBSERVER environment variable
could be used to speify a default server of 127.0.0.1 instead
of the builtin default localhost. This avoids the lookup for localhost.