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

haonan pushed a commit to branch no_retry_with_ssl_error
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit b49ccdf276ab57c3c0f0c62613213c7d1761f9b6
Author: HTHou <[email protected]>
AuthorDate: Mon Sep 29 09:58:01 2025 +0800

    No need to retry when SSL
---
 .../java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java | 5 +++++
 .../src/main/java/org/apache/iotdb/db/service/DataNode.java        | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
index 4f6548ef112..08c0cb73a58 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
@@ -204,6 +204,8 @@ import org.apache.thrift.transport.TTransportException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.net.ssl.SSLHandshakeException;
+
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
@@ -433,6 +435,9 @@ public class ConfigNodeClient implements 
IConfigNodeRPCService.Iface, ThriftClie
                 Thread.currentThread().getStackTrace()[2].getMethodName());
         logger.warn(message, e);
         configLeader = null;
+        if (e.getCause() != null && e.getCause() instanceof 
SSLHandshakeException) {
+          throw e;
+        }
       }
 
       // If we have detected all configNodes and still not return
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java
index ef44672bbb4..2ce50b32ada 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java
@@ -127,6 +127,8 @@ import org.apache.tsfile.utils.ReadWriteIOUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.net.ssl.SSLHandshakeException;
+
 import java.io.File;
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -374,6 +376,11 @@ public class DataNode extends ServerCommandLine implements 
DataNodeMBean {
         break;
       } catch (TException | ClientManagerException e) {
         logger.warn("Cannot pull system configurations from 
ConfigNode-leader", e);
+        if (e.getCause() != null
+            && e.getCause().getCause() != null
+            && e.getCause().getCause() instanceof SSLHandshakeException) {
+          throw new StartupException("Cannot SSL Handshake with 
ConfigNode-leader.");
+        }
         retry--;
       }
 

Reply via email to