Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orderer grpc://localhost:7050 has an error Error: Failed to connect before the deadline URL:grpc://localhost:7050 #415

Closed
zzpp3377 opened this issue Apr 25, 2019 · 3 comments · Fixed by #520
Labels
question Further information is requested

Comments

@zzpp3377
Copy link

hyperledger fabric 1.4
I can run “npm run bench -- -c benchmark/simple/config.yaml -n network/fabric-v1.4/2org1peergoleveldb/fabric-go.json” successfully.
Then, i want to change some parameter of orderer. So, i run "configtxgen -profile OrgsOrdererGenesis -outputBlock orgs.genesis.block -channelID mychannel" to generate a new orgs.genesis.block at path "caliper/network/fabric-v1.4/config".
However, i get this error when i run “npm run bench -- -c benchmark/simple/config.yaml -n network/fabric-v1.4/2org1peergoleveldb/fabric-go.json” again.
error: Orderer grpc://localhost:7050 has an error Error: Failed to connect before the deadline URL:grpc://localhost:7050

Context

npm run bench -- -c benchmark/simple/config.yaml -n network/fabric-v1.4/2org1peergoleveldb/fabric-go.json

[email protected] bench /home/zp/caliper/caliper
node ./scripts/main.js "-c" "benchmark/simple/config.yaml" "-n" "network/fabric-v1.4/2org1peergoleveldb/fabric-go.json"

info: [bench-flow.js]: ####### Caliper Test #######
info: [bench-flow.js]: Executing command: docker-compose -f network/fabric-v1.4/2org1peergoleveldb/docker-compose.yaml up -d;sleep 3s
Creating network "2org1peergoleveldb_default" with the default driver
Creating ca.org1.example.com ... done
Creating orderer.example.com ... done
Creating ca.org2.example.com ... done
Creating peer0.org2.example.com ... done
Creating peer0.org1.example.com ... done
info: [create-channel.js]: Creating mychannel...
2019-04-25T04:49:34.015Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpc://localhost:7050
2019-04-25T04:49:34.016Z - error: [Orderer.js]: Orderer grpc://localhost:7050 has an error Error: Failed to connect before the deadline URL:grpc://localhost:7050
error: [create-channel.js]: Failed to create channels: Error: Failed to connect before the deadline URL:grpc://localhost:7050
at checkState (/home/zp/caliper/caliper/node_modules/grpc/src/client.js:720:16)
error: [fabric.js]: Fabric initialization failed: Error: Failed to connect before the deadline URL:grpc://localhost:7050
at checkState (/home/zp/caliper/caliper/node_modules/grpc/src/client.js:720:16)
error: [bench-flow.js]: Error: Error: Failed to connect before the deadline URL:grpc://localhost:7050
at checkState (/home/zp/caliper/caliper/node_modules/grpc/src/client.js:720:16)
info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
info: [bench-flow.js]: Executing command: docker-compose -f network/fabric-v1.4/2org1peergoleveldb/docker-compose.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev* -q)
Stopping peer0.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Stopping ca.org1.example.com ... done
Stopping ca.org2.example.com ... done
Removing peer0.org1.example.com ... done
Removing peer0.org2.example.com ... done
Removing ca.org1.example.com ... done
Removing ca.org2.example.com ... done
Removing orderer.example.com ... done
Removing network 2org1peergoleveldb_default

something i observed

The container orderer.example.com ran successfully at the beginning. But it crashed before “Creating mychannel” operation.

My Environment

ubuntu 14.04
hyperledger fabric 1.4
caliper cloned from master branch on 2019.4.24

I need some help.

@aklenik
Copy link
Contributor

aklenik commented Apr 26, 2019

@zzpp3377 try changing the system channel ID to something else, for example:
configtxgen -profile OrgsOrdererGenesis -outputBlock orgs.genesis.block -channelID syschannel

It is also recommended to check the docker logs of the nodes when you run into these kinds of connection errors.

@aklenik aklenik added the question Further information is requested label Apr 26, 2019
@zzpp3377
Copy link
Author

@aklenik ,thank you.
I check the docker logs of orderer.example.com:

docker logs orderer.example.com
2019-04-26 13:16:11.668 UTC [localconfig] completeInitialization -> INFO 001 Kafka.Version unset, setting to 0.10.2.0
2019-04-26 13:16:11.684 UTC [orderer.common.server] prettyPrintStruct -> INFO 002 Orderer config values:
General.LedgerType = "file"
.......
Metrics.Statsd.Prefix = ""
2019-04-26 13:16:13.699 UTC [fsblkstorage] newBlockfileMgr -> INFO 003 Getting block information from block storage
2019-04-26 13:16:14.943 UTC [orderer.commmon.multichannel] newLedgerResources -> PANI 004 Error creating channelconfig bundle: initializing channelconfig failed: could not create channel Orderer sub-group config: setting up the MSP manager failed: the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.example.com")
panic: Error creating channelconfig bundle: initializing channelconfig failed: could not create channel Orderer sub-group config: setting up the MSP manager failed: the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.example.com")

That error occurs because i change some files under "caliper/network/fabric-v1.4/config/crypto-config". So, i delete the directory and run generate.sh under "caliper/network/fabric-v1.4/config/". However, i get another error, when i run run “npm run bench -- -c benchmark/simple/config.yaml -n network/fabric-v1.4/2org1peergoleveldb/fabric-go.json”:

npm run bench -- -c benchmark/simple/config.yaml -n network/fabric-v1.4/2org1peergoleveldb/fabric-go.json

[email protected] bench /home/zp/caliper/caliper
node ./scripts/main.js "-c" "benchmark/simple/config.yaml" "-n" "network/fabric-v1.4/2org1peergoleveldb/fabric-go.json"

info: [bench-flow.js]: ####### Caliper Test #######
info: [bench-flow.js]: Executing command: docker-compose -f network/fabric-v1.4/2org1peergoleveldb/docker-compose.yaml up -d;sleep 3s
Creating network "2org1peergoleveldb_default" with the default driver
Creating ca.org2.example.com ... done
Creating ca.org1.example.com ... done
Creating orderer.example.com ... done
Creating peer0.org1.example.com ... done
Creating peer0.org2.example.com ... done
info: [create-channel.js]: Creating mychannel...
error: [create-channel.js]: Failed to create channels: Error: Create status for mychannel is BAD_REQUEST with information error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/Org3MSP but was in the read set
at Object.run (/home/zp/caliper/caliper/src/adapters/fabric/create-channel.js:125:23)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
error: [fabric.js]: Fabric initialization failed: Error: Create status for mychannel is BAD_REQUEST with information error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/Org3MSP but was in the read set
at Object.run (/home/zp/caliper/caliper/src/adapters/fabric/create-channel.js:125:23)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
error: [bench-flow.js]: Error: Error: Create status for mychannel is BAD_REQUEST with information error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/Org3MSP but was in the read set
at Object.run (/home/zp/caliper/caliper/src/adapters/fabric/create-channel.js:125:23)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
info: [bench-flow.js]: Executing command: docker-compose -f network/fabric-v1.4/2org1peergoleveldb/docker-compose.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev* -q)
Stopping peer0.org2.example.com ... done
Stopping peer0.org1.example.com ... done
Stopping orderer.example.com ... done
Stopping ca.org1.example.com ... done
Stopping ca.org2.example.com ... done
Removing peer0.org2.example.com ... done
Removing peer0.org1.example.com ... done
Removing orderer.example.com ... done
Removing ca.org1.example.com ... done
Removing ca.org2.example.com ... done
Removing network 2org1peergoleveldb_default

https://stackoverflow.com/questions/51590202/channel-creation-fails-in-hyperledger-fabric-v1-2 explain the error. Just like aklenik said, i changed the channelID of genesis, and run successfully.

@aklenik
Copy link
Contributor

aklenik commented Apr 30, 2019

@zzpp3377 If you add an extra organization, make sure you also include it in the network config file for Caliper/Fabric adapter, otherwise, channel creation transactions won't be signed by that org (since Caliper doesn't know about it) which could result in the above error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants