[DS 4.0.1] Unable to run deepstream-test4-app with Kafka on localhost [jetson nano]

I am trying to run deepstream-test4-app which is shipped with deepstream_sdk_v4.0.1_jetson on jetson nano.

Error :

$ deepstream-test4-app -i /home/jetson/Desktop/test.h264 -p /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_kafka_proto.so  --conn-str localhost;9092;ds_meta -t ds_meta -s 0 -c cfg_kafka.txt 

(deepstream-test4-app:16295): GLib-CRITICAL **: 17:25:57.651: g_strchug: assertion 'string != NULL' failed

(deepstream-test4-app:16295): GLib-CRITICAL **: 17:25:57.652: g_strchomp: assertion 'string != NULL' failed
Now playing: /home/jetson/Desktop/test.h264

Using winsys: x11 
ERROR from element nvmsg-broker: Could not initialize supporting library.
Error details: gstnvmsgbroker.c(303): gst_nvmsgbroker_start (): /GstPipeline:dstest4-pipeline/GstNvMsgBroker:nvmsg-broker:
unable to open shared library
Returned, stopping playback
Deleting pipeline
bash: 9092: command not found
bash: ds_meta: command not found

I have a kafka server running on my localhost and I am able to use it with python-kafka
I followed the steps provided here -> https://kafka.apache.org/quickstart to spin up a local kafka server.

I have also recompiled the gst-nvmsgbroker and gst-nvmsgconv but still the problem persists.

I have already tried using the analytics server docker (on a aws t2micro)but it didn’t work with this version of deepstream , and it is also mentioned on the DeepStream 3.0 - 360 Degree Smart Parking Application github page that it only supports deepstream 3

I have also read the following topics already and tried the fixes listed in em but was unable to resolve issue:

output with gst_debug is available up here --> https://pastebin.com/QH3skz8W

Hey !
Even I am facing the same issue …

We suggest you set up a server in x86 PC. It is the real usecase we have verified in this topic.

Thanks for replying !

I tried running the analytics server docker and attached to kafka container on my X86 machine running ubuntu 18.04. No response on it .However I am able to reach it from other X86 machine over the network.

Still I’m getting the same error on jetson nano …

Is there something I might be missing or it is some issue with nvmsg-broker as it is failing to even initialise as suggested by the error posted initially .

Setting up kafka server on x86 PC and running deepstream-test4 on Jetson Nano is a verified case. You should see it run without hitting issues. Do you follow and execute all steps in README?


Thanks for responding @DaneLL

I am slightly confused with the deepstream test 4 app’s usage , let me know If I’m doing it correctly

I Spin up my analytics server , attach to kafka container to see the inbound messages.

I start my deepstream test 4 app with IP_of_x86_machine:9092:mertomind-start as my connection string.

but the app fails to run with the error as shown by vivek290399

Do we have to spin up a kafka server on jetson nano too ?

Is there something that I am missing ?

Hi Saahil,

Please following below link to setup your Host server:

For Target, please check below steps:

  1. Install Docker and Docker compose.
  2. Install librdkafka
  3. Install gst-nvmsgbrokder and gst-nvmsgconv
  4. Build the deepstream-test4-app
  5. Run the pipeline:
    $ deepstream-test4-app -i [Video path] -p /opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_kafka_proto.so --conn-str="[Host ip address];9092;metromind-start"
1 Like

Thanks a lot carolyuu !!

it finally worked out , a few points I would like to add for anyone else who maybe facing the same issue :

  1. follow the steps as given on https://kafka.apache.org/quickstart to setup your host BUT you need to make slight changes in the kafka config files on the host(X86) machine :

change the following line in server.properties file placed on kafka/config

zookeeper.connect = [your_X86_machines_IP]:9092
listeners = PLAINTEXT://[your_X86_machine's_IP]:9092
advertised.listeners = PLAINTEXT://[your_X86_machine's_IP]:9092

Also make sure that when you spin up the server or create the topic or spin up the consumer, you replace the localhost with [your_X86_machine’s_IP]

Thank you so much @carolyuu , @vivek290399 & @DaneLL I got the app up and running !!

However in my case , the issue was solved by again flashing the microSD card of jetson nano with the image provided by nvidia once again , and reinstalling deepstream SDK and all ,then following along the instructions provided by @carolyuu and changing the properties of the kafka server as shown by @vivek290399

It is easier to install docker and docker compose on jetson Nano via pip , you may run the following commands on nano to make sure that the pip installation is successful for both docker and docker compose.

# install Docker Compose build dependencies for Ubuntu 18.04 on aarch64
$ sudo apt-get install -y libffi-dev
$ sudo apt-get install -y python-openssl
$ sudo apt-get install libssl-dev