[SERVER-11719] Mongos crash when log rotating Created: 15/Nov/13  Updated: 10/Dec/14  Resolved: 15/Nov/13

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

Type: Bug Priority: Major - P3
Reporter: Pedro Gómez Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

redhat 6.4


Issue Links:
Duplicate
duplicates SERVER-11087 mongod/mongos fatally asserts when ro... Backlog
Operating System: ALL
Participants:

 Description   

When performing logrotation on mongos logs, sometimes it crashes, showing following info:
Fri Nov 15 12:10:01 [conn7261] ERROR: Failed to rename '/var/log/mongo/mongos.log' to '/var/log/mongo/mongos.log.2013-11-15T11-10-01': errno:2 No such file or directory
Fri Nov 15 12:10:01 [conn7261] Fatal Assertion 16175
Fri Nov 15 12:10:01 [conn7260] ERROR: Failed to rename '/var/log/mongo/mongos.log' to '/var/log/mongo/mongos.log.2013-11-15T11-10-01': errno:2 No such file or directory
Fri Nov 15 12:10:01 [conn7260] Fatal Assertion 16175
0x81fa31 0x7e75c3 0x5b8e31 0x706554 0x79fab2 0x791dd3 0x76605b 0x501e31 0x80da95 0x7fa0eb2d3851 0x7fa0ea67990d
0x81fa31 0x7e75c3 0x5b8e31 0x706554 0x79fab2 0x791dd3 0x76605b 0x501e31 0x80da95 0x7fa0eb2d3851 0x7fa0ea67990d
Fri Nov 15 12:10:01 [conn7259] end connection 127.0.0.1:49191 (127 connections now open)
/usr/bin/mongos(_ZN5mongo15printStackTraceERSo+0x21) [0x81fa31]
/usr/bin/mongos(_ZN5mongo13fassertFailedEi+0xa3) [0x7e75c3]
/usr/bin/mongos() [0x5b8e31]
/usr/bin/mongos(_ZN5mongo7Command20runAgainstRegisteredEPKcRNS_7BSONObjERNS_14BSONObjBuilderEi+0x764) [0x706554]
/usr/bin/mongos(_ZN5mongo14SingleStrategy7queryOpERNS_7Reque..
...

script to rotate is as follows:
MONGO_BIN="/usr/bin/mongo --verbose"
MONGO_HOST="localhost"
PORT1=10000
$MONGO_BIN $MONGO_HOST:$PORT1/admin --eval "printjson(db.runCommand(

{ logRotate : 1 }

))"


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