[SERVER-39979] Mongo DB not working after created auto logrotate Created: 06/Mar/19  Updated: 27/Oct/23  Resolved: 11/Mar/19

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: guna Assignee: Eric Sedor
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

I did below.

sudo su
sudo vim /etc/logrotate.d/mongod.conf
/var/log/mongodb/mongod.log

{ daily size 100M rotate 10 missingok compress delaycompress notifempty create 640 mongod mongod sharedscripts postrotate /bin/kill -SIGUSR1 `cat /var/run/mongodb/mongod.pid 2>/dev/null` >/dev/null 2>&1 endscript }

 

>>>sudo service mongod restart

Result FAILED to restart mongodb

>>>sudo mongod --repair

 

I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1460M,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),
I STORAGE [initandlisten] WiredTiger message [1551861372:311743][26124:0x7f209d4e0b40], txn-recover: Main recovery loop: starting at 1/13952 to 2/256
I STORAGE [initandlisten] WiredTiger message [1551861372:419236][26124:0x7f209d4e0b40], txn-recover: Recovering log 1 through 2
I STORAGE [initandlisten] WiredTiger message [1551861372:484762][26124:0x7f209d4e0b40], txn-recover: Recovering log 2 through 2
I STORAGE [initandlisten] WiredTiger message [1551861372:537215][26124:0x7f209d4e0b40], txn-recover: Set global recovery timestamp: 0
I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
I STORAGE [initandlisten] Repairing size cache
I STORAGE [initandlisten] Verify succeeded on uri table:sizeStorer. Not salvaging.
I STORAGE [initandlisten] Repairing catalog metadata
I STORAGE [initandlisten] Verify succeeded on uri table:_mdb_catalog. Not salvaging.
I CONTROL [initandlisten]
I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
I CONTROL [initandlisten]
I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
I CONTROL [initandlisten]
I STORAGE [initandlisten] repairDatabase admin
2I STORAGE [initandlisten] Repairing collection admin.system.version
I STORAGE [initandlisten] Verify succeeded on uri table:collection-0--5920440038375576319. Not salvaging.
I INDEX [initandlisten] build index on: admin.system.version properties: { v: 2, key:

{ _id: 1 }

, name: "id", ns: "admin.system.version" }
I INDEX [initandlisten] building index using bulk method; build may temporarily use up to 500 megabytes of RAM
W ASIO [initandlisten] No TransportLayer configured during NetworkInterface startup
I STORAGE [initandlisten] finished checking dbs
I STORAGE [initandlisten] WiredTigerKVEngine shutting down
I STORAGE [initandlisten] Shutting down session sweeper thread
I STORAGE [initandlisten] Finished shutting down session sweeper thread
I STORAGE [initandlisten] shutdown: removing fs lock...
I CONTROL [initandlisten] now exiting
I CONTROL [initandlisten] shutting down with code:0



 Comments   
Comment by Eric Sedor [ 11/Mar/19 ]

Understood; thanks for letting us know!

Comment by guna [ 09/Mar/19 ]

Thanks for your reply. And the issue Fixed. I just reinstall mongodb

Comment by Eric Sedor [ 08/Mar/19 ]

Thanks for your report. Can you please help us with the following:

  • your MongoDB version
  • your operating system and version/build
  • the logs for a running MongoDB process when logrotate.d runs, and the timestamp when that occurs.
Generated at Thu Feb 08 04:53:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.