Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5401

Kafka Over TLS Error - Failed to send SSL Close message - Broken Pipe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 0.10.1.1
    • None
    • connect
    • SLES 11 , Kakaf Over TLS
    • Hide
      Here is org.apache.kafka.common.network.SslTransportLayer code:
          /**
          * Flushes the buffer to the network, non blocking
          * @param buf ByteBuffer
          * @return boolean true if the buffer has been emptied out, false otherwise
          * @throws IOException
          */
          private boolean flush(ByteBuffer buf) throws IOException {
              int remaining = buf.remaining();
              if (remaining > 0) {
                  int written = socketChannel.write(buf); //no check for isOpen() *socketChannel.isOpen()*
                  return written >= remaining;
              }
              return true;
          }

      it appears upstream monitor *container* closed connection but kafka socketChannel never tested (now-closed) connection with isOpen()
      Show
      Here is org.apache.kafka.common.network.SslTransportLayer code:     /**     * Flushes the buffer to the network, non blocking     * @param buf ByteBuffer     * @return boolean true if the buffer has been emptied out, false otherwise     * @throws IOException     */     private boolean flush(ByteBuffer buf) throws IOException {         int remaining = buf.remaining();         if (remaining > 0) {             int written = socketChannel.write(buf); //no check for isOpen() *socketChannel.isOpen()*             return written >= remaining;         }         return true;     } it appears upstream monitor *container* closed connection but kafka socketChannel never tested (now-closed) connection with isOpen()

    Description

      SLES 11
      WARN Failed to send SSL Close message (org.apache.kafka.common.network.SslTransportLayer)
      java.io.IOException: Broken pipe
      at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
      at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
      at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
      at sun.nio.ch.IOUtil.write(IOUtil.java:65)
      at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
      at org.apache.kafka.common.network.SslTransportLayer.flush(SslTransportLayer.java:194)
      at org.apache.kafka.common.network.SslTransportLayer.close(SslTransportLayer.java:148)
      at org.apache.kafka.common.network.KafkaChannel.close(KafkaChannel.java:45)
      at org.apache.kafka.common.network.Selector.close(Selector.java:442)
      at org.apache.kafka.common.network.Selector.poll(Selector.java:310)
      at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:256)
      at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:216)
      at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:128)
      at java.lang.Thread.run(Thread.java:745)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pDonS PaVan
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: