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

Error msg when tools can't connect to a server is inconsistent across tools

      Each of the tools handle not being able to connect to a host/port differently. Some of the messages refer to replsets or mongos.

      It also takes a noticeably long time to register that there is no server running.

      I tried each of the tools without specifying a host/port (the tools should check localhost:27017) with no mongod server running.

      mongoimport and mongoexport

      dan:(git)mongo-tools[master]/$ mongoexport -c f
      Error: error getting database session: error connecting to db server: no reachable servers
      dan:(git)mongo-tools[master]/$ mongoimport -c f
      2014-12-03T23:05:48.790-0800	error encountered while importing documents: error connecting to mongod: error connecting to db server: no reachable servers
      2014-12-03T23:05:48.790-0800	imported 0 documents
      

      mongotop and mongostat

      dan:(git)mongo-tools[master]/$ mongotop
      2014-12-03T23:06:49.616-0800	Error: error connecting to db server: no reachable servers
      
      2014-12-03T23:06:49.616-0800	error running mongotop: error connecting to db server: no reachable servers
      dan:(git)mongo-tools[master]/$ mongostat
      2014-12-03T23:06:55.297-0800	Error: error connecting to db server: no reachable servers
      

      mongodump and mongorestore:

      dan:(git)mongo-tools[master]/$ mongodump
      2014-12-03T23:08:18.627-0800	Error determining if server is mongos: error connecting to db server: no reachable servers
      dan:(git)mongo-tools[master]/$ mongorestore
      options error: error determining if connected to replica set: error connecting to db server: no reachable servers
      

      mongofiles and mongooplog

      dan:(git)mongo-tools[master]/$ mongofiles list
      2014-12-03T23:10:21.442-0800	error connecting to db: error connecting to db server: no reachable servers
      dan:(git)mongo-tools[master]/$ mongooplog --from localhost
      error connecting to destination host: error connecting to db server: no reachable servers  <== no carriage return on this error msg
      

            Assignee:
            mikeo@mongodb.com Michael O'Brien
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: