[SERVER-11023] New rpm packages init script is unable to stop the server Created: 03/Oct/13  Updated: 28/Oct/13  Resolved: 10/Oct/13

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

Type: Bug Priority: Major - P3
Reporter: Tyler Brock Assignee: Ernie Hershey
Resolution: Duplicate Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-7708 RPMs should automatically create /var... Closed
Duplicate
duplicates SERVER-7708 RPMs should automatically create /var... Closed
Gantt Dependency
Operating System: ALL
Steps To Reproduce:

[vagrant@localhost mongodb]# sudo service mongod start
Starting mongod: about to fork child process, waiting until server is ready for connections.
forked process: 21356
child process started successfully, parent exiting
                                                           [  OK  ]
[vagrant@localhost mongodb]# sudo service mongod stop
Stopping mongod:                                           [FAILED]

Participants:

 Description   

I'm not seeing mongod create a pidfile when it starts.



 Comments   
Comment by Ernie Hershey [ 04/Oct/13 ]

I tracked this down. It's not actually due to the "mongo" reference in the init file, although I'm fixing that as well.

When the fix for SERVER-9275 went in - PIDFILE became populated with the pidfilepath from /etc/mongod.conf instead of being blank. The command the init script uses to stop the server is this:

killproc -p "$PIDFILE" -d 300 /usr/bin/mongod

With a blank argument to -p, killproc works fine. With an argument that isn't actually a pidfile containing a running mongod pid, it fails.

In addition, mongod isn't creating a pid file because we don't create /var/run/mongodb/ for it to create it in. Fixing SERVER-7708 will fix this.

Comment by Ernie Hershey [ 03/Oct/13 ]

Looks straightforward. Another missed "mongo" reference.

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