Uploaded image for project: 'MongoDB CLI Tools'
  1. MongoDB CLI Tools
  2. TOOLS-755

Mongodump fails with message: read tcp 127.0.0.1:27017: i/o timeout (part 2)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 3.0.3
    • Fix Version/s: None
    • Component/s: mongodump
    • Labels:
    • Environment:
      CentOS 6, replica set

      Description

      There is incomplete fix in bug https://jira.mongodb.org/browse/TOOLS-638. Currently i get following error when dumping my MongoDB instance: Failed: error running `listIndexes`. Collection: `xxx` Err: read tcp 127.0.0.1:27017: i/o timeout

      I think there is missing fix (session.SetSocketTimeout(0)) in metadata_dump.go before calling GetIndexes function:

      // Second, we read the collection's index information by either calling
      // listIndexes (pre-2.7 systems) or querying system.indexes.
      // We keep a running list of all the indexes
      // for the current collection as we iterate over the cursor, and include
      // that list as the "indexes" field of the metadata document.
      log.Logf(log.DebugHigh, "\treading indexes for `%v`", nsID)

      session, err := dump.sessionProvider.GetSession()
      if err != nil

      { return err }
      defer session.Close()
      + session.SetSocketTimeout(0)

      // get the indexes
      indexesIter, err := db.GetIndexes(session.DB(intent.DB).C(intent.C))
      if err != nil { return err }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kyle.erf Kyle Erf
                Reporter:
                winnie Petr Medonos
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: