多机部署fabric时,order节点已经开放7050端口。但是peer0org1却连接不到order节点。

第一台服务器hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.20.152.181  localhost localhost.localdomain localhost6 localhost6.localdomain6
10.20.152.181 orderer.example.com
10.20.152.182 peer0.org1.example.com
10.20.152.180 peer0.org2.example.com
127.0.0.1 orderer.example.com

且开放了端口

[root@localhost fabric]# docker ps -a
CONTAINER ID        IMAGE                        COMMAND             CREATED             STATUS                  PORTS                    NAMES
3c081a809e04        hyperledger/fabric-orderer   "orderer"           About an hour ago   Up About an hour        0.0.0.0:7050->7050/tcp   orderer.example.com
8ed3777821c0        hello-world                  "/hello"            3 days ago          Exited (0) 3 days ago                            determined_kirch

防火墙也关了

[root@localhost fabric]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

但是第二台182服务器防火墙也关了,hosts设置如下:

ping得到181

[root@localhost ~]# ping 10.20.152.181
PING 10.20.152.181 (10.20.152.181) 56(84) bytes of data.
64 bytes from 10.20.152.181: icmp_seq=1 ttl=64 time=0.156 ms
64 bytes from 10.20.152.181: icmp_seq=2 ttl=64 time=0.153 ms
64 bytes from 10.20.152.181: icmp_seq=3 ttl=64 time=0.213 ms
64 bytes from 10.20.152.181: icmp_seq=4 ttl=64 time=0.144 ms
^Z
[2]+  Stopped                 ping 10.20.152.181

却连接不到181的,请问如何解决,谢谢。

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.20.152.182  localhost localhost.localdomain localhost6 localhost6.localdomain6
10.20.152.181 orderer.example.com
10.20.152.182 peer0.org1.example.com
10.20.152.180 peer0.org2.example.com
127.0.0.1 peer0.org1.example.com
root@18cb9ac6fd10:/usr/local/gopath/src/github.com/hyperledger/fabric/peer# ORDERER_CA=/usr/local/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
root@18cb9ac6fd10:/usr/local/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/mychannel.tx --tls --cafile $ORDERER_CA
2020-03-17 13:36:26.321 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2020-03-17 13:36:26.331 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded
请先 登录 后评论

最佳答案 2020-04-13 20:24

你可以先用 netstat -anp 查看一下使用情况.

然后用telnet <host> <port> 查看一下端口的联通性. 

 这样排查一下看看.

请先 登录 后评论

其它 0 个回答

  • 0 关注
  • 0 收藏,7601 浏览
  • jixi 提出于 2020-03-17 13:56