com.mongodb.MongoSocketReadException

Prematurely reached end of stream

Samebug tips1

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

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

Solutions on the web23

  • via GitHub by anildes
    , 1 year ago
    Prematurely reached end of stream
  • via GitHub by satishc1
    , 2 months ago
    Prematurely reached end of stream
  • 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.UsageTrackingInternalConnection.receiveMessage(UsageTrackingInternalConnection.java:102) at com.mongodb.connection.DefaultConnectionPool$PooledConnection.receiveMessage(DefaultConnectionPool.java:435) at com.mongodb.connection.QueryProtocol.execute(QueryProtocol.java:297) at com.mongodb.connection.QueryProtocol.execute(QueryProtocol.java:54) at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:159) at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:286) at com.mongodb.connection.DefaultServerConnection.query(DefaultServerConnection.java:209) at com.mongodb.operation.FindOperation$1.call(FindOperation.java:496) at com.mongodb.operation.FindOperation$1.call(FindOperation.java:482) at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:239) at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:212) at com.mongodb.operation.FindOperation.execute(FindOperation.java:482) at com.mongodb.operation.FindOperation.execute(FindOperation.java:79) at com.mongodb.Mongo.execute(Mongo.java:772)[graylog.jar:?] at com.mongodb.Mongo$2.execute(Mongo.java:759)[graylog.jar:?] at com.mongodb.DBCursor.initializeCursor(DBCursor.java:851) at com.mongodb.DBCursor.hasNext(DBCursor.java:152)[graylog.jar:?] at org.graylog2.database.PersistedServiceImpl.cursorToList(PersistedServiceImpl.java:124) at org.graylog2.database.PersistedServiceImpl.query(PersistedServiceImpl.java:67) at org.graylog2.database.PersistedServiceImpl.query(PersistedServiceImpl.java:71) at org.graylog2.streams.StreamServiceImpl.loadAll(StreamServiceImpl.java:140) at org.graylog2.streams.StreamServiceImpl.loadAllEnabled(StreamServiceImpl.java:121) at org.graylog2.streams.StreamServiceImpl.loadAllEnabled(StreamServiceImpl.java:114) at org.graylog2.streams.StreamRouter$StreamRouterEngineUpdater.getNewEngine(StreamRouter.java:112) at org.graylog2.streams.StreamRouter$StreamRouterEngineUpdater.run(StreamRouter.java:97)[graylog.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[?:1.8.0_91] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[?:1.8.0_91] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[?:1.8.0_91] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[?:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[?:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[?:1.8.0_91] at java.lang.Thread.run(Thread.java:745)[?:1.8.0_91]

    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

    Once, 9 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    2 times, 5 months ago
    Unknown user
    2 times, 11 months ago
    9 more bugmates