HyperLedger Fabric 1.4 问题汇总(16)

网易云课堂视频在线教学,地址:https://study.163.com/course/introduction/1209401942.htm

16.1 在运行e2e_cli例子时,执行./network_setup.sh up,出现错误:网络搭建之network e2ecli_default not found

问题原因:

       End-2-End例子的目录是e2e_cli,启动后会创建一个docker network的名字为e2e_cli_default,但是配置中设置了e2ecli_default这个与生成的network名对应不上。

解决方法:

      修改e2e_cli/base目录下的peer-base.yaml中的配置,如下:

-CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_cli_default

 

16.2 在运行e2e_cli例子时,执行./network_setup.sh up,出现错误:Error: Error endorsing chaincode: rpc error: code = Unknown desc = Timeout expired while starting chaincode mycc:1.0(networkid:dev,peerid:peer0.org2.example.com,tx:d6902b58171dd3b9bafb981885959c263589fb66d475cff79a7b5c519c24a603)

问题原因:

       由于dev-peer0.org2.example.com-mycc-1.0 docker 镜像存在问题,需要删除。

解决方法:

       执行如下命令:

      1)删除旧的链码镜像

# docker stop $(docker ps -a -q)

# docker rm $(docker ps -a -q)

# docker rmi -f $(docker images |grep "dev-" |awk '{print $3}')

      2)重启Fabric网络

# ./network_setup.sh up

 

16.3 运行自主Helloworld案例时,出现Error: endorsement failure during query. response: status:500 message:"make sure the chaincode mycc has been successfully instantiated and try again: getccdata mychannel/mycc responded with error: could not find chaincode with name 'mycc'"

问题原因:

通过阿里云docker镜像时,获取latest版本时,还没有升级到1.2版本。

解决方法:

1)删除旧的链码镜像

# docker stop $(docker ps -a -q)

# docker rm $(docker ps -a -q)

# docker rmi $(docker images -q)

2)下载最新的镜像

# docker pull hyperledger/fabric-peer:amd64-1.2.0

# docker pull hyperledger/fabric-orderer:amd64-1.2.0

# docker pull hyperledger/fabric-tools:amd64-1.2.0

# docker pull hyperledger/fabric-ccenv:amd64-1.2.0

# docker pull hyperledger/fabric-baseos:amd64-0.4.10

 

16.4 运行自主Helloworld案例peer channel create时,出现Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded

问题原因:

       防火墙阻止了7050端口

解决方法:

# firewall-cmd --list-ports

# firewall-cmd --zone=public --add-port=7050/tcp --permanent

# firewall-cmd --reload

 

16.5 多机多节点部署在peer1.org2.example.com上执行peer channel join -b mychannel.block,出现,Error: error getting endorser client for channel: endorser client failed to connect to peer1.org2.example.com:7051: failed to create new connection: context deadline exceeded

问题原因:

       防火墙阻止了7051端口

解决方法:

# firewall-cmd --list-ports

# firewall-cmd --zone=public --add-port=7051/tcp --permanent

# firewall-cmd --reload

 

16.6 Fabric kafka生产环境部署启动Orderer时,出现orderer2.example.com|panic: [channel: testchainid] Cannot post CONNECT message = dial tcp 192.168.235.5:9092: connect: no route to host

问题原因:

       防火墙阻止了9092端口

解决方法:

# firewall-cmd --list-ports

# firewall-cmd --zone=public --add-port=9092/tcp --permanent

# firewall-cmd –reload

16.7 Fabric kafka生产环境部署节点(peer)智能合约实例化时,出现Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction 42306f917663058379fda4fd1dd7366d302b6bc9d6cd952c59701f38755caca4: timeout expired while starting chaincode cc-qklszzzcc:1.0 for transaction 42306f917663058379fda4fd1dd7366d302b6bc9d6cd952c59701f38755caca4

问题原因:

        域名没有和IP完成映射

解决方法:

# vi /etc/hosts

添加如下内容:

192.168.235.3 zookeeper0

192.168.235.4 zookeeper1

192.168.235.5 zookeeper2

192.168.235.3 kafka0

192.168.235.4 kafka1

192.168.235.5 kafka2

192.168.235.6 kafka3

192.168.235.3 orderer0.example.com

192.168.235.4 orderer1.example.com

192.168.235.5 orderer2.example.com

192.168.235.7 peer0.org1.example.com

192.168.235.8 peer1.org1.example.com

192.168.235.9 peer0.org2.example.com

192.168.235.10 peer1.org2.example.com

你可能感兴趣的:(HyperLedger Fabric 1.4 问题汇总(16))