[SERVER-12202] Cannot fork with auditing file relative path Created: 24/Dec/13  Updated: 11/Jul/16  Resolved: 13/Jan/14

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

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

Error case:

/data/m/ent/mongo: ./mongod --auditLog jsonfile --auditPath ./s1a.log --shardsvr --dbpath /data/db/s1 --fork --logpath ./s1.log
about to fork child process, waiting until server is ready for connections.
forked process: 26187
ERROR: child process failed, exited with error number 1

Successful case (note command line params):

/data/m/ent/mongo: ./mongod --shardsvr --dbpath /data/db/s1 --fork --logpath ./s1.log
about to fork child process, waiting until server is ready for connections.
forked process: 26190
child process started successfully, parent exiting

Participants:

 Description   

When it fails, it successfully opens the server log file, but the auditing log file does not get created. The server log file is empty.

I can successfully start the server by using & instead of --fork, and everything appears to work properly, including both log files. Therefore, I suspect the problem lies in the interaction of the --fork code with the logging infrastructure code.



 Comments   
Comment by Githook User [ 13/Jan/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-12202 Convert audit log path to absolute path, for fork safety.

Also, improve error reporting.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/8db26e07499b118069899823e11e86cd1814fda3

Comment by Githook User [ 13/Jan/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-12202 Use logging system to report failures during runGlobalInitializers in mongod/mongos.
Branch: master
https://github.com/mongodb/mongo/commit/a21be0c3496c2664aa28412bb5b0d3ad94a14c80

Comment by Andy Schwerin [ 26/Dec/13 ]

Relative paths need to work.

Comment by Eric Milkie [ 24/Dec/13 ]

It's breaking because the audit log path is relative, not absolute. We should fix this to produce a proper error message, or fix it so that relative paths work.

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