com.mongodb.MongoSocketReadException: Prematurely reached end of stream

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

Samebug tips

,
Expert tip

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

Solutions on the web

via GitHub by salmazov
, 1 year ago
Prematurely reached end of stream
via Stack Overflow by David V
, 1 year ago
via Stack Overflow by user3652237
, 5 days ago
via Stack Overflow by gasparms
, 11 months ago
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 java.lang.Thread.run(Thread.java:745)

Users with the same issue

2 times, 10 months ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 6 days ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago

Write tip

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