【Bcos】create BcosSDK failed, error info: init channel network error

create BcosSDK failed, error info: init channel network error: Try init the sslContext failed.


Try init the sslContext failed.)

在本机搭建了Fisco Bcos环境,使用的非国密版,Java环境连接的时候报如下错误

Caused by: org.fisco.bcos.sdk.BcosSDKException: create BcosSDK failed, error info: 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='conf', caCertPath='conf/ca.crt', sdkCertPath='conf/sdk.crt', sdkPrivateKeyPath='conf/sdk.key', enSSLCertPath='null', enSSLPrivateKeyPath='null', sslCryptoType=0}.

* If your blockchain channel config is SM, please provide the missing certificates: Please make sure conf/gm/gmsdk.crt conf/gm/gmsdk.key exist!

造成这个问题的原因有很多,可以从以下几个角度去排查:

1、确认openssl相关环境是否安装

2、确认项目证书文件配置正确,检查证书文件所在目录是否正确的被加载

3、也有可能是依赖版本的问题,我出现此错误的原因是依赖版本冲突导致的,当前pom引用的netty依赖版本与bcos-java-sdk中引用的依赖版本不一致导致的。

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值