PTZ - zmcontrol.pl failing - socket or DB issue?

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
camelreef
Posts: 5
Joined: Thu May 23, 2019 7:53 am

PTZ - zmcontrol.pl failing - socket or DB issue?

Post by camelreef » Thu May 23, 2019 7:59 am

Hello,

When I try using PTZ, which worked at some point, then went into failure, I get an error message that zmcontrol.pl has failed.

When I run the command manually, I get this:

Code: Select all

$ sudo -u www-data zmcontrol.pl --id 5 --command=moveConRight
05/23/2019 09:51:49.434947 zmcontrol[21921].INF [main:109] [Starting control server 5/PelcoD]
05/23/2019 09:52:04.502854 zmcontrol[21921].FAT [main:125] [Can't connect: No such file or directory after 16 attempts to /var/run/zm/zmcontrol-5.sock]
DBI::db=HASH(0x56290ce676e8)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at /usr/share/perl5/ZoneMinder/Database.pm line 128.
This is /var/run/zm/

Code: Select all

$ sudo ls -lah /var/run/zm
total 8.0K
drwxr-xr--  2 www-data www-data  160 May 23 09:57 .
drwxr-xr-x 31 root     root     1000 May 23 09:49 ..
-rw-r--r--  1 www-data www-data    5 May 23 09:49 zmaudit.pid
srwxr-xr-x  1 www-data www-data    0 May 23 09:49 zmdc.sock
-rw-r--r--  1 www-data www-data    5 May 23 09:49 zm.pid
-rw-------  1 www-data www-data    0 May 23 09:51 zms-366269.lock
srwxr-xr-x  1 www-data www-data    0 May 23 09:51 zms-366269s.sock
-rw-------  1 www-data www-data    0 May 23 09:50 zms-780340.lock
Installation is on Ubuntu 19.04 using the 1.32 PPA (and the mp4 manual build).

Thanks for your help!

Nico

rockedge
Posts: 1098
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: PTZ - zmcontrol.pl failing - socket or DB issue?

Post by rockedge » Fri May 24, 2019 10:14 pm

I had this same issue which cleared up but I really never 100% figured out what fixed it. Have you restarted the LAMP and zoneminder completely?

camelreef
Posts: 5
Joined: Thu May 23, 2019 7:53 am

Re: PTZ - zmcontrol.pl failing - socket or DB issue?

Post by camelreef » Sun May 26, 2019 7:42 pm

Hello! Thanks for your reply!

Yes, stopped Apache2, mysql, zoneminder, then restarted.

Even did a full reboot.

I deleted the full /var/run/zm and /tmp/zm between the stop and the restart.

Still the same failure...

camelreef
Posts: 5
Joined: Thu May 23, 2019 7:53 am

Re: PTZ - zmcontrol.pl failing - socket or DB issue?

Post by camelreef » Sun May 26, 2019 7:44 pm

More than a socket issue, I believe that there is a problem in the DB, something stale...

camelreef
Posts: 5
Joined: Thu May 23, 2019 7:53 am

Re: PTZ - zmcontrol.pl failing - socket or DB issue?

Post by camelreef » Wed May 29, 2019 10:27 am

OK....

I'm guessing that the issue could be with the Sunba cam...
In order to get PTZ control I have to configure it first as a Netcat ONVIF, which gives me zero control.
Then I have to reconfigure control as Pelco-D. And I gain control.

So, I see two possibilities:
1. The cam has a software issue, and it needs to be tickled through ONVIF first in order to gain PelcoD control
2. The PelcoD control script has a difficulty creating the socket, a difficulty that the ONVIF control script does not have. Once the ONVIF scrit has crated the socket, the PelcoD script can happily use it with success.

The cam is a Sunba 601, and may not have had the best coders on its case, making option 1 a possibility.
I am in no way proficient in Perl to estimate how real option 2 could be. Also, this has probably been in use by many without any issue...

I would still like to get deeper into this situation, as I foresee that it's going to make ZM or system restarts a bit difficult, as I will have to do some gym to recover the socket, manually.

Could anybody give me a hand, please?

Many thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests