Processing
 

Unable to start MongoDB. ERROR: addr already in use

31/01/2015 15:39#1

leandrotk

Member

Joined at: 8 months ago

Post: 1

Thank: 0

Thanked: 0

I tried running MongoDB in local server with mongod command and it failed to run. The error:

mongod --help for help and startup options Sat Jan 31 13:07:16.392 [initandlisten] MongoDB starting : pid=5127 port=27017 dbpath=/data/db/ 64-bit host=leandrotk Sat Jan 31 13:07:16.392 [initandlisten] db version v2.4.9 Sat Jan 31 13:07:16.392 [initandlisten] git version: nogitversion Sat Jan 31 13:07:16.392 [initandlisten] build info: Linux orlo 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 BOOST_LIB_VERSION=1_54 Sat Jan 31 13:07:16.392 [initandlisten] allocator: tcmalloc Sat Jan 31 13:07:16.392 [initandlisten] options: {} Sat Jan 31 13:07:16.435 [initandlisten] journal dir=/data/db/journal Sat Jan 31 13:07:16.435 [initandlisten] recover : no journal files present, no recovery needed Sat Jan 31 13:07:16.513 [initandlisten] ERROR: listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:27017 Sat Jan 31 13:07:16.514 [initandlisten] ERROR:   addr already in use Sat Jan 31 13:07:16.514 [websvr] ERROR: listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:28017 Sat Jan 31 13:07:16.514 [initandlisten] now exiting Sat Jan 31 13:07:16.514 [websvr] ERROR:   addr already in use Sat Jan 31 13:07:16.514 dbexit:  Sat Jan 31 13:07:16.514 [initandlisten] shutdown: going to close listening sockets... Sat Jan 31 13:07:16.514 [initandlisten] shutdown: going to flush diaglog... Sat Jan 31 13:07:16.514 [initandlisten] shutdown: going to close sockets... Sat Jan 31 13:07:16.514 [initandlisten] shutdown: waiting for fs preallocator... Sat Jan 31 13:07:16.514 [initandlisten] shutdown: lock for final commit... Sat Jan 31 13:07:16.514 [initandlisten] shutdown: final commit... Sat Jan 31 13:07:16.599 [initandlisten] shutdown: closing all files... Sat Jan 31 13:07:16.599 [initandlisten] closeAllFiles() finished Sat Jan 31 13:07:16.599 [initandlisten] journalCleanup... Sat Jan 31 13:07:16.599 [initandlisten] removeJournalFiles Sat Jan 31 13:07:16.668 [initandlisten] shutdown: removing fs lock... Sat Jan 31 13:07:16.668 dbexit: really exiting now 
31/01/2015 15:43Top#2

Joined at: 12 months ago

Post: 2

Thank: 0

Thanked: 0

you already have a process running

killall mongod

should kill the other process, if you have another kind of process bound to that port you could find it with netstat | grep 27017

12/07/2016 12:01Top#3

Saroj Rai

Member

Joined at: 8 months ago

Post: 1

Thank: 0

Thanked: 0

Try this:

sudo service mongodb stop  sudo mongod 
Similar articles

Non-interactive method for dpkg-reconfigure tzdata

5 years ago - Reply: 3 - Views: 143

monit is not able to read mongod.lock

2 years ago - Reply: 3 - Views: 141

Ubuntu: hadoop command not found

2 years ago - Reply: 4 - Views: 244

C# Mono Console.ReadLine quitting

4 years ago - Reply: 1 - Views: 87

linking jsoncpp on Ubuntu

2 years ago - Reply: 1 - Views: 6

Build artifacts over ssh jenkins - PHP

3 years ago - Reply: 1 - Views: 38

Can't load Metasploit after installation

3 years ago - Reply: 5 - Views: 222

Selenium FirefoxDriver in Headless get error

2 years ago - Reply: 1 - Views: 97

Unable to start MongoDB. ERROR: addr already in use

2 years ago - Reply: 2 - Views: 120

ZSH Agnoster Theme showing machine name

2 years ago - Reply: 4 - Views: 250

Unable to start firefox browser with jenkins user

2 years ago - Reply: 2 - Views: 113

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re