ZoneMinder / zoneminder

ZoneMinder is a free, open source Closed-circuit television software application developed for Linux which supports IP, USB and Analog cameras.
http://www.zoneminder.com/
GNU General Public License v2.0
5.15k stars 1.23k forks source link

ZM stops listening to ONVIF events if a camera becomes unavailable and then reappears on the network. #4099

Closed IgorA100 closed 1 month ago

IgorA100 commented 3 months ago

Describe Your Environment

To Reproduce Steps to reproduce the behavior:

  1. Configure ZM and camera to listen to ONVIF events. SOAP WSA COMPLIANCE = disabled
  2. Disconnect the camera from the network.
  3. After some time, turn the camera back on to the network.
  4. ZM no longer listens to ONVIF events.

After the error appears ONVIF Couldn't create subscription! HTTP Error, <html><body><h1>404 Not Found</h1></body></html> | zm_monitor.cpp | 1203 ZM stops listening for ONVIF events and does not start listening again after the camera comes online.

 Error("ONVIF Couldn't create subscription! fault:%s, detail:%s", soap_fault_string(soap), detail ? detail : "null");
 _wsnt__Unsubscribe wsnt__Unsubscribe;
 _wsnt__UnsubscribeResponse wsnt__UnsubscribeResponse;
 proxyEvent.Unsubscribe(response.SubscriptionReference.Address, NULL, &wsnt__Unsubscribe, wsnt__UnsubscribeResponse);
 soap_destroy(soap);
 soap_end(soap);
 soap_free(soap);
 soap = nullptr;

I have not studied the code in detail, but it is probably necessary to first check whether the camera is available on the network, then check the availability of the subscription and generate an ONVIF listening error only if the camera itself is accessible and there are problems with listening to events. If the camera is not available on the network, of course there will be problems with ONVIF. And is it necessary to report this? Also, after the camera appears on the network, it is necessary to resume checking the ability to listen to ONVIF events

IgorA100 commented 2 months ago

@connortechnology Have you fixed this problem?

connortechnology commented 2 months ago

No.