Problem with messenger mqtt


andZka
 

Hi everyone! I would like to do a test connecting multiple machines for clients. Before I do that, I'm doing a test first with workers communicating via mqtt on localhost.
I wrote a docker compose file to do this using mosquitto as the message broker:
https://github.com/andreaZka/test/blob/main/docker-compose.yml
Here the mosquitto.conf:
https://github.com/andreaZka/test/blob/main/mosquitto/mosquitto.conf
However, there is an error in the testing phase:

Error while performing "test" step: TypeError: moduleName.startsWith is not a function
at Function.loadModuleFunction (/home/node/.npm-global/lib/node_modules/@hyperledger/caliper-core/lib/common/utils/caliper-utils.js:152:31)
at new WorkerOrchestrator (/home/node/.npm-global/lib/node_modules/@hyperledger/caliper-core/lib/manager/orchestrators/worker-orchestrator.js:56:47)
at new RoundOrchestrator (/home/node/.npm-global/lib/node_modules/@hyperledger/caliper-core/lib/manager/orchestrators/round-orchestrator.js:40:35)
at CaliperEngine.run (/home/node/.npm-global/lib/node_modules/@hyperledger/caliper-core/lib/manager/caliper-engine.js:152:43)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Function.handler (/home/node/.npm-global/lib/node_modules/@hyperledger/caliper-cli/lib/launch/lib/launchManager.js:62:30)

This occurs equally in both the process manager and the workers.
The connector is custom but run in a single container, it works fine.
What happens, what is this error due to?
andZka


andZka
 

Update: The error during testing seems to no longer appear, however the launch manager is stuck at messenger setup:
[caliper] [worker-orchestrator] Messenger not configured, entering configure phase...
Meanwhile the workers get stuck at set SUT type.


Attila Klenik
 

Hi!

Here's the doc for configuring the MQTT service: https://hyperledger.github.io/caliper/v0.5.0/caliper-messengers/
Also, enabling debug messages could be useful if the error persists: https://hyperledger.github.io/caliper/v0.5.0/logging/

Best Regards,
Attila Klenik