Mongod command execution discovers that there is already a process running Mongod database--errno:48 Address already in use for socket:0.0.0.0:27017

Source: Internet
Author: User

Error message:

Listen (): Bind () failed errno:48 Address already in use for socket:0.0.0.0:27017

Port 27017 is already occupied

Complete error information

2016-10-24t23:46:56.314+0800 E NETWORK [Initandlisten] Listen (): Bind () failed errno:48 Address already in use for socket : 0.0.0.0:27017

2016-10-24t23:46:56.314+0800 E NETWORK [Initandlisten] addr already in use

2016-10-24t23:46:56.314+0800 E STORAGE [Initandlisten] Failed to set up sockets during startup.

2016-10-24t23:46:56.314+0800 I CONTROL [Initandlisten] dbexit:rc:48

Processing method: Input in Terminal:

PS aux | grep Mongod

Locate the corresponding process ID and kill:

Kill-9 PID

Such as

Execute the mongod command again to open the MongoDB service

Workaround under window:

http://stackoverflow.com/questions/34709062/failed-to-set-up-sockets-during-startup-dbexit-rc-48-error-in-mongodb/35650275

Find the process running on port 27017:

C:\Users\hughes> netstat -aon | findstr 27017 TCP 0.0.0.0:27017 0.0.0.0:0 LISTENING 3344

The last column shows the PID (3344). Find the process name for this PID:

C:\users\hughes>Tasklist/Fi"PID eq 3344"Image NamePidsession name session< Span class= "pun" ># mem usage ========================= ======== ================ ===========  ============virtualbox . exe 3344 console 1 101,908 K                  

For me it turned out that VirtualBox's port forwarding was the issue.

Mongod command execution discovers that there is already a process running Mongod database--errno:48 Address already in use for socket:0.0.0.0:27017

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.