我正在尝试使用结构样本的第一个网络组件来构建自己的网络。从字面上看只是重命名了组织名称并尝试进行连接。但是我收到以下错误。
./byfn.sh up -c "trustrace"
Starting for channel 'trustrace' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] Y
proceeding ...
LOCAL_VERSION=1.3.0
DOCKER_IMAGE_VERSION=1.3.0
Starting peer1.supplier.company.org ...
peer1.brand.company.org is up-to-date
Starting peer1.supplier.company.org
peer0.brand.company.org is up-to-date
Starting peer0.supplier.company.org ...
Starting orderer.company.org ...
Starting peer0.supplier.company.org
Starting peer0.supplier.company.org ... done
cli is up-to-date
____ _____ _ ____ _____
/ ___| |_ _| / \ | _ \ |_ _|
\___ \ | | / _ \ | |_) | | |
___) | | | / ___ \ | _ < | |
|____/ |_| /_/ \_\ |_| \_\ |_|
Build your first network (BYFN) end-to-end test
Channel name : trustrace
Creating channel...
+ peer channel create -o orderer.company.org:7050 -c trustrace -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/company.org/orderers/orderer.company.org/msp/tlscacerts/tlsca.company.org-cert.pem
+ res=1
+ set +x
Error: failed to create deliver client: orderer client failed to connect to orderer.company.org:7050: failed to create new connection: context deadline exceeded
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
编辑
我的主机文件中已经有company.org,该文件已转换为localhost-127.0.0.1,调试日志在此处:
2018-11-28 07:28:13.588 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-11-25 07:23:00 +0000 UTC
2018-11-28 07:28:13.588 UTC [msp] Validate -> DEBU 036 MSP BrandMSP validating identity
2018-11-28 07:28:13.589 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity
2018-11-28 07:28:13.589 UTC [grpc] DialContext -> DEBU 038 parsed scheme: ""
2018-11-28 07:28:13.589 UTC [grpc] DialContext -> DEBU 039 scheme "" not registered, fallback to default scheme
2018-11-28 07:28:13.589 UTC [grpc] watcher -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.company.org:7050 0 <nil>}]
2018-11-28 07:28:13.589 UTC [grpc] switchBalancer -> DEBU 03b ClientConn switching balancer to "pick_first"
2018-11-28 07:28:13.590 UTC [grpc] HandleSubConnStateChange -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, CONNECTING
2018-11-28 07:28:13.591 UTC [grpc] createTransport -> DEBU 03d grpc: addrConn.createTransport failed to connect to {orderer.company.org:7050 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: lookup orderer.company.org on 127.0.0.11:53: no such host". Reconnecting...
2018-11-28 07:28:13.591 UTC [grpc] HandleSubConnStateChange -> DEBU 03e pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, TRANSIENT_FAILURE
2018-11-28 07:28:14.590 UTC [grpc] HandleSubConnStateChange -> DEBU 03f pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, CONNECTING
2018-11-28 07:28:14.593 UTC [grpc] createTransport -> DEBU 040 grpc: addrConn.createTransport failed to connect to {orderer.company.org:7050 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: lookup orderer.company.org on 127.0.0.11:53: no such host". Reconnecting...
2018-11-28 07:28:14.593 UTC [grpc] HandleSubConnStateChange -> DEBU 041 pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, TRANSIENT_FAILURE
2018-11-28 07:28:16.115 UTC [grpc] HandleSubConnStateChange -> DEBU 042 pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, CONNECTING
2018-11-28 07:28:16.121 UTC [grpc] createTransport -> DEBU 043 grpc: addrConn.createTransport failed to connect to {orderer.company.org:7050 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: lookup orderer.company.org on 127.0.0.11:53: no such host". Reconnecting...
2018-11-28 07:28:16.121 UTC [grpc] HandleSubConnStateChange -> DEBU 044 pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, TRANSIENT_FAILURE
Error: failed to create deliver client: orderer client failed to connect to orderer.company.org:7050: failed to create new connection: context deadline exceeded
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
答案 0 :(得分:0)
发生此错误是因为先前的卷干扰了当前卷。尝试在重新启动网络之前删除所有卷。
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker volume prune
前2个命令将删除所有正在运行的容器。 (如果要删除所有卷,请选中此选项),最后一个命令将删除所有以前的卷。