Browse Source

KAFKA-4301; Add more trace for SSL handshake

Author: Rajini Sivaram <rajinisivaram@googlemail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #2027 from rajinisivaram/KAFKA-4301
pull/2040/merge
Rajini Sivaram 8 years ago committed by Ismael Juma
parent
commit
a4413fc8a4
  1. 6
      clients/src/main/java/org/apache/kafka/common/network/SslTransportLayer.java

6
clients/src/main/java/org/apache/kafka/common/network/SslTransportLayer.java

@ -352,8 +352,12 @@ public class SslTransportLayer implements TransportLayer {
//remove OP_WRITE if we are complete, otherwise we still have data to write //remove OP_WRITE if we are complete, otherwise we still have data to write
if (!handshakeComplete) if (!handshakeComplete)
key.interestOps(key.interestOps() | SelectionKey.OP_WRITE); key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
else else {
key.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE); key.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE);
SSLSession session = sslEngine.getSession();
log.debug("SSL handshake completed successfully with peerHost '{}' peerPort {} peerPrincipal '{}' cipherSuite '{}'",
session.getPeerHost(), session.getPeerPort(), peerPrincipal(), session.getCipherSuite());
}
log.trace("SSLHandshake FINISHED channelId {}, appReadBuffer pos {}, netReadBuffer pos {}, netWriteBuffer pos {} ", log.trace("SSLHandshake FINISHED channelId {}, appReadBuffer pos {}, netReadBuffer pos {}, netWriteBuffer pos {} ",
channelId, appReadBuffer.position(), netReadBuffer.position(), netWriteBuffer.position()); channelId, appReadBuffer.position(), netReadBuffer.position(), netWriteBuffer.position());

Loading…
Cancel
Save