Error connecting to orderer.example.com:7050 due to x509: certificate signed by unknown authority
前言
fabric ,【https://www.cnblogs.com/studyzy/p/6973334.html】
: Instantiate, , a 100 ,b 200 。
peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile **/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem** -C mychannel -n devincc -v 1.0 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member')"
問題は次のとおりです。
2018-05-29 02:36:19.191 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-05-29 02:36:19.191 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity Error: Error getting broadcast client: Error connecting to orderer.example.com:7050 due to x509: certificate signed by unknown authority
解決手順
最后に解决しましたが、过程は振り返るに堪えません.博文stackoverflowをめくっても乾物がないので、指定したca证明书に问题があるかもしれないと思って、変えてみました.
ダメ?証明書を変えてもう一度
root@241d433ba845:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com# peer chaincode instantiate -o orderer.example.com:7050 –tls $CORE_PEER_TLS_ENABLED –cafile/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem-C mychannel-n devincc-v 1.0-c'{"Args":["init","a","100","b","200"}}}'-P"OR(‘Org 1 MSP.member’,"Org 2 MSSP.member")》これでいいです...気まずいのはmarkdownのエディタの画像に問題があります:(しかし成功した結果は上のブログで見ることができます!
参照
【1】https://www.cnblogs.com/studyzy/p/6973334.html