Perform Mongod error
Mongod 2016-08-03t14:31:15.691+0800 I control [Initandlisten] MongoDB starting:pid=13659 port=27017 dbpath=/data/db 64 -bit host=yishiyaonie.local 2016-08-03t14:31:15.691+0800 I control [Initandlisten] DB version v3.2.8 2016-08-03t14 : 31:15.691+0800 I control [initandlisten] git version:ed70e33130c977bda0024c125b56d159573dbaf0 2016-08-03T14 : 31:15.691+0800 i control [Initandlisten] OpenSSL Version:openssl 1.0.2h 3 May 2016 2016-08-03t14:31:15.691+0800 I CONT ROL [Initandlisten] allocator:system 2016-08-03t14:31:15.692+0800 I control [Initandlisten] Modules:none 2016-08-03T14 : 31:15.692+0800 i control [Initandlisten] builds environment:2016-08-03t14:31:15.692+0800 i control [Initandlisten] distarch:x86_64 2016-08-03t14:31:15.692+0800 I control [Initandlisten] target_arch:x86_64 2016-08-03t14:31:15.692+0 I control [Initandlisten] options: {} 2016-08-03t14:31:15.692+0800 E network [Initandlisten] Listen (): Bind () failed Errno:48 address already in with a for socket: 0.0.0.0:27017 2016-08-03t14:31:15.692+0800 E network [Initandlisten] addr already in use 2016-08-03t14:31:15.692+0800
E STORAGE [Initandlisten] Failed to set up sockets during startup.
2016-08-03t14:31:15.692+0800 I control [Initandlisten] dbexit:rc:48
The reason is that the port is occupied.
Do.
yishiyaonie:~ liuhanlin$ PS aux | grep mongod
Liuhanlin 13664 1.3 0.0 2454296 824 s000 s+ 2:32 pm 0:00.01 grep Mongod
liuhanlin 73199 0.4 0.1 2588148 ?? S 410 a.m. 17:12.81 Mongod
And then kill the process:
yishiyaonie:~ liuhanlin$ kill-9 73199
Then reboot OK:
yishiyaonie:~ liuhanlin$ mongod 2016-08-03t14:33:50.997+0800 I control [Initandlisten] MongoDB starting:pid=13681-port= 27017 dbpath=/data/db 64-bit host=yishiyaonie.local 2016-08-03t14:33:50.998+0800 I control [Initandlisten] DB version v3
.2.8 2016-08-03t14:33:50.998+0800 I control [Initandlisten] git version:ed70e33130c977bda0024c125b56d159573dbaf0 2016-08-03t14:33:50.998+0800 I control [Initandlisten] OpenSSL Version:openssl 1.0.2h 3 May 2016 2016-08-03t14:33:50.99
8+0800 I control [Initandlisten] Allocator:system 2016-08-03t14:33:50.998+0800 i control [Initandlisten] Modules:none 2016-08-03t14:33:50.998+0800 I control [Initandlisten] builds environment:2016-08-03t14:33:50.998+0800 i control [Inita Ndlisten] distarch:x86_64 2016-08-03t14:33:50.998+0800 I control [Initandlisten] target_arch:x86_64 2016-08-03T 14:33:50.998+0800 I control [Initandlisten] options: {} 2016-08-03t14:33:50.999+0800 I-[Initandlisten] Detected Data files in/data/db created by The ' Wiredtiger ' storage engine, so setting's active storage engine to ' Wiredtiger '.
2016-08-03t14:33:50.999+0800 W-[Initandlisten] detected unclean shutdown-/data/db/mongod.lock is not empty.
2016-08-03t14:33:50.999+0800 W STORAGE [Initandlisten] recovering data from the last clean checkpoint. 2016-08-03t14:33:51.000+0800 I STORAGE [Initandlisten] Wiredtiger_open config:create,cache_size=4g,session_max= 20000,eviction= (threads_max=4), config_base=false,statistics= (FAST), log= (enabled=true,archive=true,path=journal , Compressor=snappy), file_manager= (close_idle_time=100000), checkpoint= (WAIT=60,LOG_SIZE=2GB), statistics_log= ( wait=0), 2016-08-03t14:33:51.876+0800 i control [Initandlisten] 2016-08-03t14:33:51.876+0800 i control [Initandlisten] * * Warning:soft rlimits too low. Number of files is 256, should am at least 1000 2016-08-03t14:33:51.883+0800 I ftdc [Initandlisten] initializing full- Time diagnostic data capture with directory '/data/db/diagnostic.data ' 2016-08-03t14:33:51.883+0800 I Network [hostnamecanonicalizationworker] starting hostname canonicalization worker 2016-08-03T14 : 33:51.884+0800 i network [Initandlisten] waiting for connections on port 27017 2016-08-03t14:33:52.009+0800 I FTDC [ FTDC] Unclean full-time diagnostic data capture shutdown detected, found interim file, some metrics may have been. OK 2016-08-03t14:33:52.243+0800 I Network [Initandlisten] connection accepted from 127.0.0.1:64066 #1 (1 connection now O pen) 2016-08-03t14:33:52.243+0800 I Network [Initandlisten] connection accepted from 127.0.0.1:64065 #2 (2 connections No W Open) 2016-08-03t14:33:52.243+0800 I network [Initandlisten] connection accepted from 127.0.0.1:64064 #3 (3 connections Now OPEN) 2016-08-03t14:33:52.243+0800 I network [Initandlisten] connection accepted from 127.0.0.1:64063 #4 (4 connecti ONS now open 2016-08-03t14:33:52.244+0800 I network [Initandlisten] connection accepted from 127.0.0.1:64062 #5 (5 conne Ctions now Open) 2016-08-03t14:33:52.244+0800 I Network [Initandlisten] connection accepted from 127.0.0.1:64061 #6 (6 connections now OPEN) 2016-08-0 3t14:33:52.244+0800 I Network [Initandlisten] connection accepted from 127.0.0.1:64060 #7 (7 connections now OPEN) 2016-0 8-03t14:33:52.244+0800 I Network [Initandlisten] connection accepted from 127.0.0.1:64059 #8 (8 connections now OPEN) 201
6-08-03t14:33:52.244+0800 I Network [Initandlisten] connection accepted from 127.0.0.1:64058 #9 (9 connections now OPEN) 2016-08-03t14:33:52.244+0800 I Network [Initandlisten] connection accepted from 127.0.0.1:64056 #10 (a connections now O pen) 2016-08-03t14:33:52.245+0800 I Network [Initandlisten] connection accepted from 127.0.0.1:64057 #11 (connections Now OPEN) 2016-08-03t14:33:52.245+0800 I network [Initandlisten] connection accepted from 127.0.0.1:64055 #12 (connect
Ions now Open)