-
Notifications
You must be signed in to change notification settings - Fork 404
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
Caliper 0.5.0 docker image bind fails #1511
Comments
Because you are using the 1.4 fabric connector, haven't specified using the gateway option (as only the gateway option supports using discovery) and your network configuration file specifically specifies discovery=false) this is expected because without discovery you have to provide a complete description of your fabric network, including all the peers involved and all the orderers. You haven't specified the orderers in the network configuration file which is why you get this error. See https://hyperledger.github.io/caliper/v0.5.0/fabric-config/new/#binding-with-fabric-14 and the section in general about how to configure a network configuration file for hyperledger fabric. If you are still using fabric 1.4 (really you shouldn't) you can still bind to the fabric 2.2 connector as it will work with fabric 1.4. With fabric 2.2 it always uses the gateway mechanism and then you can enable discovery in your network configuration file which would mean you wouldn't have to explicitly describe your whole fabric network. |
Thanks for the reply, I tried what you suggested by using the command with fabric:2.2 and setting discover as true. With that, I am getting timeout from calliper when it's trying to connect to fabric blockchain. The logs are here:
|
There is a connectivity problem now between caliper and the peer peer0.user.metasurance.com on url:grpcs://localhost:8051. It could be that the connection-profile you specified is incorrect in some way, for example the tls ca certificates specified are not correct. This is really a fabric issue now as caliper just uses the standard fabric node sdk to communicate with fabric and the initial discovery is all handled by the fabric node sdk. Suggest you check your connection profile is correct, your peer is contactable on localhost:8051 and that the tls CA certs are correct (ie they were the CA certs that signed the tls cert being used by the peer). |
Just for clarity, the |
Hello @davidkel is it possible by any chance that the docker images of peer orgs are running in my local system(eg: port 8051 in localhost of host PC), and caliper docker container cannot access the localhost from inside the container? Because I already have a working backend and frontend for my fabric network, and everything seems to work smoothly there, only in caliper there is the timeout error |
I haven't used fabric for a long time now so can't remember the contents of the tlsca directory generated by cryptogen, but clientSignedCert wouldn't be the one I would use for a tlsca certificate. |
Okay, I was unable to fix the error, but I was able to run caliper locally from npm after switching from WSL to a linux system(I was getting some build errors in WSL). For record purposes, my issue with docker seems similiar to this in stackoverflow: https://stackoverflow.com/questions/65605285/why-containerized-version-of-hl-caliper-is-always-trying-to-connect-to-localhost, but the solution given as of now did not work for me. Maybe it will get more answers in the future. If anyone facing the build error while binding with fabric like me, try to use a Linux system rather than WSL, node v16 LTS or v14 LTS is best, python v3.10 is required(does not work with 3.11 unfortunately). I guess we can close this issue for now. |
@aritroCoder The specific problem in that stackoverflow issue was due to a mistake in the docs which meant it didn't correctly turn off converting hostnames to localhost when fabric discovery results are returned. |
Which Caliper version are you using?
v0.5.0
Which Node.JS version are you using?
v16.20.2
Which operating system are you using?
Ubuntu 22.04.3 LTS (WSL)
Please provide some context for your error. For example, when did the error occur? What were you trying to achieve, and how?
I tried to bind my fabric 1.4.4 project to caliper v0.5.0 using the docker image. The command I used was:
What was the observed incorrect behavior?
The benchmark exited with error. I restarted the benchmark multiple times but got the same error.
Please provide the error logs and their surroundings.
Please provide your benchmark configuration file content, if possible.
Please provide your network configuration file content, if possible.
Please provide your workload module content, if possible.
Please provide any additional information you deem relevant to the error.
No response
The text was updated successfully, but these errors were encountered: