fabric2.1.1遇到的问题

部署fabric2.1.1遇到的问题

  • 1 关闭网络 ./network.sh down
  • 2 创建channel出现错误 ./network.sh createChannel
  • 3.报错

1 关闭网络 ./network.sh down

报错:ERROR: error while removing network: network net_default id 03df0cd31b56a4ab9b76970783fc896d9d04cec7deacd5e5d138eb351c630d3a has active endpoints

[root@harbor harbor]# docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
93f0ec306ab5        bridge              bridge              local
821031255cda        net_test 		   bridge              local

///查看网络详情
[root@VM_16_5_centos first-network]# docker network inspect net_test(可能会有不同的名称)
[
    {
        "Name": "net_test",	//参数一
        "Id": "03df0cd31b56a4ab9b76970783fc896d9d04cec7deacd5e5d138eb351c630d3a",
        "Created": "2019-07-08T17:43:58.037152286+08:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.20.0.0/16",
                    "Gateway": "172.20.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "e61b04e8d51f6b0dda01f44d628e971358cfba9263284aaa7ba2d45558b06418": {
                "Name": "peer0.org1.example.com",	//参数二
                "EndpointID": "ed235ad6d2e1b81258c5ba32a006a9c145c47d1840ac76b78bf6478ba6780c95",
                "MacAddress": "02:42:ac:14:00:02",
                "IPv4Address": "172.20.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

//断开网络,这里有两个参数 ,分别是上面标记的参数一和参数二
[root@VM_16_5_centos first-network]# docker network disconnect -f net_test peer0.org1.example.com
//然后就可以正常执行
[root@VM_16_5_centos first-network]# ./network down

2 创建channel出现错误 ./network.sh createChannel


go: github.com/hyperledger/[email protected]: Get https://proxy.golang.org/github.com/hyperledger/fabric-contract-api-go/@v/v1.0.0.mod: dial tcp 172.217.27.145:443: i/o timeout ~/fabric-samples/test-network Finished vendoring Go dependencies ++ peer lifecycle chaincode package fabcar.tar.gz --path ../chaincode/fabcar/go/ --lang golang --label fabcar_1 ++ res=1 ++ set +x Error: failed to normalize chaincode path: 'go list' failed with: go: github.com/hyperledger/[email protected]: Get https://proxy.golang.org/github.com/hyperledger/fabric-contract-api-go/@v/v1.0.0.mod: dial tcp 172.217.27.145:443: i/o timeout: exit status 1 !!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!!

ERROR !!! Deploying chaincode failed

解决办法

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct

3.报错

报错:
Error: failed to create deliver client for orderer: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: connection error: desc = “transport: error while dialing: dial tcp 192.168.1.20:7050: connect: no route to host”

systemctl status firewalld.service          #查看防火墙状态
systemctl stop firewalld.service            #停止firewall
systemctl disable firewalld.service         #禁止firewall开机启动

你可能感兴趣的:(区块链)