java.io.IOException

couldn't connect to [/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web13059

  • via Stack Overflow by rkcpi
    , 1 year ago
    couldn't connect to [/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused: connect
  • via GitHub by tholu
    , 3 months ago
    couldn't connect to [/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused (Connection refused)
  • couldn't connect to [/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused: connect
  • Stack trace

    • java.io.IOException: couldn't connect to [/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused at com.mongodb.DBPort._open(DBPort.java:228) at com.mongodb.DBPort.go(DBPort.java:112) at com.mongodb.DBPort.go(DBPort.java:93) at com.mongodb.DBPort.findOne(DBPort.java:146) at com.mongodb.DBPort.runCommand(DBPort.java:157) at com.mongodb.DBTCPConnector.fetchMaxBsonObjectSize(DBTCPConnector.java:457) at com.mongodb.DBTCPConnector.checkMaster(DBTCPConnector.java:444) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:209) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:305) at com.mongodb.DBCollection.findOne(DBCollection.java:647) at com.mongodb.DBCollection.findOne(DBCollection.java:626) at Test.main(Test.java:14)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    688 times, 10 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    2 times, 1 year ago
    Unknown user
    Once, 1 year ago