Open Quasso opened 2 years ago
This is about the difference between a network configuration file and a caliper configuration file and the first confusion was that this is a single file but unfortunately it isn't and so we need to ensure in the docs that this is clear. The other part is the ability to modify the default caliper config entries either by using a custom caliper configuration file or command line options. Within fabric we could be explicit in all the relevant configuration entries with examples on how to use both via CLI and via a custom caliper config file
Okay makes sense & sounds good to me, I am happy to do my best to take care of this based on what you've said. I will hook up a PR in due course!
Fabric has set 2.2 now as unmaintained and 2.5 is the only TLS version. The legacy node sdk has been deprecated in 2.5 now. It's probably not worth investing in using these SDKs anymore and only investing in the peer gateway in caliper for 2.5 and beyond versions of fabric
Which Caliper version are you using?
v0.4.2
Which Node.JS version are you using?
v10
Which operating system are you using?
MacOS Big Sur 11.6.3 (20G415)
Please provide some context for your error. For example, when did the error occur? What were you trying to achieve, and how?
Some context
I have a Fabric network running pods/containers via Kubernetes, and I brought the
caliper-benchmarks
repository into my repo containing all the network configuration using Git Subtree.All of my configuration JSON files were already successfully implemented and in use for a custom NestJS API that allows for enrolling of admin users & submitting of transactions.
In trying to connect to my existing Fabric network using the Gateway connector with discovery enabled (via the
fabric-node-sdk
which the rest of my project uses, where needed), I ran into a problem after the initial Gateway/Admin user connection was established.When did the error occur?
I had my core
--caliper-networkconfig
YAML config file set up to use the setting (object notation):caliper.fabric.gateway.localhost: false
Essentially, at first I gathered based on the documentation that the setting above was all that was necessary in order to ensure that the Kube DNS was used, since my instance of Caliper is created as a pod inside my cluster.
What was I trying to achieve?
To run a simple test workload and publish some transactions on-chain.
What was the observed incorrect behavior?
Caliper was using
localhost
resolution instead of the hostname values (peer0.org1 etc) inside the configuration files (it was confusing because most of the log used the hostname, just one part mentioned localhost and I skimmed over that at first, until speaking in RocketChat).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.
I was able to find the solution to the problem with the help of @davidkel. It essentially requires passing the CLI flag
--caliper-fabric-gateway-localhost false
to work with hostnames. I am very happy with submitting a PR to improve the main area of documentation a bit to outline this as a potential issue and offer the suggestion of using the flag.