admin管理员组

文章数量:1642239

在执行 创建通道 的命令时

peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls --cafile /home/user/go/src/github.com/hyperledger/fabric/scripts/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

出现以下错误:

Error:  
failed to create deliver client for orderer:  
failed to load config for OrdererClient:  
unable to load orderer.tls.rootcert.file: 
open /home/user/go/src/github/hyperledger/fabric/scripts/fabric-samples/test-network/organizations/ordererOrganizations/example/orderers/orderer.example/msp/tlscacerts/tlsca.example-cert.pem: no such file or directory

原因:
命令中的路径拼写错误

解决方法:

peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls --cafile  \
/home/user/go/src/github/hyperledger/fabric/scripts/fabric-samples/test-network/organizations/ordererOrganizations/example/orderers/orderer.example/msp/tlscacerts/tlsca.example-cert.pem

改成

peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls --cafile  \
/home/对应的用户名/go/src/github/hyperledger/fabric/scripts/fabric-samples/test-network/organizations/ordererOrganizations/example/orderers/orderer.example/msp/tlscacerts/tlsca.example-cert.pem

(虽然这个错误不用咋想就能给解决掉,但是我弄了几天才注意到这是命令中的路径拼写错误的问题,而不是配置文件的错误。。。。)

本文标签: 通道loadordererunableError