Deepstream run on php error

Hardware Platform (Jetson / GPU)

  • AGX Xavier [16GB]
    DeepStream Version
  • deepstream 5.0
    JetPack Version (valid for Jetson only)
  • 4.4 [L4T 32.4.3]
    TensorRT Version
  • 7.1.3.0

Hello.
I need to run deepstream on php.
I run deepstream with linux shell script and php is uses it.

shell_exec("./deepstream.sh");

and this is my shell script (deepstream.sh)

#!/bin/bash
cd …/…/deepstream/apps/sample_apps/deepstream-app
./deepstream-app -c config/rtsp_analytics_video.txt

There’s error while running the deepstream shell script with php.
However, there are no errors while running the deepstream shell script with the Linux terminal command

nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
nvbufsurftransform:cuInit failed : 100
2020-12-03 11:47:24.338761: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.2
nvbufsurftransform:cuInit failed : 100
2020-12-03 11:47:24.792535: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.2
nvbufsurftransform:cuInit failed : 100
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
Error: Can’t initialize nvrm channel
Error: Can’t initialize nvrm channel
Couldn’t create ddkvic Session: Cannot allocate memory
nvbuf_utils: Could not create Default NvBufferSession
** ERROR: <create_multi_source_bin:1057>: Failed to create element ‘src_bin_muxer’
** ERROR: <create_multi_source_bin:1132>: create_multi_source_bin failed
** ERROR: <create_pipeline:1296>: create_pipeline failed
** ERROR: main:636: Failed to create pipeline
Quitting
App run failed

Please check my erorr msg.
How can I solve this issue?

Seems it’s not related to deepstream, can you make sure other app can work well when running it using php

When I run another program with php I don’t get any error
Not a deepstream error?

I found the problem. apache is run program by www-data user. but www-data user can’t run deepstream gst-plugin.

( ex ) root or current user : gst-inspect-1.0 nvstreammux
output > can find plugin
www-data user : gst-inspect-1.0 nvstreammux
output > can’t find plugin )

When www-data user run deepstream plugin, plugin is unavailable?

Have you solved your problem. I think you can specify the GST_PLUGIN_PATH env for the www-data user to make the gst plugins available? BTW, clrear the cache firstly using rm -rf ~/.cache/gstreamer-1.0/registry.aarch64.bin before run it.