1

我正在 Linux 上设置 Hyperledger Fabric 专用网络,并在运行 ./byfn.sh 时收到消息

因为我是 Ubuntu 和 docker 的新手,所以我认为需要更改端口才能解决问题,但是,我不知道这样做。任何帮助,将不胜感激。

alaa@ubuntu:~/fabric-samples/first-network$ sudo netstat -pna | grep 7050
tcp6       0      0 :::7050                   :::*                    LISTEN      3682/docker-proxy 

做了一个 netstat 来检查端口及其 docker-proxy

alaa@ubuntu:~/fabric-samples/first-network$ sudo ./byfn.sh up
Starting with channel 'mychannel' and CLI timeout of '10' seconds and CLI     delay of '3' seconds
Continue? [Y/n] y
proceeding ...
2019-05-19 14:07:22.820 UTC [main] main -> INFO 001 Exiting.....
LOCAL_VERSION=1.1.0
DOCKER_IMAGE_VERSION=1.1.0
Creating network "net_byfn" with the default driver
Creating volume "net_orderer.example.com" with default driver
Creating volume "net_peer0.org1.example.com" with default driver    
Creating volume "net_peer1.org1.example.com" with default driver
Creating volume "net_peer0.org2.example.com" with default driver
Creating volume "net_peer1.org2.example.com" with default driver
Creating orderer.example.com    ... error
Creating peer1.org2.example.com ... 
Creating peer1.org1.example.com ... 
Creating peer0.org1.example.com ... 
Creating peer1.org2.example.com ... done
Creating peer1.org1.example.com ... done
Creating peer0.org1.example.com ... done
Creating peer0.org2.example.com ... done

ERROR: for orderer.example.com  Cannot start service orderer.example.com: b'driver failed programming external connectivity on endpoint     orderer.example.com     (60d170dbc933d3c2de9eacd1bb6c7842cf79a52b3a938c9e0e69d1bd55f5e1a9): Error     starting userland proxy: listen tcp 0.0.0.0:7050: bind: address already in use'
ERROR: Encountered errors while bringing up the project.
ERROR !!!! Unable to start network
alaa@ubuntu:~/fabric-samples/first-network$ sudo netstat -pna | grep 7050
tcp6       0      0 :::7050                 :::*                    LISTEN          3682/docker-proxy
4

1 回答 1

0

好吧,首先对于任何类型的超级账本教程,你最好按照官方链接,因为大多数其他来源也来自那个:https ://hyperledger-fabric.readthedocs.io/en/release-1.4/

其次,关闭网络,停止并删除所有正在运行的和以前的容器,重新启动 docker,重新运行网络,应该可以正常工作:

$./byfn.sh down
$docker ps -qa|xargs docker rm
$sudo systemctl daemon-reload
$sudo systemctl restart docker
$cd....fabric-samples/first-network
$./byfn.sh -m generate
$./byfn.sh -m up
于 2019-07-02T06:16:50.580 回答