Timeout error when creating channel on cluster

6/19/2019

I have created a 2 org each having 2 peers and 1 orderer using solo configuration, which later on will be changed to raft configuration.

kubernetes cluster consist of 3 vagrant VMs, with 1 master and 2 node workers. They are linked using flannel.

I have been following this post. Everything has been doing well until peer channel create section.

deployed pods

NAMESPACE     NAME                                   READY   STATUS    RESTARTS   AGE
kube-system   coredns-fb8b8dccf-5rsfd                1/1     Running   0          17h
kube-system   coredns-fb8b8dccf-vjs75                1/1     Running   0          17h
kube-system   etcd-k8s-master                        1/1     Running   0          17h
kube-system   kube-apiserver-k8s-master              1/1     Running   0          17h
kube-system   kube-controller-manager-k8s-master     1/1     Running   0          17h
kube-system   kube-flannel-ds-amd64-hpbfz            1/1     Running   0          17h
kube-system   kube-flannel-ds-amd64-kb4j2            1/1     Running   0          17h
kube-system   kube-flannel-ds-amd64-r5npk            1/1     Running   0          17h
kube-system   kube-proxy-9mqj9                       1/1     Running   0          17h
kube-system   kube-proxy-vr9zt                       1/1     Running   0          17h
kube-system   kube-proxy-xz2fg                       1/1     Running   0          17h
kube-system   kube-scheduler-k8s-master              1/1     Running   0          17h
org1          ca-7cfc7bc4b6-k8bjm                    1/1     Running   0          16h
org1          cli-55dd4df5bb-6vn7g                   1/1     Running   0          16h
org1          peer0-org1-5c65b984d5-685bp            2/2     Running   0          16h
org1          peer1-org1-7b9cf7fbd4-hf9b9            2/2     Running   0          16h
org2          ca-567ccf7dcd-sgbxz                    1/1     Running   0          16h
org2          cli-76bb768f7f-mt9nx                   1/1     Running   0          16h
org2          peer0-org2-6c8fbbc7f8-n6msn            2/2     Running   0          16h
org2          peer1-org2-77fd5f7f67-blqpk            2/2     Running   0          16h
orgorderer1   orderer0-orgorderer1-7b6947868-d9784   1/1     Running   0          16h

error message when I tried to create channel

vagrant@k8s-master:~/articles-master/fabric_on_kubernetes/Fabric-on-K8S/setupCluster/crypto-config/peerOrganizations$ kubectl exec -it cli-55dd4df5bb-6vn7g bash --namespace=org1
root@cli-55dd4df5bb-6vn7g:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer0.orgorderer1:7050 -c mychannel -f ./channel-artifacts/channel.tx
2019-06-19 00:41:31.465 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2019-06-19 00:41:31.465 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2019-06-19 00:41:51.466 UTC [grpc] Printf -> DEBU 003 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: i/o timeout"; Reconnecting to {orderer0.orgorderer1:7050 <nil>}
Error: Error connecting due to  rpc error: code = Unavailable desc = grpc: the connection is unavailable

at the linked post, there are some people having the same problem. Some has solved it by using an ip instead of domain name. I tried to put ip, but it didn't work. What should I do to fix this problem?

-- Darwin Harianto
hyperledger-fabric
kubernetes

1 Answer

6/21/2019

There are few things you can do in order to fix it:

  1. Check if you meet all the Prerequisites

  2. Check the crypto material for your network or generate a new one: cryptogen generate --config=crypto-config.yaml --output=

  3. Check your firewall configuration. You may need to allow the appropriate ports through: firewall-cmd --add-port=xxxx/tcp --permanent

  4. Check your iptables service. You may need to stop it.

Please let me know if any of the above helped.

-- OhHiMark
Source: StackOverflow