com.mongodb.MongoSocketOpenException: Exception opening socket


Samebug tips

Check if your MongoDB is available.


10 months ago

host port isnt set


,
via GitHub by rawlingsj

Solutions on the web

Solution icon of github
via GitHub by shilpsl1
, 9 months ago
Exception opening socket

Solution icon of github
Exception opening socket

Solution icon of github
Exception opening socket

Solution icon of googlegroups
Exception opening socket

Solution icon of spring
via Spring JIRA by bitsofinfo, 1 year ago
Exception opening socket

Solution icon of stackoverflow
Exception opening socket

Solution icon of stackoverflow
Exception opening socket**

Solution icon of stackoverflow
Exception opening socket

Solution icon of stackoverflow
Exception opening socket

Solution icon of stackoverflow
via Stack Overflow by B2C
, 1 year ago
Exception opening socket

Stack trace

com.mongodb.MongoSocketOpenException: Exception opening socket
	at com.mongodb.connection.SocketStream.open(SocketStream.java:63)
	at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:114)
	at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:128)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:50)
	at com.mongodb.connection.SocketStream.open(SocketStream.java:58)
	... 3 more

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

19 times, 3 days ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago
5 times, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
5 times, 7 months ago
508 more bugmates