[SERVER-37319] MongoDB server is not started Created: 26/Sep/18  Updated: 25/Oct/18  Resolved: 25/Oct/18

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

Type: Bug Priority: Major - P3
Reporter: Madura Dissanayake Assignee: Kelsey Schubert
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

I changed the /etc/mongod.conf file to add relication and sharding, but it fails when I do start the MongoDB server.

Following lines were added to the config file.

#replication:
replSetName: "shardreplica01"
#sharding:
clusterRole: shardsvr

Error :

mongod.service - SYSV: Mongo is a scalable, document-oriented database.
?? Loaded: loaded (/etc/rc.d/init.d/mongod; bad; vendor preset: disabled)??
?? Active: failed (Result: exit-code) since Wed 2018-09-26 09:12:52 UTC; 24min ago??
?? Docs: man:systemd-sysv-generator(8)??
?? Process: 3611 ExecStop=/etc/rc.d/init.d/mongod stop (code=exited, status=0/SUCCESS)??
?? Process: 3733 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)??

Sep 26 09:12:51 ip-192-168-100-187.ec2.internal systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
Sep 26 09:12:51 ip-192-168-100-187.ec2.internal runuser[3744]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
Sep 26 09:12:52 ip-192-168-100-187.ec2.internal mongod[3733]: Starting mongod: [FAILED]
Sep 26 09:12:52 ip-192-168-100-187.ec2.internal systemd[1]: mongod.service: control process exited, code=exited status=1
Sep 26 09:12:52 ip-192-168-100-187.ec2.internal systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
Sep 26 09:12:52 ip-192-168-100-187.ec2.internal systemd[1]: Unit mongod.service entered failed state.
Sep 26 09:12:52 ip-192-168-100-187.ec2.internal systemd[1]: mongod.service failed.

 

 

 



 Comments   
Comment by Kelsey Schubert [ 25/Oct/18 ]

Hi madurad

We haven’t heard back from you for some time, so I’m going to mark this ticket as resolved. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Regards,
Kelsey

Comment by Nick Brewer [ 26/Sep/18 ]

madurad This log doesn't show the mongod booting with the options that caused it to fail to boot:

options: { config: "/etc/mongod.conf", net: { bindIp: "0.0.0.0", port: 27017 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod.pid", timeZoneInfo: "/usr/share/zoneinfo" }, storage: { dbPath: "/var/lib/mongo", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }

Since the mongod boots without those options, I suspect that the shardsvr option is being added before this node has been added to a sharded cluster. Can you confirm this?

Thanks,
-Nick

Comment by Madura Dissanayake [ 26/Sep/18 ]

2018-09-26T09:10:50.693+0000 I CONTROL [main] ***** SERVER RESTARTED *****
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] MongoDB starting : pid=3558 port=27017 dbpath=/var/lib/mongo 64-bit host=ip-192-168-100-187.ec2.internal
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] db version v4.0.2
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] git version: fc1573ba18aee42f97a3bb13b67af7d837826b47
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.0-fips 29 Mar 2010
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] allocator: tcmalloc
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] modules: none
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] build environment:
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] distmod: amazon
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] distarch: x86_64
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] target_arch: x86_64
2018-09-26T09:10:50.704+0000 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "0.0.0.0", port: 27017 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod.pid", timeZoneInfo: "/usr/share/zoneinfo" }, storage: { dbPath: "/var/lib/mongo", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2018-09-26T09:10:50.704+0000 I STORAGE [initandlisten] Detected data files in /var/lib/mongo created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-09-26T09:10:50.704+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=256M,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),
2018-09-26T09:10:51.508+0000 I STORAGE [initandlisten] WiredTiger message [1537953051:508333][3558:0x7f7191062b00], txn-recover: Main recovery loop: starting at 3/13824
2018-09-26T09:10:51.590+0000 I STORAGE [initandlisten] WiredTiger message [1537953051:590472][3558:0x7f7191062b00], txn-recover: Recovering log 3 through 4
2018-09-26T09:10:51.639+0000 I STORAGE [initandlisten] WiredTiger message [1537953051:639442][3558:0x7f7191062b00], txn-recover: Recovering log 4 through 4
2018-09-26T09:10:51.681+0000 I STORAGE [initandlisten] WiredTiger message [1537953051:681139][3558:0x7f7191062b00], txn-recover: Set global recovery timestamp: 0
2018-09-26T09:10:51.708+0000 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)

Comment by Nick Brewer [ 26/Sep/18 ]

madurad Has this shard already been added to a cluster? The shardsvr option is not designed to be added to a mongod configuration before it has been added to a cluster.

Could you include the mongod.log from the time the mongod failed to boot?

Thanks,
-Nick

Generated at Thu Feb 08 04:45:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.