From 637be83684b72f0563d57b7af52b8148ede6c9fd Mon Sep 17 00:00:00 2001 From: luqingjie <544309509@qq.com> Date: Fri, 6 Nov 2026 22:35:49 -0500 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=A6=E7=BB=86=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/system/chain/ChainExecutorClient.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/chain/ChainExecutorClient.java b/ruoyi-system/src/main/java/com/ruoyi/system/chain/ChainExecutorClient.java index 4a679f4..be72823 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/chain/ChainExecutorClient.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/chain/ChainExecutorClient.java @@ -70,7 +70,10 @@ public class ChainExecutorClient { http = createHttp(ChainExecutorTls.socketFactory(tlsCertificateLocation, new DefaultResourceLoader())); log.info("已加载内网链上执行器HTTPS信任证书"); } catch (Exception invalidCertificate) { - throw new IllegalArgumentException("内网链上执行器TLS证书加载失败,请检查本地证书路径、格式和有效期"); + String cause = rootType(invalidCertificate); + log.error("内网链上执行器TLS证书加载失败,异常类型={}", cause); + throw new IllegalArgumentException("内网链上执行器TLS证书加载失败[" + cause + + "],请检查file:/classpath:路径、读取权限、X.509格式和有效期"); } } log.info("内网链上执行通道已启用,开始验证执行器服务,传输协议={}", target.getScheme().toUpperCase()); @@ -133,6 +136,12 @@ public class ChainExecutorClient { return cause.getClass().getSimpleName(); } + private static String rootType(Throwable failure) { + Throwable cause = failure; + while (cause.getCause() != null && cause.getCause() != cause) cause = cause.getCause(); + return cause.getClass().getSimpleName(); + } + private HttpHeaders headers() { HttpHeaders headers = new HttpHeaders(); headers.set("Authorization", "Bearer " + token);