Mongod Failed to get address information for OS X hostname

You are having trouble running mongo using mongod -dbpath. I get the following error:

NETWORK  [HostnameCanonicalizationWorker] Failed to obtain address information for hostname ##########: nodename nor servname provided, or not known

The host name has only latin characters. I tried several networks, deleted all the DNS records, confirmed that my / etc / hosts look fine, and now I'm at rest.

Here is my / etc / hosts:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
#::1             localhost  
+4
source share
3 answers

Try turning on ipv6 and restarting the mongod server

::1             localhost
0
source

I followed the answer in this JIRA .

And here is my /etc/hostsfile.

  1 ##
  2 # Host Database
  3 #
  4 # localhost is used to configure the loopback interface
  5 # when the system is booting.  Do not change this entry.
  6 ##
  7 # 127.0.0.1 localhost
  8 127.0.0.1 localhost localhost.localdomain
  9 255.255.255.255 broadcasthost
 10 # ::1             localhost
0
source

HOSTNAME /etc/sysconfig/network:

HOSTNAME=Steven

/etc/hosts:

127.0.0.1 localhost localhost.localdomain ...............

127.0.0.1 localhost Steven  ...............
-2

All Articles