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

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

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

      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 }

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

              Created:
              Updated:
              Resolved: