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);