java.nio.channels.ClosedChannelException

lucene-solr-user | Markus Jelsma | 2 years ago
  1. 0

    4.10.4 - nodes up, shard without leader

    lucene-solr-user | 2 years ago | Markus Jelsma
    java.nio.channels.ClosedChannelException
  2. 0

    If a node is partitioned from ZooKeeper for an extended period of time then upon resuming connection, the node re-registers itself causing recoverFromLog() method to be executed which fails with the following exception: {code} 8091124 [Thread-71] ERROR org.apache.solr.update.UpdateLog – Error inspecting tlog tlog{file=/home/ubuntu/shalin-lusolr/solr/example/solr/collection_5x3_shard5_replica3/data/tlog/tlog.0000000000000009869 refcount=2} java.nio.channels.ClosedChannelException at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:99) at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:678) at org.apache.solr.update.ChannelFastInputStream.readWrappedStream(TransactionLog.java:784) at org.apache.solr.common.util.FastInputStream.refill(FastInputStream.java:89) at org.apache.solr.common.util.FastInputStream.read(FastInputStream.java:125) at java.io.InputStream.read(InputStream.java:101) at org.apache.solr.update.TransactionLog.endsWithCommit(TransactionLog.java:218) at org.apache.solr.update.UpdateLog.recoverFromLog(UpdateLog.java:800) at org.apache.solr.cloud.ZkController.register(ZkController.java:834) at org.apache.solr.cloud.ZkController$1.command(ZkController.java:271) at org.apache.solr.common.cloud.ConnectionManager$1$1.run(ConnectionManager.java:166) 8091125 [Thread-71] ERROR org.apache.solr.update.UpdateLog – Error inspecting tlog tlog{file=/home/ubuntu/shalin-lusolr/solr/example/solr/collection_5x3_shard5_replica3/data/tlog/tlog.0000000000000009870 refcount=2} java.nio.channels.ClosedChannelException at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:99) at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:678) at org.apache.solr.update.ChannelFastInputStream.readWrappedStream(TransactionLog.java:784) at org.apache.solr.common.util.FastInputStream.refill(FastInputStream.java:89) at org.apache.solr.common.util.FastInputStream.read(FastInputStream.java:125) at java.io.InputStream.read(InputStream.java:101) at org.apache.solr.update.TransactionLog.endsWithCommit(TransactionLog.java:218) at org.apache.solr.update.UpdateLog.recoverFromLog(UpdateLog.java:800) at org.apache.solr.cloud.ZkController.register(ZkController.java:834) at org.apache.solr.cloud.ZkController$1.command(ZkController.java:271) at org.apache.solr.common.cloud.ConnectionManager$1$1.run(ConnectionManager.java:166) {code} This is because the recoverFromLog uses transaction log references that were collected at startup and are no longer valid. We shouldn't even be running recoverFromLog code for ZK re-connect.

    Apache's JIRA Issue Tracker | 2 years ago | Shalin Shekhar Mangar
    java.nio.channels.ClosedChannelException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    If a node is partitioned from ZooKeeper for an extended period of time then upon resuming connection, the node re-registers itself causing recoverFromLog() method to be executed which fails with the following exception: {code} 8091124 [Thread-71] ERROR org.apache.solr.update.UpdateLog – Error inspecting tlog tlog{file=/home/ubuntu/shalin-lusolr/solr/example/solr/collection_5x3_shard5_replica3/data/tlog/tlog.0000000000000009869 refcount=2} java.nio.channels.ClosedChannelException at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:99) at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:678) at org.apache.solr.update.ChannelFastInputStream.readWrappedStream(TransactionLog.java:784) at org.apache.solr.common.util.FastInputStream.refill(FastInputStream.java:89) at org.apache.solr.common.util.FastInputStream.read(FastInputStream.java:125) at java.io.InputStream.read(InputStream.java:101) at org.apache.solr.update.TransactionLog.endsWithCommit(TransactionLog.java:218) at org.apache.solr.update.UpdateLog.recoverFromLog(UpdateLog.java:800) at org.apache.solr.cloud.ZkController.register(ZkController.java:834) at org.apache.solr.cloud.ZkController$1.command(ZkController.java:271) at org.apache.solr.common.cloud.ConnectionManager$1$1.run(ConnectionManager.java:166) 8091125 [Thread-71] ERROR org.apache.solr.update.UpdateLog – Error inspecting tlog tlog{file=/home/ubuntu/shalin-lusolr/solr/example/solr/collection_5x3_shard5_replica3/data/tlog/tlog.0000000000000009870 refcount=2} java.nio.channels.ClosedChannelException at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:99) at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:678) at org.apache.solr.update.ChannelFastInputStream.readWrappedStream(TransactionLog.java:784) at org.apache.solr.common.util.FastInputStream.refill(FastInputStream.java:89) at org.apache.solr.common.util.FastInputStream.read(FastInputStream.java:125) at java.io.InputStream.read(InputStream.java:101) at org.apache.solr.update.TransactionLog.endsWithCommit(TransactionLog.java:218) at org.apache.solr.update.UpdateLog.recoverFromLog(UpdateLog.java:800) at org.apache.solr.cloud.ZkController.register(ZkController.java:834) at org.apache.solr.cloud.ZkController$1.command(ZkController.java:271) at org.apache.solr.common.cloud.ConnectionManager$1$1.run(ConnectionManager.java:166) {code} This is because the recoverFromLog uses transaction log references that were collected at startup and are no longer valid. We shouldn't even be running recoverFromLog code for ZK re-connect.

    Apache's JIRA Issue Tracker | 2 years ago | Shalin Shekhar Mangar
    java.nio.channels.ClosedChannelException

    1 unregistered visitors
    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.nio.channels.ClosedChannelException

      No message provided

      at sun.nio.ch.FileChannelImpl.ensureOpen()
    2. Java RT
      FileChannelImpl.read
      1. sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:99)
      2. sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:679)
      2 frames
    3. Apache Solr Core
      ChannelFastInputStream.readWrappedStream
      1. org.apache.solr.update.ChannelFastInputStream.readWrappedStream(TransactionLog.java:784)
      1 frame
    4. Apache Solr Solrj
      FastInputStream.read
      1. org.apache.solr.common.util.FastInputStream.refill(FastInputStream.java:89)
      2. org.apache.solr.common.util.FastInputStream.read(FastInputStream.java:125)
      2 frames
    5. Java RT
      InputStream.read
      1. java.io.InputStream.read(InputStream.java:101)
      1 frame
    6. Apache Solr Core
      ZkController$1.command
      1. org.apache.solr.update.TransactionLog.endsWithCommit(TransactionLog.java:218)
      2. org.apache.solr.update.UpdateLog.recoverFromLog(UpdateLog.java:800)
      3. org.apache.solr.cloud.ZkController.register(ZkController.java:841)
      4. org.apache.solr.cloud.ZkController$1.command(ZkController.java:277)
      4 frames
    7. Apache Solr Solrj
      ConnectionManager$1$1.run
      1. org.apache.solr.common.cloud.ConnectionManager$1$1.run(ConnectionManager.java:166)
      1 frame