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

couldn't connect to server localhost:27017, connection attempt failed

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.15
    • Component/s: Networking
    • Labels:
      None
    • ALL

      I'm not able to copy a database. It returns me following error:

      {
      	"ok" : 0,
      	"errmsg" : "couldn't connect to server localhost:27017, connection attempt failed",
      	"code" : 6,
      	"codeName" : "HostUnreachable"
      }
      

      I don't know why it says localhost, I'm connecting to mongodb server having ip address 172.31.21.200.

      Output of mongo --version

      MongoDB shell version v3.4.15
      git version: 52e5b5fbaa3a2a5b1a217f5e647b5061817475f9
      OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
      allocator: tcmalloc
      modules: none
      build environment:
          distmod: ubuntu1604
          distarch: x86_64
          target_arch: x86_64
      

            Assignee:
            nick.brewer Nick Brewer
            Reporter:
            prashant.pokhriyal Prashant Pokhriyal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: