启动Userland代理时出错:监听tcp 0.0.0.0:7050:绑定:地址已在使用中

时间:2019-05-19 14:39:04

标签: docker ubuntu proxy hyperledger-fabric userland

我正在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

1 个答案:

答案 0 :(得分: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