You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2020/11/18 14:20:38 UTC

[cassandra] branch trunk updated (7ca997b -> e572c8f)

This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


    from 7ca997b  Drain and/or shutdown might throw because of slow messaging service shutdown
     new cefe43b  Upgrade netty to 5.1.54 and netty-tcnative to 2.0.34
     new e572c8f  'SSLEngine closed already' exception on failed outbound connection

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.txt                                        |   1 +
 .../{netty-4.1.50.txt => netty-4.1.54.txt}         |   0
 ...native-2.0.31.txt => netty-tcnative-2.0.34.txt} |   0
 ...4.1.50.Final.jar => netty-all-4.1.54.Final.jar} | Bin 4213710 -> 4318380 bytes
 ...etty-tcnative-boringssl-static-2.0.31.Final.jar | Bin 3953120 -> 0 bytes
 ...etty-tcnative-boringssl-static-2.0.34.Final.jar | Bin 0 -> 4018015 bytes
 .../cassandra/net/OutboundConnectionInitiator.java |  18 ++++++++++++++++++
 7 files changed, 19 insertions(+)
 rename lib/licenses/{netty-4.1.50.txt => netty-4.1.54.txt} (100%)
 rename lib/licenses/{netty-tcnative-2.0.31.txt => netty-tcnative-2.0.34.txt} (100%)
 rename lib/{netty-all-4.1.50.Final.jar => netty-all-4.1.54.Final.jar} (67%)
 delete mode 100644 lib/netty-tcnative-boringssl-static-2.0.31.Final.jar
 create mode 100644 lib/netty-tcnative-boringssl-static-2.0.34.Final.jar


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra] 01/02: Upgrade netty to 5.1.54 and netty-tcnative to 2.0.34

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit cefe43b06bb1c0dd3bd362638cc56e0fc1f78ddb
Author: Aleksey Yeshchenko <al...@apache.org>
AuthorDate: Mon Nov 16 17:18:45 2020 +0000

    Upgrade netty to 5.1.54 and netty-tcnative to 2.0.34
---
 .../{netty-4.1.50.txt => netty-4.1.54.txt}         |   0
 ...native-2.0.31.txt => netty-tcnative-2.0.34.txt} |   0
 ...4.1.50.Final.jar => netty-all-4.1.54.Final.jar} | Bin 4213710 -> 4318380 bytes
 ...etty-tcnative-boringssl-static-2.0.31.Final.jar | Bin 3953120 -> 0 bytes
 ...etty-tcnative-boringssl-static-2.0.34.Final.jar | Bin 0 -> 4018015 bytes
 5 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/lib/licenses/netty-4.1.50.txt b/lib/licenses/netty-4.1.54.txt
similarity index 100%
rename from lib/licenses/netty-4.1.50.txt
rename to lib/licenses/netty-4.1.54.txt
diff --git a/lib/licenses/netty-tcnative-2.0.31.txt b/lib/licenses/netty-tcnative-2.0.34.txt
similarity index 100%
rename from lib/licenses/netty-tcnative-2.0.31.txt
rename to lib/licenses/netty-tcnative-2.0.34.txt
diff --git a/lib/netty-all-4.1.50.Final.jar b/lib/netty-all-4.1.54.Final.jar
similarity index 67%
rename from lib/netty-all-4.1.50.Final.jar
rename to lib/netty-all-4.1.54.Final.jar
index f8b1557..5b9d4d9 100644
Binary files a/lib/netty-all-4.1.50.Final.jar and b/lib/netty-all-4.1.54.Final.jar differ
diff --git a/lib/netty-tcnative-boringssl-static-2.0.31.Final.jar b/lib/netty-tcnative-boringssl-static-2.0.31.Final.jar
deleted file mode 100644
index 582c582..0000000
Binary files a/lib/netty-tcnative-boringssl-static-2.0.31.Final.jar and /dev/null differ
diff --git a/lib/netty-tcnative-boringssl-static-2.0.34.Final.jar b/lib/netty-tcnative-boringssl-static-2.0.34.Final.jar
new file mode 100644
index 0000000..ae902f5
Binary files /dev/null and b/lib/netty-tcnative-boringssl-static-2.0.34.Final.jar differ


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra] 02/02: 'SSLEngine closed already' exception on failed outbound connection

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit e572c8fca0c5cd68229b8db8d4915817d5d49daf
Author: Aleksey Yeshchenko <al...@apache.org>
AuthorDate: Mon Nov 16 17:36:24 2020 +0000

    'SSLEngine closed already' exception on failed outbound connection
    
    patch by Aleksey Yeschenko; reviewed by Alex Petrov and Norman Maurer for
    (CASSANDRA-16277)
---
 CHANGES.txt                                            |  1 +
 .../cassandra/net/OutboundConnectionInitiator.java     | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/CHANGES.txt b/CHANGES.txt
index 176bc04..7d904a9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0-beta4
+ * 'SSLEngine closed already' exception on failed outbound connection (CASSANDRA-16277)
  * Drain and/or shutdown might throw because of slow messaging service shutdown (CASSANDRA-16276)
  * Upgrade JNA to 5.6.0, dropping support for <=glibc-2.6 systems (CASSANDRA-16212)
  * Add saved Host IDs to TokenMetadata at startup (CASSANDRA-16246)
diff --git a/src/java/org/apache/cassandra/net/OutboundConnectionInitiator.java b/src/java/org/apache/cassandra/net/OutboundConnectionInitiator.java
index 4a5585a..2c26005 100644
--- a/src/java/org/apache/cassandra/net/OutboundConnectionInitiator.java
+++ b/src/java/org/apache/cassandra/net/OutboundConnectionInitiator.java
@@ -42,6 +42,7 @@ import io.netty.handler.codec.ByteToMessageDecoder;
 
 import io.netty.handler.logging.LogLevel;
 import io.netty.handler.logging.LoggingHandler;
+import io.netty.handler.ssl.SslClosedEngineException;
 import io.netty.handler.ssl.SslContext;
 import io.netty.handler.ssl.SslHandler;
 import io.netty.util.concurrent.FailedFuture;
@@ -86,6 +87,7 @@ public class OutboundConnectionInitiator<SuccessType extends OutboundConnectionI
     private final OutboundConnectionSettings settings;
     private final int requestMessagingVersion; // for pre40 nodes
     private final Promise<Result<SuccessType>> resultPromise;
+    private boolean isClosed;
 
     private OutboundConnectionInitiator(ConnectionType type, OutboundConnectionSettings settings,
                                         int requestMessagingVersion, Promise<Result<SuccessType>> resultPromise)
@@ -363,6 +365,21 @@ public class OutboundConnectionInitiator<SuccessType extends OutboundConnectionI
         @Override
         public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
         {
+            if (isClosed && cause instanceof SslClosedEngineException)
+            {
+                /*
+                 * Occasionally Netty will invoke this handler to process an exception of the following kind:
+                 *      io.netty.channel.unix.Errors$NativeIoException: readAddress(..) failed: Connection reset by peer
+                 *
+                 * When we invoke ctx.close() later in this method, the listener, set up in channelActive(), might be
+                 * failed with an SslClosedEngineException("SSLEngine closed already") by Netty, and exceptionCaught() will be invoked
+                 * once again, this time to handle the SSLException triggered by ctx.close().
+                 *
+                 * The exception at this stage is benign, and we shouldn't be double-logging the failure to connect.
+                 */
+                return;
+            }
+
             try
             {
                 JVMStabilityInspector.inspectThrowable(cause, false);
@@ -371,6 +388,7 @@ public class OutboundConnectionInitiator<SuccessType extends OutboundConnectionI
                     logger.info("Failed to connect to peer {}", settings.connectToId(), cause);
                 else
                     logger.error("Failed to handshake with peer {}", settings.connectToId(), cause);
+                isClosed = true;
                 ctx.close();
             }
             catch (Throwable t)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org