[SERVER-1532] Errors not logged if exit and --fork --logpath Created: 01/Aug/10  Updated: 12/Jul/16  Resolved: 02/Aug/10

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 1.5.7
Fix Version/s: 1.5.8

Type: Bug Priority: Minor - P4
Reporter: David Mytton Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux


Operating System: Linux
Participants:

 Description   

Reproduce steps:

mongodb-linux-x86_64-1.5.7/bin/mongod --shardsvr --dbpath data/ --replSet set1

This is deliberately incorrect.

Actual output:

all output going to: mongodb.log
forked process: 1084
[root@domU-12-31-39-06-29-52 ~]#

    • NOTE: This is a development version (1.5.7) of MongoDB.
    • Not recommended for production.

Expected output:

Sun Aug 1 04:05:45 MongoDB starting : pid=1091 port=27018 dbpath=data/ 64-bit

    • NOTE: This is a development version (1.5.7) of MongoDB.
    • Not recommended for production.

Sun Aug 1 04:05:45 db version v1.5.7, pdfile version 4.5
Sun Aug 1 04:05:45 git version: 5b667e49b1c88f201cdd3912b3d1d1c1098a25b4
Sun Aug 1 04:05:45 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41
Sun Aug 1 04:05:45 [initandlisten] exception in initAndListen std::exception: bad --replSet config string format is: <setname>/<seedhost1>,<seedhost2>[,...], terminating
Sun Aug 1 04:05:45 dbexit:

Sun Aug 1 04:05:45 [initandlisten] shutdown: going to close listening sockets...
Sun Aug 1 04:05:45 [initandlisten] shutdown: going to flush oplog...
Sun Aug 1 04:05:45 [initandlisten] shutdown: going to close sockets...
Sun Aug 1 04:05:45 [initandlisten] shutdown: waiting for fs preallocator...
Sun Aug 1 04:05:45 [initandlisten] shutdown: closing all files...
Sun Aug 1 04:05:45 closeAllFiles() finished

Sun Aug 1 04:05:45 [initandlisten] shutdown: removing fs lock...
Sun Aug 1 04:05:45 dbexit: really exiting now

Problem

The log file is not created because of the error, and since the process is forked before the error occurs, the process fails silently.



 Comments   
Comment by auto [ 02/Aug/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: fix relative logpath args and test logpath before forking SERVER-1532
http://github.com/mongodb/mongo/commit/9cc9c1d2a0c46f90fd7e960ae86d8906b41efa62

Comment by David Mytton [ 02/Aug/10 ]

Using /tmp/x as the --logpath works fine for me too.

However, it doesn't work if I use my current directory (/root). I am logged in as root

mongod --shardsvr --replSet set1 --fork --logpath log

Comment by Eliot Horowitz (Inactive) [ 02/Aug/10 ]

This seems to be working for me...

I do: ./mongod --shardsvr --replSet set1 --fork --logpath /tmp/x

In /tmp/x i get the error about bad --replSet parameter.

Do you not get that?

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