java.lang.RuntimeException: org.mongodb.MongoInternalException: Unexpected runtime exception

JIRA | Andre Spiegel | 3 years ago
  1. 0

    I have a Java program that is using multiple threads to write to a stand-alone 2.6.0 server. Documents are about 1.6k each. When using a low batch size (1 or 2) and 6-8 threads, the application gets the below exception after a few minutes of writing to the database: {noformat} Exception in thread "Thread-8" 03:29:12.876 [Thread-11] INFO org.mongodb.driver.cluster - No server chosen by PrimaryServerSelector from cluster description ClusterDescription{t ype=UNKNOWN, connectionMode=SINGLE, all=[ServerDescription{address=century-standalone:27017, type=UNKNOWN, state=CONNECTING}]}. Waiting for 29999 ms before timing out 03:29:12.876 [Thread-9] INFO org.mongodb.driver.cluster - No server chosen by PrimaryServerSelector from cluster description ClusterDescription{type=UNKNOWN, connectionMode=SING LE, all=[ServerDescription{address=century-standalone:27017, type=UNKNOWN, state=CONNECTING}]}. Waiting for 29999 ms before timing out java.lang.RuntimeException: org.mongodb.MongoInternalException: Unexpected runtime exception at net.drmirror.DataLoader$Loader.loadFile(DataLoader.java:183) at net.drmirror.DataLoader$PoolLoader.run(DataLoader.java:208) Caused by: org.mongodb.MongoInternalException: Unexpected runtime exception at org.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:125) at org.mongodb.connection.UsageTrackingInternalConnection.receiveMessage(UsageTrackingInternalConnection.java:73) at org.mongodb.connection.PooledConnectionProvider$PooledConnection.receiveMessage(PooledConnectionProvider.java:245) at org.mongodb.connection.DefaultServer$DefaultServerConnection.receiveMessage(DefaultServer.java:167) at org.mongodb.protocol.WriteCommandProtocol.receiveMessage(WriteCommandProtocol.java:112) at org.mongodb.protocol.WriteCommandProtocol.execute(WriteCommandProtocol.java:70) at org.mongodb.protocol.InsertCommandProtocol.execute(InsertCommandProtocol.java:55) at org.mongodb.protocol.WriteCommandProtocol.execute(WriteCommandProtocol.java:1) at org.mongodb.operation.OperationHelper.executeProtocol(OperationHelper.java:89) at org.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:79) at org.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:1) at org.mongodb.MongoClientImpl.execute(MongoClientImpl.java:121) at org.mongodb.MongoCollectionImpl.execute(MongoCollectionImpl.java:160) at org.mongodb.MongoCollectionImpl$MongoCollectionView.insert(MongoCollectionImpl.java:332) at org.mongodb.MongoCollectionImpl.insert(MongoCollectionImpl.java:82) at net.drmirror.DataLoader$Loader.insert(DataLoader.java:156) at net.drmirror.DataLoader$Loader.loadFile(DataLoader.java:179) ... 1 more Caused by: java.lang.IllegalStateException: This really shouldn't happen with such a long timeout at org.mongodb.operation.SingleResultFuture.get(SingleResultFuture.java:111) at org.mongodb.connection.AsynchronousSocketChannelStream.read(AsynchronousSocketChannelStream.java:57) at org.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:191) at org.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:110) ... 17 more {noformat} This does not seem to occur when the batch size is larger or less threads are used.

    JIRA | 3 years ago | Andre Spiegel
    java.lang.RuntimeException: org.mongodb.MongoInternalException: Unexpected runtime exception
  2. 0

    EService causes java.lang.IllegalStateException

    GitHub | 2 months ago | atyschenko
    java.lang.IllegalStateException: This shouldn't happen unless the validation is bad
  3. 0

    Null pointer exception in resolver

    Netbeans Bugzilla | 1 decade ago | vp17559
    java.lang.IllegalStateException: Creating default editor mode. It shouldn't happen this way at org.netbeans.core.windows.WindowManagerImpl.getDefaultEditorMode(WindowManagerImpl.java:500) at org.netbeans.core.windows.WindowManagerImpl.topComponentOpen(WindowManagerImpl.java:958)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    NullPointerException while refactor->encapsulate field

    Netbeans Bugzilla | 1 decade ago | archer3
    java.lang.IllegalStateException: Creating default editor mode. It shouldn't happen this way at org.netbeans.core.windows.WindowManagerImpl.getDefaultEditorMode(WindowManagerImpl.java:500) at org.netbeans.core.windows.WindowManagerImpl.topComponentOpen(WindowManagerImpl.java:958)
  6. 0

    Unexpected Exception while editing a JSP

    Netbeans Bugzilla | 1 decade ago | yoav
    java.lang.IllegalStateException: Creating default editor mode. It shouldn't happen this way at org.netbeans.core.windows.WindowManagerImpl.getDefaultEditorMode(WindowManagerImpl.java:500) at org.netbeans.core.windows.WindowManagerImpl.topComponentOpen(WindowManagerImpl.java:958)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      This really shouldn't happen with such a long timeout

      at org.mongodb.operation.SingleResultFuture.get()
    2. org.mongodb.operation
      SingleResultFuture.get
      1. org.mongodb.operation.SingleResultFuture.get(SingleResultFuture.java:111)
      1 frame
    3. org.mongodb.connection
      DefaultServer$DefaultServerConnection.receiveMessage
      1. org.mongodb.connection.AsynchronousSocketChannelStream.read(AsynchronousSocketChannelStream.java:57)
      2. org.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:191)
      3. org.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:110)
      4. org.mongodb.connection.UsageTrackingInternalConnection.receiveMessage(UsageTrackingInternalConnection.java:73)
      5. org.mongodb.connection.PooledConnectionProvider$PooledConnection.receiveMessage(PooledConnectionProvider.java:245)
      6. org.mongodb.connection.DefaultServer$DefaultServerConnection.receiveMessage(DefaultServer.java:167)
      6 frames
    4. org.mongodb.protocol
      WriteCommandProtocol.execute
      1. org.mongodb.protocol.WriteCommandProtocol.receiveMessage(WriteCommandProtocol.java:112)
      2. org.mongodb.protocol.WriteCommandProtocol.execute(WriteCommandProtocol.java:70)
      3. org.mongodb.protocol.InsertCommandProtocol.execute(InsertCommandProtocol.java:55)
      4. org.mongodb.protocol.WriteCommandProtocol.execute(WriteCommandProtocol.java:1)
      4 frames
    5. org.mongodb.operation
      BaseWriteOperation.execute
      1. org.mongodb.operation.OperationHelper.executeProtocol(OperationHelper.java:89)
      2. org.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:79)
      3. org.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:1)
      3 frames
    6. org.mongodb
      MongoCollectionImpl.insert
      1. org.mongodb.MongoClientImpl.execute(MongoClientImpl.java:121)
      2. org.mongodb.MongoCollectionImpl.execute(MongoCollectionImpl.java:160)
      3. org.mongodb.MongoCollectionImpl$MongoCollectionView.insert(MongoCollectionImpl.java:332)
      4. org.mongodb.MongoCollectionImpl.insert(MongoCollectionImpl.java:82)
      4 frames
    7. net.drmirror
      DataLoader$PoolLoader.run
      1. net.drmirror.DataLoader$Loader.insert(DataLoader.java:156)
      2. net.drmirror.DataLoader$Loader.loadFile(DataLoader.java:179)
      3. net.drmirror.DataLoader$PoolLoader.run(DataLoader.java:208)
      3 frames