Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11719

Mongos crash when log rotating

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.2.6
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      redhat 6.4
    • Operating System:
      ALL

      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 }

      ))"

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pjgomez@full-on-net.com Pedro Gómez
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: