I have a newly installed version of MongoDB (v3.2.0) on my Mac. When I try running the command mongod
I get this error:
listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:27017
Even though the result of $ lsof -i :27017
shows nothing is using that port.
Here is the terminal output:
Michaels-iMac:~ michael$ mongod
2016-01-07T13:38:00.097+0000 I CONTROL [initandlisten] MongoDB starting : pid=11485 port=27017 dbpath=/data/db 64-bit host=Michaels-iMac.home
2016-01-07T13:38:00.097+0000 I CONTROL [initandlisten] db version v3.2.0
2016-01-07T13:38:00.097+0000 I CONTROL [initandlisten] git version: 45d947729a0315accb6d4f15a6b06be6d9c19fe7
2016-01-07T13:38:00.098+0000 I CONTROL [initandlisten] allocator: system
2016-01-07T13:38:00.098+0000 I CONTROL [initandlisten] modules: none
2016-01-07T13:38:00.098+0000 I CONTROL [initandlisten] build environment:
2016-01-07T13:38:00.098+0000 I CONTROL [initandlisten] distarch: x86_64
2016-01-07T13:38:00.098+0000 I CONTROL [initandlisten] target_arch: x86_64
2016-01-07T13:38:00.098+0000 I CONTROL [initandlisten] options: {}
2016-01-07T13:38:00.098+0000 E NETWORK [initandlisten] listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:27017
2016-01-07T13:38:00.098+0000 E NETWORK [initandlisten] addr already in use
2016-01-07T13:38:00.098+0000 E STORAGE [initandlisten] Failed to set up sockets during startup.
2016-01-07T13:38:00.098+0000 I CONTROL [initandlisten] dbexit: rc: 48
Michaels-iMac:~ michael$
What am I missing here?