关注tutorials,当我尝试使用以下命令./byfn.sh -m up
启动网络时,出现错误:
Starting with channel 'mychannel' and CLI timeout of '10000'
Continue (y/n)?y
proceeding ...
...
____ _____ _ ____ _____
/ ___| |_ _| / \ | _ \ |_ _|
\___ \ | | / _ \ | |_) | | |
___) | | | / ___ \ | _ < | |
|____/ |_| /_/ \_\ |_| \_\ |_|
Build your first network (BYFN) end-to-end test
...
===================== PEER0 joined on the channel "mychannel"
=====================
2017-09-25 06:58:27.580 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
Error: Error getting endorser client channel: PER:404 - Error trying to connect to local peer
...
/opt/go/src/runtime/proc.go:192 runtime.main
/opt/go/src/runtime/asm_amd64.s:2087 runtime.goexit
Caused by: x509: certificate is valid for peer0.org1.example.com, peer0, not peer1.org1.example.com
Usage:
peer channel join [flags]
Flags:
-b, --blockpath string Path to file containing genesis block
...
我检查了软件版本,它们应该是正确的。
$ uname -a
Darwin HMacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
$ docker version
Client:
Version: 17.07.0-ce-rc2
API version: 1.31
Go version: go1.8.3
Git commit: 36ce605
Built: Mon Aug 7 23:43:03 2017
OS/Arch: darwin/amd64
Server:
Version: 17.07.0-ce-rc2
API version: 1.31 (minimum version 1.12)
Go version: go1.8.3
Git commit: 36ce605
Built: Mon Aug 7 23:48:34 2017
OS/Arch: linux/amd64
Experimental: true
$ docker-compose version
docker-compose version 1.15.0, build e12f3b9
docker-py version: 2.4.2
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016
$ node -v
v6.9.5
$ python --version
Python 2.7.13
码头信息:
$ docker images | grep hyper
hyperledger/fabric-ca latest 7e53be14f804 3 weeks ago 238MB
hyperledger/fabric-ca x86_64-1.0.2 7e53be14f804 3 weeks ago 238MB
hyperledger/fabric-tools latest ba9750b2565d 3 weeks ago 1.33GB
hyperledger/fabric-tools x86_64-1.0.2 ba9750b2565d 3 weeks ago 1.33GB
hyperledger/fabric-couchdb latest 3f922f54bd68 3 weeks ago 1.47GB
hyperledger/fabric-couchdb x86_64-1.0.2 3f922f54bd68 3 weeks ago 1.47GB
hyperledger/fabric-kafka latest 0b4b1d249e65 3 weeks ago 1.29GB
hyperledger/fabric-kafka x86_64-1.0.2 0b4b1d249e65 3 weeks ago 1.29GB
hyperledger/fabric-zookeeper latest 1efb063147d3 3 weeks ago 1.3GB
hyperledger/fabric-zookeeper x86_64-1.0.2 1efb063147d3 3 weeks ago 1.3GB
hyperledger/fabric-orderer latest 6efd17e86e65 3 weeks ago 151MB
hyperledger/fabric-orderer x86_64-1.0.2 6efd17e86e65 3 weeks ago 151MB
hyperledger/fabric-peer latest 0e2ed51971c9 3 weeks ago 154MB
hyperledger/fabric-peer x86_64-1.0.2 0e2ed51971c9 3 weeks ago 154MB
hyperledger/fabric-javaenv latest 0be45dbd7ff4 3 weeks ago 1.41GB
hyperledger/fabric-javaenv x86_64-1.0.2 0be45dbd7ff4 3 weeks ago 1.41GB
hyperledger/fabric-ccenv latest d0f166e1a89e 3 weeks ago 1.28GB
hyperledger/fabric-ccenv x86_64-1.0.2 d0f166e1a89e 3 weeks ago 1.28GB
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3e12dd9ea9ac hyperledger/fabric-tools "/bin/bash -c './s..." About an hour ago Up About an hour cli
942ff1a22c17 hyperledger/fabric-peer "peer node start" About an hour ago Up About an hour 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
9e75ab80502d hyperledger/fabric-peer "peer node start" About an hour ago Up About an hour 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
67a545f37af1 hyperledger/fabric-peer "peer node start" About an hour ago Up About an hour 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
a4dedbab71fa hyperledger/fabric-peer "peer node start" About an hour ago Up About an hour 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
a5fb0662c227 hyperledger/fabric-orderer "orderer" About an hour ago Up About an hour 0.0.0.0:7050->7050/tcp orderer.example.com
为什么呢?我该如何解决?需要你的帮助!
我尝试向下和向上网络(./byfn.sh -m down
,./byfn.sh -m up
),但它无效。然后,我删除路径$ GOPATH / src / github.com / hyperledger / fabric-samples中的所有docker镜像和所有语言环境文件,错误是相同的。
答案 0 :(得分:0)
引起:x509:证书对peer0.org1.example.com有效, peer0,而不是peer1.org1.example.com
这是因为您尝试连接到peer1.org1.example.com 但实际存在的同行是peer0.org1.example.com
这可能是因为错误的环境变量CORE_PEER_ADDRESS。 在之前的脚本中打印并亲自查看。