Onvif probe broken, Can't call method "get_XAddrs"

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
hwestrell
Posts: 2
Joined: Wed Oct 17, 2018 8:57 pm

Onvif probe broken, Can't call method "get_XAddrs"

Post by hwestrell »

Hello,
New fresh 13.2.2 installed on Ubuntu Server 16.04.5
Installed following this instruction https://zoneminder.readthedocs.io/en/la ... buntu.html

Adding cameras via Onvif probe does not work in my environment.
http://192.168.1.23/zm/index.php?view=o ... =0&popup=1
Unable to probe network cameras, status is '255'. Output was:<br/><br/> http://192.168.1.19:8080/onvif/devices, 1.1, (Profile='Streaming', model='C6F0SgZ0N0P3L0', name='IPCAM', location/country='china')<br/>http://192.168.1.18:8080/onvif/devices, 1.1, (Profile='Streaming', model='C6F0SgZ0N0P3L0', name='IPCAM', location/country='china')<br/><br/> Please the following command from a command line for more information:<br/><br/>/usr/bin/zmonvif-probe.pl probe

Code: Select all

usr/bin/zmonvif-probe.pl probe
Name "ZoneMinder::ONVIF::verbose" used only once: possible typo at /usr/bin/zmonvif-probe.pl line 81.
http://192.168.1.18:8080/onvif/devices, 1.1, (Profile='Streaming', model='C6F0SgZ0N0P3L0', name='IPCAM', location/country='china')
http://192.168.1.19:8080/onvif/devices, 1.1, (Profile='Streaming', model='C6F0SgZ0N0P3L0', name='IPCAM', location/country='china')
Can't call method "get_XAddrs" on an undefined value at /usr/share/perl5/ZoneMinder/ONVIF.pm line 126.

Code: Select all

/usr/bin/zmonvif-probe.pl -v probe
Name "ZoneMinder::ONVIF::verbose" used only once: possible typo at /usr/bin/zmonvif-probe.pl line 81.
Probing for SOAP 1.1
<ProbeMatches xmlns="http://schemas.xmlsoap.org/ws/2005/04/discovery"/>
Received message:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/a ... P-ENV:Text xml:lang="en">End of file or no input: Unknown error -1091465572</SOAP-ENV:Text></SOAP-ENV:Reason></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Error deserializing message. No message returned from deserializer.
Received message:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:wsadis="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:dn="http://www.onvif.org/ver10/network/wsdl ... ppSequence MessageNumber="66679" InstanceId="20"/></soapenv:Header><soapenv:Body><d:ProbeMatches><d:ProbeMatch><wsadis:EndpointReference><wsadis:Address>urn:uuid:5f5a69c2-e0ae-504f-829b-EC3DFDE5781A</wsadis:Address></wsadis:EndpointReference><d:Types>dn:NetworkVideoTransmitter</d:Types><d:Scopes>onvif://www.onvif.org/Profile/Streaming onvif://www.onvif.org/model/C6F0SgZ0N0P3L0 onvif://www.onvif.org/name/IPCAM onvif://www.onvif.org/location/country/china</d ... v:Envelope>
l_xaddr = http://192.168.1.19:8080/onvif/devices
http://192.168.1.19:8080/onvif/devices, 1.1, (Profile='Streaming', model='C6F0SgZ0N0P3L0', name='IPCAM', location/country='china')
Received message:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:wsadis="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:dn="http://www.onvif.org/ver10/network/wsdl ... ppSequence MessageNumber="7636671" InstanceId="20"/></soapenv:Header><soapenv:Body><d:ProbeMatches><d:ProbeMatch><wsadis:EndpointReference><wsadis:Address>urn:uuid:5f5a69c2-e0ae-504f-829b-10A4BEF89E95</wsadis:Address></wsadis:EndpointReference><d:Types>dn:NetworkVideoTransmitter</d:Types><d:Scopes>onvif://www.onvif.org/Profile/Streaming onvif://www.onvif.org/model/C6F0SgZ0N0P3L0 onvif://www.onvif.org/name/IPCAM onvif://www.onvif.org/location/country/china</d ... v:Envelope>
l_xaddr = http://192.168.1.18:8080/onvif/devices
http://192.168.1.18:8080/onvif/devices, 1.1, (Profile='Streaming', model='C6F0SgZ0N0P3L0', name='IPCAM', location/country='china')
Received message:
<?xml version="1.0" ?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsd="http://schemas.xmlsoap.org/ws/2005/04/discovery">
<soap:Header>
<wsa:Action>http://schemas.xmlsoap.org/ws/2005/04/d ... wsa:Action>
<wsa:MessageID>urn:uuid:162bba3e-827d-4dc0-9b6c-94eb5c4e296c</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:5666efee-ea4e-482c-8839-00905c3fb18e</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/a ... us</wsa:To>
<wsd:AppSequence InstanceId="3628776269" MessageNumber="1"/>
</soap:Header>
<soap:Body>
<wsd:ProbeMatches/>
</soap:Body>
</soap:Envelope>

Can't call method "get_XAddrs" on an undefined value at /usr/share/perl5/ZoneMinder/ONVIF.pm line 126.


Anyone experienced this with 1.32.x too?
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Onvif probe broken, Can't call method "get_XAddrs"

Post by bbunge »

Probe works for me.

May I suggest the install instructions you used included a steps you did not need.

See: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
You need both zoneminder repositories for 16.04
add-apt-repository ppa:iconnor/zoneminder
add-apt-repository ppa:iconnor/zoneminder-1.32
apt update

Remove the "sql_mode = NO_ENGINE_SUBSTITUTION" from my.cnf

You did not need: chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
a2enmod expires
a2enmod headers

If you have local cameras: adduser www-data video
hwestrell
Posts: 2
Joined: Wed Oct 17, 2018 8:57 pm

Re: Onvif probe broken, Can't call method "get_XAddrs"

Post by hwestrell »

Checked the install procedures. Nothing impacting this issues.

Line 126 in Onvif.pm $result->get_ProbeMatch()->get_XAddrs() statement fails, can be related to $result content ?
zmonvif-probe.pl finds two cameras, then something goes wrong when deserializing. See first post.

Received message:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/a ... P-ENV:Text xml:lang="en">End of file or no input: Unknown error -1091465572</SOAP-ENV:Text></SOAP-ENV:Reason></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Error deserializing message. No message returned from deserializer.


Perhaps this code is causing it ?

Code: Select all

Action => { value => 'http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe' }
The url http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe is not found.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Onvif probe broken, Can't call method "get_XAddrs"

Post by rockedge »

version 1.32.2 Puppy Linux Tahr 6.0.5 and I have the same error. ZM 1.30.4 ran well and upgraded to version 1.32.2

Code: Select all

~ #zmonvif-probe.pl probe
Name "ZoneMinder::ONVIF::verbose" used only once: possible typo at /usr/bin/zmonvif-probe.pl line 81.
ajmnz
Posts: 2
Joined: Mon Jul 08, 2019 7:58 pm
Location: Wellington, NZ

Re: Onvif probe broken, Can't call method "get_XAddrs"

Post by ajmnz »

I've just installed v1.30.4 on debian and have encountered this problem. Did you find a solution?
ajmnz
Posts: 2
Joined: Mon Jul 08, 2019 7:58 pm
Location: Wellington, NZ

Re: Onvif probe broken, Can't call method "get_XAddrs"

Post by ajmnz »

I worked around the error with 'zmonvif-probe.pl probe' by patching the script:

diff -r1.1 zmonvif-probe.pl
119c119,121
< foreach my $l_xaddr (split ' ', $result->get_ProbeMatch()->get_XAddrs()) {
---
> my $probeMatch = $result ? $result->get_ProbeMatch() : undef;
> my $addrs = $probeMatch ? $probeMatch->get_XAddrs() : '';
> foreach my $l_xaddr (split ' ', $addrs) {
synoptic
Posts: 3
Joined: Mon Dec 30, 2019 10:44 pm

Re: Onvif probe broken, Can't call method "get_XAddrs"

Post by synoptic »

ajmnz wrote: Sun Jul 21, 2019 9:25 am I worked around the error with 'zmonvif-probe.pl probe' by patching the script:

diff -r1.1 zmonvif-probe.pl
119c119,121
< foreach my $l_xaddr (split ' ', $result->get_ProbeMatch()->get_XAddrs()) {
---
> my $probeMatch = $result ? $result->get_ProbeMatch() : undef;
> my $addrs = $probeMatch ? $probeMatch->get_XAddrs() : '';
> foreach my $l_xaddr (split ' ', $addrs) {
Patching worked for me on a fresh install of 1.32.3

The script to be patched is : /usr/share/perl5/ZoneMinder/ONVIF.pm

For the not-so-linux-geeks :
Replace the line

Code: Select all

foreach my $l_xaddr (split ' ', $result->get_ProbeMatch()->get_XAddrs()) {
with

Code: Select all

my $probeMatch = $result ? $result->get_ProbeMatch() : undef;
my $addrs = $probeMatch ? $probeMatch->get_XAddrs() : '';
foreach my $l_xaddr (split ' ', $addrs) {
Post Reply