ssl_transport_security.cc:599]无法加载任何根证书 [英] ssl_transport_security.cc:599] Could not load any root certificate

查看:287
本文介绍了ssl_transport_security.cc:599]无法加载任何根证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用hyperledger compposer/fabric(v0.19.0)创建自己的网络 网络构建似乎很好,但是当我做一个 composer network install ... 我收到此错误: Composer Install.... ⠹ Installing business network. This may take a minute...E0405 10:16:40.355332702 7660 ssl_transport_security.cc:599] Could not load any root certificate. E0405 10:16:40.355402056 7660 ssl_transport_security.cc:1400] Cannot load server root certificates. E0405 10:16:40.355430951 7660 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0405 10:16:40.355453680 7660 secure_channel_create.cc:111] Failed to create secure subchannel for secure name '172.31.136.4:7051' E0405 10:16:40.355471629 7660 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation.

I try to create my own network with hyperledger compposer/fabric (v0.19.0) The network build seems to be good but when I do a composer network install ... I got this error : Composer Install.... ⠹ Installing business network. This may take a minute...E0405 10:16:40.355332702 7660 ssl_transport_security.cc:599] Could not load any root certificate. E0405 10:16:40.355402056 7660 ssl_transport_security.cc:1400] Cannot load server root certificates. E0405 10:16:40.355430951 7660 security_connector.cc:1025] Handshaker factory creation failed with TSI_INVALID_ARGUMENT. E0405 10:16:40.355453680 7660 secure_channel_create.cc:111] Failed to create secure subchannel for secure name '172.31.136.4:7051' E0405 10:16:40.355471629 7660 secure_channel_create.cc:142] Failed to create subchannel arguments during subchannel creation.

有人可以帮助我吗?

PS:如果需要,我可以提供代码.

PS : I can provide code if needed.

推荐答案

好的,我想我可以回答我自己的问题. 该缺陷位于 MultiOrg Hyperledger tuto 中他们使用此cmd替换connection.json中的证书:

OK, I think I can answer my own question. The fack is in the MultiOrg Hyperledger tuto they use this cmd to replace the certificates in the connection.json :

awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt

我尝试将此cmd注入我的sed cmd中,但失败了,因为sed似乎用真正的新行替换了'\ n',从而使json损坏了. 要替换json文件中的证书,我使用了以下cmd:

I try to inject this cmd in my sed cmd but it failed because sed seems to replace '\n' by a real new line making the json corrupted. To replace the certificate in the json file, I used this cmd :

export ORG1_CA_CERT=$(awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' composer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt)    
perl -p -i -e 's@INSERT_ORG1_CA_CERT@$ENV{ORG1_CA_CERT}@g' connection.json

它之所以有效,是因为perl可以正确打印字符,并且不解释它们.

And it works because perl prints correctly the chars and doesn't interprets them.

这篇关于ssl_transport_security.cc:599]无法加载任何根证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆