com.mongodb.MongoSocketReadException: Prematurely reached end of stream


Samebug tips

Check if your server is listening to the the same adress you're trying to connect to.


7 months ago
Expert tip

Solutions on the web

Solution icon of stackoverflow
Prematurely reached end of stream

Solution icon of stackoverflow
Prematurely reached end of stream

Solution icon of github
Prematurely reached end of stream

Solution icon of github
Prematurely reached end of stream

Solution icon of github
Prematurely reached end of stream

Solution icon of googlegroups
via Google Groups by Keamas M, 1 year ago
Prematurely reached end of stream

Solution icon of googlegroups
Prematurely reached end of stream

Solution icon of stackoverflow
Prematurely reached end of stream

Solution icon of stackoverflow
Prematurely reached end of stream

Solution icon of googlegroups
Prematurely reached end of stream

Stack trace

com.mongodb.MongoSocketReadException: Prematurely reached end of stream
	at com.mongodb.connection.SocketStream.read(SocketStream.java:88)
	at com.mongodb.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:491)
	at com.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:221)
	at com.mongodb.connection.CommandHelper.receiveReply(CommandHelper.java:134)
	at com.mongodb.connection.CommandHelper.receiveCommandResult(CommandHelper.java:121)
	at com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:32)
	at com.mongodb.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:83)
	at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:43)
	at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115)
	at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:127)
	at java.lang.Thread.run(Thread.java:745)

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

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
10 more bugmates