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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via JIRA by Alan Williamson, 1 year ago
couldn't connect to [/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused: connect
via Stack Overflow by Russ Bateman
, 1 year ago
couldn't connect to [russ-elite-book/127.0.1.1:27017] bc:java.net.ConnectException: Connection refused
via Stack Overflow by asaf app
, 2 years ago
couldn't connect to [localhost/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused: connect
via Stack Overflow by KumMas
, 2 years ago
couldn't connect to [/192.168.80.128:27017] bc:java.net.ConnectException: Connection refused: connect
via Stack Overflow by Arun P Johny
, 2 years ago
couldn't connect to [/192.168.1.42:27017] bc:java.net.ConnectException: Connection refused: connect
via JIRA by Ryan Nitz, 1 year ago
couldn't connect to [server.something.com/10.137.128.62:27018] bc:java.net.SocketTimeoutException: connect timed out
java.io.IOException: couldn't connect to [/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused: connect
at com.mongodb.DBPort._open(DBPort.java:214)
at com.mongodb.DBPort.go(DBPort.java:107)
at com.mongodb.DBPort.go(DBPort.java:88)
at com.mongodb.DBPort.findOne(DBPort.java:143)
at com.mongodb.DBPort.runCommand(DBPort.java:148)
at com.mongodb.DBTCPConnector.initDirectConnection(DBTCPConnector.java:548)
at com.mongodb.DBTCPConnector.checkMaster(DBTCPConnector.java:527)
at com.profiler.ProfilerExtension.run(ProfilerExtension.java:126)
at java.lang.Thread.run(Thread.java:619)

Users with the same issue

11 times, 5 months ago
2172 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.