DataBase/NoSQL

MongoDB configSvr Error

Dev.BeryL 2022. 1. 26. 20:20
728x90
```bash
2021-11-24T17:45:23.098+0900 I CONTROL  [initandlisten] MongoDB starting : pid=16190 port=27017 dbpath=/data/mongo/shard/db 64-bit host=storage-0
2021-11-24T17:45:23.098+0900 I CONTROL  [initandlisten] db version v3.6.3
2021-11-24T17:45:23.098+0900 I CONTROL  [initandlisten] git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
2021-11-24T17:45:23.098+0900 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.1  11 Sep 2018
2021-11-24T17:45:23.098+0900 I CONTROL  [initandlisten] allocator: tcmalloc
2021-11-24T17:45:23.098+0900 I CONTROL  [initandlisten] modules: none
2021-11-24T17:45:23.098+0900 I CONTROL  [initandlisten] build environment:
2021-11-24T17:45:23.099+0900 I CONTROL  [initandlisten]     distarch: x86_64
2021-11-24T17:45:23.099+0900 I CONTROL  [initandlisten]     target_arch: x86_64
2021-11-24T17:45:23.099+0900 I CONTROL  [initandlisten] options: { repair: true, storage: { dbPath: "/data/mongo/shard/db" } }
2021-11-24T17:45:23.099+0900 W -        [initandlisten] Detected unclean shutdown - /data/mongo/shard/db/mongod.lock is not empty.
2021-11-24T17:45:23.099+0900 I -        [initandlisten] Detected data files in /data/mongo/shard/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2021-11-24T17:45:23.099+0900 W STORAGE  [initandlisten] Recovering data from the last clean checkpoint.
2021-11-24T17:45:23.099+0900 I STORAGE  [initandlisten] Detected WT journal files.  Running recovery from last checkpoint.
2021-11-24T17:45:23.099+0900 I STORAGE  [initandlisten] journal to nojournal transition config: create,cache_size=31530M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2021-11-24T17:45:23.698+0900 E STORAGE  [initandlisten] WiredTiger error (-31802) [1637743523:698725][16190:0x7fb11c9000c0], file:WiredTiger.wt, connection: unable to read root page from file:WiredTiger.wt: WT_ERROR: non-specific WiredTiger error
2021-11-24T17:45:23.698+0900 E STORAGE  [initandlisten] WiredTiger error (0) [1637743523:698765][16190:0x7fb11c9000c0], file:WiredTiger.wt, connection: WiredTiger has failed to open its metadata
2021-11-24T17:45:23.698+0900 E STORAGE  [initandlisten] WiredTiger error (0) [1637743523:698790][16190:0x7fb11c9000c0], file:WiredTiger.wt, connection: This may be due to the database files being encrypted, being from an older version or due to corruption on disk
2021-11-24T17:45:23.698+0900 E STORAGE  [initandlisten] WiredTiger error (0) [1637743523:698797][16190:0x7fb11c9000c0], file:WiredTiger.wt, connection: You should confirm that you have opened the database with the correct options including all encryption and compression options
2021-11-24T17:45:23.700+0900 E -        [initandlisten] Assertion: 28718:-31802: WT_ERROR: non-specific WiredTiger error src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 389
2021-11-24T17:45:23.700+0900 I STORAGE  [initandlisten] exception in initAndListen: Location28718: -31802: WT_ERROR: non-specific WiredTiger error, terminating
2021-11-24T17:45:23.700+0900 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2021-11-24T17:45:23.700+0900 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2021-11-24T17:45:23.700+0900 I CONTROL  [initandlisten] now exiting
2021-11-24T17:45:23.700+0900 I CONTROL  [initandlisten] shutting down with code:100
```

 

정전 이후에, Mongodb 서버에서 문제가 생겼었다.

 

해결위해 시도한 방법은 다음과 같다.

  1. Failed to unlink socket file /tmp/mongodb-27017

 /tmp/mongodb-27017 에서 권한을 확인 하고 owner를 변경시 해결이 가능

 

2. 비정상적인 종료로 인해 파일이 깨진 경우

해당 명령어를 한번 수행해본다.

mongod —repair —dbpath /{path}

 

3. 버전 문제로 인한 이슈..

버전 문제 이슈는 DB를 구성하는 스키마의 버전 이슈가 있을 수 있으니, 버전을 맞춰보자..

 

db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )

 

반응형

'DataBase > NoSQL' 카테고리의 다른 글

MongoDB Arbiter  (0) 2022.04.01