[SERVER-21623] Centos7 mongodb 3.07, 3.04, if pidfilepath is changed, service mongod start will freeze Created: 23/Nov/15  Updated: 05/Mar/16  Resolved: 05/Mar/16

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

Type: Bug Priority: Minor - P4
Reporter: Jay Wang Assignee: Ramon Fernandez Marina
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

Platform: centos 7.1
mongodb version: 3.07 3.04
mongodb repo: https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.0/x86_64/RPMS/

in /etc/mongod.conf
pidfilepath=/var/run/mongodb/mongod_changed.pid
selinux is stopped and pid file is writable by mongod

run command: service mongod start

Participants:

 Description   

Centos7 mongodb 3.07, 3.04, if pidfilepath is changed, service mongod start will freeze, even if pidfilepath is writable.
Platform: centos 7.1
mongodb version: 3.07 3.04
mongodb repo: https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.0/x86_64/RPMS/

in /etc/mongod.conf
pidfilepath=/var/run/mongodb/mongod_changed.pid
selinux is stopped and pid file is writable by mongod

run command: service mongod start
terminal stopped on and timeout at last but service actually was up

[root@ec2-bj-uat-jdc-db01 site-cookbooks]# netstat -ntlop
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name     Timer
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      20885/mongod         off (0.00/0/0)
 
[root@ec2-bj-uat-jdc-db01 site-cookbooks]# cat /var/run/mongodb/mongod_changed.pid
20885

tail log:

2015-11-23T09:49:27.536+0000 I CONTROL  [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod_changed.pid" }, storage: { dbPath: "/var/lib/mongo" }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2015-11-23T09:49:27.542+0000 I NETWORK  [initandlisten] waiting for connections on port 27017



 Comments   
Comment by Ramon Fernandez Marina [ 03/Feb/16 ]

jaywanglevelup, I see you didn't answer Markus' question above. If this is still an issue for you, can you please send:

  • the owner and permissions on /var/run/mongodb/mongd_changed.pid
  • the full contents of /etc/mongod.conf
  • the full logs of the server including the preceding shutdown?

Thanks,
Ramón.

Comment by Markus Mahlberg [ 25/Dec/15 ]

I can not reproduce this problem. Can you display the owner and permissions on `/var/run/mongodb/mongod_changed.pid`?

Generated at Thu Feb 08 03:57:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.