Nvmsgbroker connection fails in Docker container

Please provide complete information as applicable to your setup.

**• Hardware Platform ** dGPU
• DeepStream Version 6.3

I am trying to start a pipeline using nvmsgconv → nvmsgbroker. I am hosting a rabbitmq server on my machine which I have configured the plugin to connect to. Here is my cfg_amqp.txt:

[message-broker]
hostname = 127.0.0.1
port = 5672
username = guest
password = guest
exchange = amq.topic
topic = topicname
amqp-framesize = 131072

This works perfectly outside of a Docker container but inside of the container I get the message “error: unable to connect to broker library.”

My docker container is run with the argument “–network host” so the IP and port should be the same for the configuration. I have librabbitmq-c installed both inside and outside the container. I can ping the rabbitmq server successfully from inside the docker container and I even ran tests using another amqp library that I can send amqp messages to the rabbitmq server successfully from the Docker container.

there is a test tool in opt\nvidia\deepstream\deepstream-6.3\sources\libs\amqp_protocol_adaptor. please use this tool to test according to README.

I tested and this script runs successfully. This script creates a connection inside the docker container. I am trying to communicate from inside the docker container to the server outside the container. This is where the plugin fails. I see other people having a similar issue:

https://forums.developer.nvidia.com/t/unable-to-connect-to-broker-library-deepstream-test5-app/108233/6

If necessary I can create a minimal example to recreate the issue that you could run.

nvmsgbroker_example.zip (17.4 KB)

Here is a minimal example that demonstrates the issue using deepstream-app. Please run it and confirm.

do you mean using test_amqp_proto can send messages successfully?
as you know, nvmsgbroker plugin also uses libnvds_amqp_proto.so to send messages. nvmsgbroker is opensource. can you debug nvmsgbroker to narrow down this issue? especially, please check if nvds_msgapi_connect’s parameter is correct.

could you enable broker 's low level log and run agian? the log path is /tmp/nvds/ds.log.
here is the method: Monitor Adapter Execution and command.

Ok thank you for the suggestion, the log file gave a more detailed error and I was able to track down some incorrect paths in my configuration.