mongo 포트 점용 문제 해결
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 CONTROL [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] build 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+0800 I CONTROL [initandlisten] options: {}
2016-08-03T14:31:15.692+0800 E NETWORK [initandlisten] listen(): bind() failed errno:48 Address already in use 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
왜냐하면 포트가 점용되었는데 어떡하지?
yishiyaonie:~ liuhanlin$ ps aux | grep mongod
liuhanlin 13664 1.3 0.0 2454296 824 s000 S+ 2:32 0:00.01 grep mongod
liuhanlin 73199 0.4 0.1 2588148 10240 ?? S 10 17:12.81 mongod
그런 다음 프로세스를 종료합니다.
yishiyaonie:~ liuhanlin$ kill -9 73199
그리고 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.998+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] build environment:
2016-08-03T14:33:50.998+0800 I CONTROL [initandlisten] distarch: x86_64
2016-08-03T14:33:50.998+0800 I CONTROL [initandlisten] target_arch: x86_64
2016-08-03T14: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 the 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 be 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 lost. OK
2016-08-03T14:33:52.243+0800 I NETWORK [initandlisten] connection accepted from 127.0.0.1:64066 #1 (1 connection now open)
2016-08-03T14:33:52.243+0800 I NETWORK [initandlisten] connection accepted from 127.0.0.1:64065 #2 (2 connections now 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 connections now open)
2016-08-03T14:33:52.244+0800 I NETWORK [initandlisten] connection accepted from 127.0.0.1:64062 #5 (5 connections 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-03T14:33:52.244+0800 I NETWORK [initandlisten] connection accepted from 127.0.0.1:64060 #7 (7 connections now open)
2016-08-03T14:33:52.244+0800 I NETWORK [initandlisten] connection accepted from 127.0.0.1:64059 #8 (8 connections now open)
2016-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 (10 connections now open)
2016-08-03T14:33:52.245+0800 I NETWORK [initandlisten] connection accepted from 127.0.0.1:64057 #11 (11 connections now open)
2016-08-03T14:33:52.245+0800 I NETWORK [initandlisten] connection accepted from 127.0.0.1:64055 #12 (12 connections now open)
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.