Closed erickzzh closed 5 years ago
I think you will also run into the problem of having an invalid channelID as it has to be all lowercase.
Thanks!
I changed MicroGridChannel
to mg_channel
.
Entered the cli:
docker exec -it cli bash
and tried to create the channel:
export CHANNEL_NAME=mg_channel
peer channel create -o orderer.microgrid:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/microgrid.org/orderers/orderer.microgrid.org/msp/tlscacerts/tlsca.microgrid.org-cert.pem
But, I still got an error (although another):
2018-09-25 01:03:22.555 UTC [grpc] Printf -> DEBU 03b ClientConn switching balancer to "pick_first"
2018-09-25 01:03:22.555 UTC [grpc] Printf -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4205f6ac0, CONNECTING
2018-09-25 01:03:22.757 UTC [grpc] Printf -> DEBU 03d grpc: addrConn.createTransport failed to connect to {orderer.microgrid:7050 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: lookup orderer.microgrid on 127.0.0.11:53: no such host". Reconnecting...
2018-09-25 01:03:22.757 UTC [grpc] Printf -> DEBU 03e pickfirstBalancer: HandleSubConnStateChange: 0xc4205f6ac0, TRANSIENT_FAILURE
2018-09-25 01:03:23.555 UTC [grpc] Printf -> DEBU 03f pickfirstBalancer: HandleSubConnStateChange: 0xc4205f6ac0, CONNECTING
2018-09-25 01:03:23.612 UTC [grpc] Printf -> DEBU 040 grpc: addrConn.createTransport failed to connect to {orderer.microgrid:7050 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: lookup orderer.microgrid on 127.0.0.11:53: no such host". Reconnecting...
2018-09-25 01:03:23.613 UTC [grpc] Printf -> DEBU 041 pickfirstBalancer: HandleSubConnStateChange: 0xc4205f6ac0, TRANSIENT_FAILURE
2018-09-25 01:03:24.877 UTC [grpc] Printf -> DEBU 042 pickfirstBalancer: HandleSubConnStateChange: 0xc4205f6ac0, CONNECTING
2018-09-25 01:03:24.916 UTC [grpc] Printf -> DEBU 043 grpc: addrConn.createTransport failed to connect to {orderer.microgrid:7050 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: lookup orderer.microgrid on 127.0.0.11:53: no such host". Reconnecting...
2018-09-25 01:03:24.916 UTC [grpc] Printf -> DEBU 044 pickfirstBalancer: HandleSubConnStateChange: 0xc4205f6ac0, TRANSIENT_FAILURE
Error: failed to create deliver client: orderer client failed to connect to orderer.microgrid:7050: failed to create new connection: context deadline exceeded
The issue seems similar to this.
yea I had a similar issue like that before
Error: failed to create deliver client: orderer client failed to connect to orderer.microgrid:7050: failed to create new connection: context deadline exceeded
I received the same error msg above and it was caused by a config file setup issue. I will look into your code and try something
I am still getting the illegal channel name error I think you can do "mg-channel" but not "mg_channel"
In order to fix the error below
Error: failed to create deliver client: orderer client failed to connect to orderer.microgrid:7050: failed to create new connection: context deadline exceeded
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
make sure that you run the following commands in sequence after you fix the error. This cleans up the old volumes and configs.
docker-compose -f docker-compose-cli.yaml down --volumes
docker-compose -f docker-compose-cli.yaml up -d
I also messed up the channel creation command last night it should've been
export CHANNEL_NAME=mg_channel
peer channel create -o orderer.microgrid.org:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/microgrid.org/orderers/orderer.microgrid.org/msp/tlscacerts/tlsca.microgrid.org-cert.pem
Hopefully, it will work now :)
Thanks!! I had to remove all content from crypto-config and channel-artifacts manually. But now, it seems to work. Last lines printed:
2018-09-25 22:06:17.575 UTC [grpc] HandleSubConnStateChange -> DEBU 04b pickfirstBalancer: HandleSubConnStateChange: 0xc4204a78f0, CONNECTING
2018-09-25 22:06:17.577 UTC [grpc] HandleSubConnStateChange -> DEBU 04c pickfirstBalancer: HandleSubConnStateChange: 0xc4204a78f0, READY
2018-09-25 22:06:17.597 UTC [msp] GetDefaultSigningIdentity -> DEBU 04d Obtaining default signing identity
2018-09-25 22:06:17.597 UTC [msp] GetDefaultSigningIdentity -> DEBU 04e Obtaining default signing identity
2018-09-25 22:06:17.597 UTC [msp/identity] Sign -> DEBU 04f Sign: plaintext: 0A84070A1508051A0608D9E2AADD0522...F20BF3EFFB6912080A021A0012021A00
2018-09-25 22:06:17.597 UTC [msp/identity] Sign -> DEBU 050 Sign: digest: 674461B27C11E87F9BD4A4F2ADD7E0DBE78F86F0B61F8A15CC51028E6CABCC92
2018-09-25 22:06:17.616 UTC [cli/common] readBlock -> INFO 051 Received block: 0
I noticed that your channel wont create maybe try running the following code on the order
The peer channel create command returns a genesis block which will be used to join the channel. You can check that by running ls command to review that the file {your channel}.block has been created.