登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
Gitee AI
我知道了
查看详情
登录
注册
代码拉取完成,页面将自动刷新
开源项目
>
区块链
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
2
Star
9
Fork
4
FISCO-BCOS
/
java-sdk
代码
Issues
6
Pull Requests
0
Wiki
统计
流水线
服务
Gitee Pages
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
我知道了,不再自动展开
更新失败,请稍后重试!
Issues
/
详情
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
ssl handshake failed 的原因未知
待办的
#I4X4XT
劲松
创建于
2022-03-10 09:21
在使用 'sbt run' 运行我的 daml-on-bcos 时,程序会提示 'ssl handshake failed:/127.0.0.1:20200!',使用的是非国密证书。 使用 main 方法运行这个程序是可以正常加载的,我在 main 方法中已经测试了,使用 sbt run 和 main 方法运行,设置证书路径设置的相对路径所解析出的绝对路径是一样的。 已经定位到 org.fisco.bcos.sdk.network.ConnectionManager#checkConnectionResult 方法返回的错误信息,但是该方法在处理 sslhandler 为空所导致的失败和 sshHandshakeFuture.isSuccess() 为 false 所导致的失败时,输出了相同的日志,并且在 sshHandshakeFuture.isSuccess() 为 false 时,没有检测是否有 Throwable,导致 ssl handshake failed 的原因未知。 问题会导致程序调用 reloadConfig,加载国密证书,但是我们不需要国密证书,也没有配置,所以最后又是提示国密证书找不到。 ``` 09:32:15.598 [run-main-0] DEBUG o.f.b.s.c.model.CryptoMaterialConfig - Load cryptoMaterial, caCertPath: data/conf/ssl/ca.crt, sdkCertPath: data/conf/ssl/sdk.crt, sdkPrivateKeyPath:data/conf/ssl/sdk.key, enSSLCertPath: null, enSSLPrivateKeyPath:null 09:32:15.654 [run-main-0] DEBUG o.f.b.s.c.model.ThreadPoolConfig - Init ThreadPoolConfig, channelProcessorThreadSize: 4, receiptProcessorThreadSize: 4, maxBlockingQueueSize: 102400 09:32:15.654 [run-main-0] INFO c.bayconnect.ledger.bcos.BcosContext - Create BcosSDK, configPath: ./bcos-config.toml 09:32:15.878 [run-main-0] INFO o.f.b.sdk.network.ConnectionManager - all connections, size: 2, list: [ConnectionInfo{host='127.0.0.1', port=20200}, ConnectionInfo{host='127.0.0.1', port=20201}] 09:32:15.879 [run-main-0] DEBUG o.fisco.bcos.sdk.network.NetworkImp - start connManager with ECDSA sslContext 09:32:15.879 [run-main-0] DEBUG o.f.b.sdk.network.ConnectionManager - start connect. 09:32:15.932 [run-main-0] INFO o.f.b.sdk.network.ConnectionManager - build ECDSA ssl context with configured certificates 09:32:16.685 [run-main-0] DEBUG o.f.b.sdk.network.ConnectionManager - startConnect to 127.0.0.1:20200 09:32:16.737 [run-main-0] DEBUG o.f.b.sdk.network.ConnectionManager - startConnect to 127.0.0.1:20201 09:32:16.819 [run-main-0] ERROR o.f.b.sdk.network.ConnectionManager - ssl handshake failed:/127.0.0.1:20200! Please make sure the certificate is correctly configured and copied, ensure that the SDK and the node are in the same agency! 09:32:16.820 [run-main-0] ERROR o.f.b.sdk.network.ConnectionManager - ssl handshake failed:/127.0.0.1:20201! Please make sure the certificate is correctly configured and copied, ensure that the SDK and the node are in the same agency! 09:32:16.820 [run-main-0] ERROR o.f.b.sdk.network.ConnectionManager - all connections have failed, [{"code":1, "msg":" ssl handshake failed:/127.0.0.1:20200! Please make sure the certificate is correctly configured and copied, ensure that the SDK and the node are in the same agency!"}, {"code":1, "msg":" ssl handshake failed:/127.0.0.1:20201! Please make sure the certificate is correctly configured and copied, ensure that the SDK and the node are in the same agency!"}] 09:32:16.823 [run-main-0] WARN o.f.b.s.config.model.ConfigProperty - Load config from data/conf/ssl/gm/gmca.crt failed, trying to load from the classpath, e: {} java.io.FileNotFoundException: data/conf/ssl/gm/gmca.crt (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) 省略其它堆栈…… 09:32:19.528 [run-main-0] DEBUG o.f.b.s.c.model.CryptoMaterialConfig - Load cryptoMaterial, caCertPath: data/conf/ssl/gm/gmca.crt, sdkCertPath: data/conf/ssl/gm/gmsdk.crt, sdkPrivateKeyPath:data/conf/ssl/gm/gmsdk.key, enSSLCertPath: data/conf/ssl/gm/gmensdk.crt, enSSLPrivateKeyPath:data/conf/ssl/gm/gmensdk.key 09:32:19.528 [run-main-0] DEBUG o.fisco.bcos.sdk.network.NetworkImp - stop Network... 09:32:19.529 [run-main-0] ERROR o.fisco.bcos.sdk.channel.ChannelImp - init channel network error, * Try init the sslContext failed. * If your blockchain channel config is NON-SM, please provide the NON-SM certificates: CryptoMaterialConfig{certPath='data/conf/ssl', caCertPath='data/conf/ssl/ca.crt', sdkCertPath='data/conf/ssl/sdk.crt', sdkPrivateKeyPath='data/conf/ssl/sdk.key', enSSLCertPath='null', enSSLPrivateKeyPath='null', sslCryptoType=0}. * If your blockchain channel config is SM, please provide the missing certificates: Please make sure data/conf/ssl/gm/gmca.crt data/conf/ssl/gm/gmsdk.crt data/conf/ssl/gm/gmsdk.key data/conf/ssl/gm/gmensdk.key data/conf/ssl/gm/gmensdk.crt exist! 09:32:19.530 [run-main-0] WARN o.fisco.bcos.sdk.channel.ChannelImp - The channel has already been stopped! 09:32:19.530 [run-main-0] DEBUG o.fisco.bcos.sdk.channel.ChannelImp - stop channel... 09:32:19.530 [run-main-0] DEBUG o.fisco.bcos.sdk.network.NetworkImp - stop Network... 09:32:19.530 [run-main-0] DEBUG o.fisco.bcos.sdk.channel.ChannelImp - stop channel succ... ```
在使用 'sbt run' 运行我的 daml-on-bcos 时,程序会提示 'ssl handshake failed:/127.0.0.1:20200!',使用的是非国密证书。 使用 main 方法运行这个程序是可以正常加载的,我在 main 方法中已经测试了,使用 sbt run 和 main 方法运行,设置证书路径设置的相对路径所解析出的绝对路径是一样的。 已经定位到 org.fisco.bcos.sdk.network.ConnectionManager#checkConnectionResult 方法返回的错误信息,但是该方法在处理 sslhandler 为空所导致的失败和 sshHandshakeFuture.isSuccess() 为 false 所导致的失败时,输出了相同的日志,并且在 sshHandshakeFuture.isSuccess() 为 false 时,没有检测是否有 Throwable,导致 ssl handshake failed 的原因未知。 问题会导致程序调用 reloadConfig,加载国密证书,但是我们不需要国密证书,也没有配置,所以最后又是提示国密证书找不到。 ``` 09:32:15.598 [run-main-0] DEBUG o.f.b.s.c.model.CryptoMaterialConfig - Load cryptoMaterial, caCertPath: data/conf/ssl/ca.crt, sdkCertPath: data/conf/ssl/sdk.crt, sdkPrivateKeyPath:data/conf/ssl/sdk.key, enSSLCertPath: null, enSSLPrivateKeyPath:null 09:32:15.654 [run-main-0] DEBUG o.f.b.s.c.model.ThreadPoolConfig - Init ThreadPoolConfig, channelProcessorThreadSize: 4, receiptProcessorThreadSize: 4, maxBlockingQueueSize: 102400 09:32:15.654 [run-main-0] INFO c.bayconnect.ledger.bcos.BcosContext - Create BcosSDK, configPath: ./bcos-config.toml 09:32:15.878 [run-main-0] INFO o.f.b.sdk.network.ConnectionManager - all connections, size: 2, list: [ConnectionInfo{host='127.0.0.1', port=20200}, ConnectionInfo{host='127.0.0.1', port=20201}] 09:32:15.879 [run-main-0] DEBUG o.fisco.bcos.sdk.network.NetworkImp - start connManager with ECDSA sslContext 09:32:15.879 [run-main-0] DEBUG o.f.b.sdk.network.ConnectionManager - start connect. 09:32:15.932 [run-main-0] INFO o.f.b.sdk.network.ConnectionManager - build ECDSA ssl context with configured certificates 09:32:16.685 [run-main-0] DEBUG o.f.b.sdk.network.ConnectionManager - startConnect to 127.0.0.1:20200 09:32:16.737 [run-main-0] DEBUG o.f.b.sdk.network.ConnectionManager - startConnect to 127.0.0.1:20201 09:32:16.819 [run-main-0] ERROR o.f.b.sdk.network.ConnectionManager - ssl handshake failed:/127.0.0.1:20200! Please make sure the certificate is correctly configured and copied, ensure that the SDK and the node are in the same agency! 09:32:16.820 [run-main-0] ERROR o.f.b.sdk.network.ConnectionManager - ssl handshake failed:/127.0.0.1:20201! Please make sure the certificate is correctly configured and copied, ensure that the SDK and the node are in the same agency! 09:32:16.820 [run-main-0] ERROR o.f.b.sdk.network.ConnectionManager - all connections have failed, [{"code":1, "msg":" ssl handshake failed:/127.0.0.1:20200! Please make sure the certificate is correctly configured and copied, ensure that the SDK and the node are in the same agency!"}, {"code":1, "msg":" ssl handshake failed:/127.0.0.1:20201! Please make sure the certificate is correctly configured and copied, ensure that the SDK and the node are in the same agency!"}] 09:32:16.823 [run-main-0] WARN o.f.b.s.config.model.ConfigProperty - Load config from data/conf/ssl/gm/gmca.crt failed, trying to load from the classpath, e: {} java.io.FileNotFoundException: data/conf/ssl/gm/gmca.crt (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) 省略其它堆栈…… 09:32:19.528 [run-main-0] DEBUG o.f.b.s.c.model.CryptoMaterialConfig - Load cryptoMaterial, caCertPath: data/conf/ssl/gm/gmca.crt, sdkCertPath: data/conf/ssl/gm/gmsdk.crt, sdkPrivateKeyPath:data/conf/ssl/gm/gmsdk.key, enSSLCertPath: data/conf/ssl/gm/gmensdk.crt, enSSLPrivateKeyPath:data/conf/ssl/gm/gmensdk.key 09:32:19.528 [run-main-0] DEBUG o.fisco.bcos.sdk.network.NetworkImp - stop Network... 09:32:19.529 [run-main-0] ERROR o.fisco.bcos.sdk.channel.ChannelImp - init channel network error, * Try init the sslContext failed. * If your blockchain channel config is NON-SM, please provide the NON-SM certificates: CryptoMaterialConfig{certPath='data/conf/ssl', caCertPath='data/conf/ssl/ca.crt', sdkCertPath='data/conf/ssl/sdk.crt', sdkPrivateKeyPath='data/conf/ssl/sdk.key', enSSLCertPath='null', enSSLPrivateKeyPath='null', sslCryptoType=0}. * If your blockchain channel config is SM, please provide the missing certificates: Please make sure data/conf/ssl/gm/gmca.crt data/conf/ssl/gm/gmsdk.crt data/conf/ssl/gm/gmsdk.key data/conf/ssl/gm/gmensdk.key data/conf/ssl/gm/gmensdk.crt exist! 09:32:19.530 [run-main-0] WARN o.fisco.bcos.sdk.channel.ChannelImp - The channel has already been stopped! 09:32:19.530 [run-main-0] DEBUG o.fisco.bcos.sdk.channel.ChannelImp - stop channel... 09:32:19.530 [run-main-0] DEBUG o.fisco.bcos.sdk.network.NetworkImp - stop Network... 09:32:19.530 [run-main-0] DEBUG o.fisco.bcos.sdk.channel.ChannelImp - stop channel succ... ```
评论 (
0
)
劲松
创建了
任务
登录
后才可以发表评论
状态
待办的
待办的
进行中
已完成
已关闭
负责人
未设置
标签
未设置
标签管理
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (22)
标签 (33)
master
release-3.7.1
release-3.9.0
release-3.8.0
dev-2.0
master-2.0
release-2.10.1
release-3.7.0
release-2.10.0
feature-3.7.0
release-3.6.0
release-3.3.1
dev
release-3.5.0
dalaocu-patch-1
release-3.2.3
release-2.9.3
release-3.2.2
release-3.4.0
release-3.3.0
dev-vrf
release-2.6.1
v3.8.0
v2.10.1
v3.7.0
v2.10.0
v3.6.0
v3.5.0
v3.2.3
v2.9.3
v3.2.2
v3.4.0
v3.3.0
v3.2.0
v3.1.2
v3.1.1
v3.1.0
v2.9.2
v3.0.1
v3.0.0
v3.0.0-rc3-bugfix
v3.0.0-rc4
v2.9.1
v3.0.0-rc2-bugfix
v2.9.0
v2.8.1
v3.0.0-rc3
v3.0.0-rc2
v3.0.0-rc1
v2.8.0
v2.7.2
v2.7.1
v2.7.0
v2.6.1
v2.6.1-rc1
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
参与者(1)
1
https://gitee.com/FISCO-BCOS/java-sdk.git
[email protected]
:FISCO-BCOS/java-sdk.git
FISCO-BCOS
java-sdk
java-sdk
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册