Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-3273

Avro Flume source throws java.nio.channels.ClosedChannelException when a client is being disconnected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.0
    • None
    • None
    • None
    • OS: Ubuntu 18.04

    Description

      I configured the Avro source on my Flume instance and enabled compression for it. Then I sent some events with the avro-client (compression is enabled for the client too). The events were successfully transferred to sinks but in the File logs I found the following exception:

      java.nio.channels.ClosedChannelException
      at org.jboss.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:433)
      at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromUserCode(AbstractNioWorker.java:128)
      at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:99)
      at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:36)
      at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:779)
      at org.jboss.netty.channel.Channels.write(Channels.java:725)
      at org.jboss.netty.channel.Channels.write(Channels.java:686)
      at org.jboss.netty.handler.codec.compression.ZlibEncoder.finishEncode(ZlibEncoder.java:380)
      at org.jboss.netty.handler.codec.compression.ZlibEncoder.handleDownstream(ZlibEncoder.java:316)

      I think the following sequence of actions happened:

      1. The client sent some events.
      2. The server received those events.
      3. The client closed connection.
      4. The server got the connection close event.
      5. The server tried to write ZLib checksum.
      6. The server raised the exception because of already closed connection.

      How can I suppress raising that exception?

      Logs and configs for client and server in the attachment.

      Attachments

        1. flume.conf
          0.9 kB
          Vyacheslav Kulakov
        2. flume-client.conf
          0.1 kB
          Vyacheslav Kulakov
        3. flume.log
          22 kB
          Vyacheslav Kulakov

        Activity

          People

            Unassigned Unassigned
            Kulakov Vyacheslav Kulakov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: