MongoDB 3.4 server is failing to start following a CentOS security update and reboot.

No configuration changes made. The previous update and reboot a couple of days earlier did not cause any problems. Could the CentOS update be the reason for the problem?

Many thanks, any thoughts are much appreciated!

Error messages in mongod.log

E NETWORK  [initandlisten] listen(): bind() failed Cannot assign requested address for socket: xxx.xxx.xxx.xxx:27017
E NETWORK  [initandlisten] Failed to set up sockets during startup.
E STORAGE  [initandlisten] Failed to set up listener: InternalError: Failed to set up sockets

The CentOS upgrade installed before the reboot

  kernel.x86_64 0:3.10.0-693.17.1.el7                                                                                               

  binutils.x86_64 0:2.25.1-32.base.el7_4.2                  device-mapper-persistent-data.x86_64 0:0.7.0-0.1.rc6.el7_4.1           
  dhclient.x86_64 12:4.2.5-58.el7.centos.1                  dhcp-common.x86_64 12:4.2.5-58.el7.centos.1                            
  dhcp-libs.x86_64 12:4.2.5-58.el7.centos.1                 initscripts.x86_64 0:9.49.39-1.el7_4.1                                 
  kernel-headers.x86_64 0:3.10.0-693.17.1.el7               kernel-tools.x86_64 0:3.10.0-693.17.1.el7                              
  kernel-tools-libs.x86_64 0:3.10.0-693.17.1.el7            kmod.x86_64 0:20-15.el7_4.7                                            
  kmod-libs.x86_64 0:20-15.el7_4.7                          kpartx.x86_64 0:0.4.9-111.el7_4.2                                      
  libdb.x86_64 0:5.3.21-21.el7_4                            libdb-utils.x86_64 0:5.3.21-21.el7_4                                   
  libgudev1.x86_64 0:219-42.el7_4.6                         net-snmp-libs.x86_64 1:5.7.2-28.el7_4.1                                
  systemd.x86_64 0:219-42.el7_4.6                           systemd-libs.x86_64 0:219-42.el7_4.6                                   
  systemd-sysv.x86_64 0:219-42.el7_4.6                      tuned.noarch 0:2.8.0-5.el7_4.2                                         
  • Hmmm, firewalld releated. There's a bespoke zone that didn't include the server's ip. Seems all working after I included the server's own IP address in that zone. Still have no explanation since I didn't make any changes to the firewall configuration or mongod neither were those packages included in the last CentOS update.
    – smile2day
    Jan 26, 2018 at 11:03

1 Answer 1


@smile2day, It's pretty clear from your error log

E NETWORK [initandlisten] listen(): bind() failed Cannot assign requested address for socket: xxx.xxx.xxx.xxx:27017

There is MongoDB 3.4 Server startup problem resist through bind() of IP, not from your CentOS update.

May be you have mistake of configuration of code. As i am able to see here in one straight line you are writing the bindIp with port number.

As MongoDB BOL documented Here should be separated in systemLog of mongod settings like such as

   port: 27017
  • Many thanks for your response and your thought - very much appreciated. mongod.conf included bindIp:,xxx.xxx.xxx.xxx and the port. mongod failed to start until I added the external IP as a source to the firewalld zone I've setup for mongo (the server is part of a replica set). Unexplained is that mongod started up fine after previous system updates. No configuration changes to the system (including firewalld) were made since.
    – smile2day
    Jan 29, 2018 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.