Janus live streaming no longer working on 1.37.20

Current Development version likely to have breaking changes
Post Reply
m11k
Posts: 2
Joined: Tue Aug 16, 2022 9:00 pm

Janus live streaming no longer working on 1.37.20

Post by m11k »

Hi,

I rebuild local zoneminder Debian packages today using the 'do_debian_package.sh' script, upgrading from 1.37.18 to 1.37.20. I am using Janus for webrtc streaming, and ONVIF event notifications. I've only been using zoneminder for about 2 months, so I'm still relatively new to it. I have 5 PoE cameras that I stream via RTSP.

After this update, I can no longer view the live feed from the zoneminder interface. Full-time recording and ONVIF events are still working. The Janus log from systemd is full of these messages:

Code: Select all

Aug 16 17:08:25 zm1 janus[606]: [ERR] [plugins/janus_streaming.c:janus_streaming_rtsp_connect_to_server:7249] Couldn't get DESCRIBE code: 401
Aug 16 17:08:25 zm1 janus[606]: [ERR] [plugins/janus_streaming.c:janus_streaming_process_synchronous_request:3880] Error creating 'rtsp' stream...
Aug 16 17:08:25 zm1 janus[606]: [ERR] [plugins/janus_streaming.c:janus_streaming_rtsp_connect_to_server:7249] Couldn't get DESCRIBE code: 401
Aug 16 17:08:25 zm1 janus[606]: [ERR] [plugins/janus_streaming.c:janus_streaming_process_synchronous_request:3880] Error creating 'rtsp' stream...
Aug 16 17:08:25 zm1 janus[606]: [ERR] [plugins/janus_streaming.c:janus_streaming_rtsp_connect_to_server:7249] Couldn't get DESCRIBE code: 401
Aug 16 17:08:25 zm1 janus[606]: [ERR] [plugins/janus_streaming.c:janus_streaming_process_synchronous_request:3880] Error creating 'rtsp' stream...
Aug 16 17:08:26 zm1 janus[606]: [ERR] [plugins/janus_streaming.c:janus_streaming_rtsp_connect_to_server:7249] Couldn't get DESCRIBE code: 401
Aug 16 17:08:26 zm1 janus[606]: [ERR] [plugins/janus_streaming.c:janus_streaming_process_synchronous_request:3880] Error creating 'rtsp' stream...
Aug 16 17:08:29 zm1 janus[606]: [ERR] [plugins/janus_streaming.c:janus_streaming_rtsp_connect_to_server:7249] Couldn't get DESCRIBE code: 401
Aug 16 17:08:29 zm1 janus[606]: [ERR] [plugins/janus_streaming.c:janus_streaming_process_synchronous_request:3880] Error creating 'rtsp' stream...
In the 'zmc_m*.log' log files, I see the following messages repeated every couple of seconds:

Code: Select all

08/16/22 17:20:38.196042 zmc_m3[1041].INF-zm_monitor.cpp/1671 [Kitchen: 43800 - Capturing at 30.00 fps, capturing bandwidth 400577bytes/sec Analysing at 0.00 fps]
08/16/22 17:20:41.529194 zmc_m3[1041].INF-zm_monitor.cpp/1671 [Kitchen: 43900 - Capturing at 30.00 fps, capturing bandwidth 405843bytes/sec Analysing at 0.00 fps]
08/16/22 17:20:41.784027 zmc_m3[1119].WAR-zm_monitor_janus.cpp/138 [Mountpoint Missing]
08/16/22 17:20:41.784081 zmc_m3[1119].WAR-zm_monitor_janus.cpp/177 [Sending {"janus" : "message", "transaction" : "randomString", "body" : {"request" : "create", "admin_key" : "<>", "type" : "rtsp", "rtsp_quirk" : true, "url" : "rtsp://192.168.40.12/Streaming/Channels/101", "rtsp_user" : "viewer", "rtsp_pwd" : "<>", "id" : 3, "audio" : true, "video" : true}} to http://192.168.15.10:8088/janus/8714103995272186/2753873887798903]
08/16/22 17:20:44.862489 zmc_m3[1041].INF-zm_monitor.cpp/1671 [Kitchen: 44000 - Capturing at 30.00 fps, capturing bandwidth 411023bytes/sec Analysing at 0.00 fps]
08/16/22 17:20:46.797852 zmc_m3[1119].WAR-zm_monitor_janus.cpp/138 [Mountpoint Missing]
08/16/22 17:20:46.797967 zmc_m3[1119].WAR-zm_monitor_janus.cpp/177 [Sending {"janus" : "message", "transaction" : "randomString", "body" : {"request" : "create", "admin_key" : "<>", "type" : "rtsp", "rtsp_quirk" : true, "url" : "rtsp://192.168.40.12/Streaming/Channels/101", "rtsp_user" : "viewer", "rtsp_pwd" : "<>", "id" : 3, "audio" : true, "video" : true}} to http://192.168.15.10:8088/janus/8714103995272186/2753873887798903]
08/16/22 17:20:48.195951 zmc_m3[1041].INF-zm_monitor.cpp/1671 [Kitchen: 44100 - Capturing at 30.00 fps, capturing bandwidth 427960bytes/sec Analysing at 0.00 fps]
08/16/22 17:20:51.529378 zmc_m3[1041].INF-zm_monitor.cpp/1671 [Kitchen: 44200 - Capturing at 30.00 fps, capturing bandwidth 429668bytes/sec Analysing at 0.00 fps]
08/16/22 17:20:51.807867 zmc_m3[1119].WAR-zm_monitor_janus.cpp/138 [Mountpoint Missing]
08/16/22 17:20:51.807958 zmc_m3[1119].WAR-zm_monitor_janus.cpp/177 [Sending {"janus" : "message", "transaction" : "randomString", "body" : {"request" : "create", "admin_key" : "<>", "type" : "rtsp", "rtsp_quirk" : true, "url" : "rtsp://192.168.40.12/Streaming/Channels/101", "rtsp_user" : "viewer", "rtsp_pwd" : "<>", "id" : 3, "audio" : true, "video" : true}} to http://192.168.15.10:8088/janus/8714103995272186/2753873887798903]
I stripped the admin_key and rtsp_pwd out from the logs above.

In 1.37.18, I would still see messages like the ones above, but only when I restarted zoneminder and whenever I attempted to connect to the live feed. During normal recording, the logs just had logs of status messages but no errors:

Code: Select all

08/15/22 19:20:32.815155 zmc_m3[432268].INF-zm_monitor.cpp/1666 [Kitchen: 41900 - Capturing at 30.02 fps, capturing bandwidth 685629bytes/sec Analysing at 0.00 fps]
08/15/22 19:20:36.148559 zmc_m3[432268].INF-zm_monitor.cpp/1666 [Kitchen: 42000 - Capturing at 30.00 fps, capturing bandwidth 732609bytes/sec Analysing at 0.00 fps]
08/15/22 19:20:39.481818 zmc_m3[432268].INF-zm_monitor.cpp/1666 [Kitchen: 42100 - Capturing at 30.00 fps, capturing bandwidth 937222bytes/sec Analysing at 0.00 fps]
08/15/22 19:20:42.817209 zmc_m3[432268].INF-zm_monitor.cpp/1666 [Kitchen: 42200 - Capturing at 29.98 fps, capturing bandwidth 877727bytes/sec Analysing at 0.00 fps]
08/15/22 19:20:46.148576 zmc_m3[432268].INF-zm_monitor.cpp/1666 [Kitchen: 42300 - Capturing at 30.02 fps, capturing bandwidth 810786bytes/sec Analysing at 0.00 fps]
08/15/22 19:20:49.483707 zmc_m3[432268].INF-zm_monitor.cpp/1666 [Kitchen: 42400 - Capturing at 29.98 fps, capturing bandwidth 718372bytes/sec Analysing at 0.00 fps]
08/15/22 19:20:52.817134 zmc_m3[432268].INF-zm_monitor.cpp/1666 [Kitchen: 42500 - Capturing at 30.00 fps, capturing bandwidth 717606bytes/sec Analysing at 0.00 fps]
08/15/22 19:20:56.148412 zmc_m3[432268].INF-zm_monitor.cpp/1666 [Kitchen: 42600 - Capturing at 30.02 fps, capturing bandwidth 801454bytes/sec Analysing at 0.00 fps]
At first I thought the "Mountpoint Missing" message might be the issue, but this message also appeared in the older logs as well. I tried enabling debug output in the zmc logs, but I don't see anything there which is particularly interesting.

Any thoughts on what the issue might be or further debugging tips?

Thanks,
Mike
m11k
Posts: 2
Joined: Tue Aug 16, 2022 9:00 pm

Re: Janus live streaming no longer working on 1.37.20

Post by m11k »

I was finally able to figure out the cause of the issue. This was due to a Debian update to libcurl, which broke Janus's ability to authentication with the camera's rtsp stream.

These two janus-gateway issues pointed me in the right direction:
https://github.com/meetecho/janus-gateway/issues/839
https://github.com/meetecho/janus-gateway/issues/3038

From the issue, it sounds like janus doesn't work with newer libcurl versions. I'm on Debian 11, so libcurl should never see a major version upgrade, however version 7.74.0-1.3+deb11u2 backported a lot of bugfixes for CVE, and one of those likely pulled in something new-enough that Janus was no longer happy. The changelog can be found here: https://metadata.ftp-master.debian.org/ ... _changelog. After downgrading libcurl4 to the 7.74-1.3+deb11u1 version, janus live streaming works again.

As part of troubleshooting, I also tried backporting the janus 104 package currently in Debian unstable to Debian 11. While I was able to build the package and install it, it did not resolve the issue.

So for now I'll need to keep libcurl4 pinned to this specific version. This doesn't bode well for long-term maintainability though. Do you think I should report this issue on the janus github repo?
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Janus live streaming no longer working on 1.37.20

Post by Magic919 »

There was discussion about this in the ZM Slack channel I think. Would be worth posting there. Although they might have moved to Discord by now.
-
TylerSchwend
Posts: 22
Joined: Sat Nov 05, 2011 11:03 pm

Re: Janus live streaming no longer working on 1.37.20

Post by TylerSchwend »

This is supposedly fixed in libcurl4=7.87.0-1~bpo11+1
Post Reply