zm will not start - "ZM_PATH_LOGS" not allowed while "strict

Forum for questions and support relating to the 1.25.x releases only.
Locked
JEL
Posts: 4
Joined: Sat Dec 10, 2011 2:46 am

zm will not start - "ZM_PATH_LOGS" not allowed while "strict

Post by JEL »

Everything looked fine after a clear installation on a 64bit Suse 12.1 machine.

All was fine until I noticed that zm starts not automatically at boot time but fails. So I played around by restarting
apache2, mysql and zm.

Well, I messed it up twice. zm would no longer start. I could see, for a couple seconds, the main screen - and was still logged in.
Then an 404 error came up from the apache.

First time I dropped the "zm" database and did a new "zm_database_init" which solved the problem - scarifying all personal parameters :o(
Second time I looked deeper into the log files and found this:

Dec 10 02:24:07 xal9001 zm[5286]: Starting ZoneMinder Daemon ..done
Dec 10 02:24:07 xal9001 zm[5286]: Bareword "ZM_PATH_LOGS" not allowed while "strict subs" in use at /usr/lib/perl5/vendor_perl/5.14.2/ZoneMinder/Logger.pm line 153.
Dec 10 02:24:07 xal9001 zm[5286]: BEGIN not safe after errors--compilation aborted at /usr/lib/perl5/vendor_perl/5.14.2/ZoneMinder/Logger.pm line 168.
Dec 10 02:24:07 xal9001 zm[5286]: Compilation failed in require at /usr/lib/perl5/vendor_perl/5.14.2/ZoneMinder.pm line 34.
Dec 10 02:24:07 xal9001 zm[5286]: BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.14.2/ZoneMinder.pm line 34.
Dec 10 02:24:07 xal9001 zm[5286]: Compilation failed in require at /usr/bin/zmpkg.pl line 37.
Dec 10 02:24:07 xal9001 zm[5286]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 37.
Dec 10 02:24:07 xal9001 zm[5294]: Shutting down ZoneMinder Daemon ..done

Did I crash the database by playing around with shutting down and/or restarting apache2, mysql and zm?
Any help out there?

Thanks - JEL
tetosan
Posts: 5
Joined: Thu Dec 15, 2011 9:01 am

Re: zm will not start - "ZM_PATH_LOGS" not allowed while "st

Post by tetosan »

Same error! I'm using Ubuntu 11.10 server 32 bit.

I'm working with Zoneminder 1.25 and webadmin, when I try to launch zoneminder through webadmin I got same error:

Code: Select all

Bareword "ZM_PATH_LOGS" not allowed while "strict subs" in use at /usr/lib/perl5/vendor_perl/5.14.2/ZoneMinder/Logger.pm line 153.
BEGIN not safe after errors--compilation aborted at /usr/lib/perl5/vendor_perl/5.14.2/ZoneMinder/Logger.pm line 168
.

I also got 404 error on browser when try to run ZM...

Thanks in advance!
tetosan
Posts: 5
Joined: Thu Dec 15, 2011 9:01 am

Re: zm will not start - "ZM_PATH_LOGS" not allowed while "st

Post by tetosan »

Hey!

ZM 1.25 working as a charm!

"ZM_PATH_LOGS" error seems to be a mysql problem. After getting this error, what I did is:

- logging into latest webmin version
- drop zm database
-

Code: Select all

mysql -u root -p < db/zm_create.sql
-

Code: Select all

mysql -u root -p
grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
quit
- reinstall apache2
- reinstall zoneminder
- Works!

hope this help you also!
User avatar
ttsoares
Posts: 31
Joined: Sat Dec 10, 2005 11:06 pm
Contact:

Re: zm will not start - "ZM_PATH_LOGS" not allowed while "st

Post by ttsoares »

The path where the logs will be writen must exist at php.ini:

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/etc/:/var/lib/zm/
The fact is a secondary aspect of Reality.
JEL
Posts: 4
Joined: Sat Dec 10, 2011 2:46 am

Re: zm will not start - "ZM_PATH_LOGS" not allowed while "st

Post by JEL »

Don't you have to run zm_database_init? Or did you save the tables from the earlier installation?


tetosan wrote:Hey!

ZM 1.25 working as a charm!

"ZM_PATH_LOGS" error seems to be a mysql problem. After getting this error, what I did is:

- logging into latest webmin version
- drop zm database
-

Code: Select all

mysql -u root -p < db/zm_create.sql
-

Code: Select all

mysql -u root -p
grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
quit
- reinstall apache2
- reinstall zoneminder
- Works!

hope this help you also!
tetosan
Posts: 5
Joined: Thu Dec 15, 2011 9:01 am

Re: zm will not start - "ZM_PATH_LOGS" not allowed while "st

Post by tetosan »

Yeah, I did it on during first installation
User avatar
monex
Posts: 169
Joined: Mon Jan 22, 2007 1:10 pm

Re: zm will not start - "ZM_PATH_LOGS" not allowed while "st

Post by monex »

Hi,

I discovered this issue too. It looks like it has something to do with parallel calls of zmpkg.pl. I don't know why but it will recreate the contents of the Config table which isn't good when it runs parallel.

This can happen during rpm upgrade as there is a double call of via systemd which will break the Config table.
I hope I can fix it soon.

Monex
Image
JEL
Posts: 4
Joined: Sat Dec 10, 2011 2:46 am

Re: zm will not start - "ZM_PATH_LOGS" not allowed while "st

Post by JEL »

Currently everything is fine after I did as tetosan recommended. But zm still looses all settings I made in Options and stops after
being started. This applies also to LOG_DEBUG. So I cannot generate additional information. Besides that I could find anything strange in the log files.

Well, I changed my custom path DIR_EVENTS back to "events" and relinked it other wise. Doing this I can keep my recorded events and the database
does not crash.

booting the machine ... message log
Dec 31 18:39:42 xal9001 dhcpcd[1148]: eth0: dhcpcd 3.2.3 starting
Dec 31 18:39:42 xal9001 dhcpcd[1148]: eth0: hardware address = 00:01:2e:2d:9c:9f
Dec 31 18:39:42 xal9001 dhcpcd[1148]: eth0: broadcasting for a lease
Dec 31 18:39:45 xal9001 dhcpcd[1148]: eth0: offered 192.168.178.27 from 192.168.178.1
Dec 31 18:39:45 xal9001 dhcpcd[1148]: eth0: checking 192.168.178.27 is available on attached networks
Dec 31 18:39:46 xal9001 dhcpcd[1148]: eth0: leased 192.168.178.27 for 864000 seconds
Dec 31 18:39:46 xal9001 dhcpcd[1148]: eth0: adding IP address 192.168.178.27/24
Dec 31 18:39:46 xal9001 dhcpcd[1148]: eth0: adding default route via 192.168.178.1 metric 0
Dec 31 18:39:47 xal9001 dhcpcd[1148]: eth0: setting hostname to `xal9001'
Dec 31 18:40:11 xal9001 dhcpcd[1148]: eth0: exiting
Dec 31 18:40:14 xal9001 zmpkg[4230]: INF [Command: start]
Dec 31 18:40:14 xal9001 zmpkg[4239]: INF [Command: stop] <---- why?



the warn log shows at this time:
Dec 31 18:40:11 xal9001 systemd[1]: Failed to read PID file /var/run/httpd2.pid after start. The service might be broken.
Dec 31 18:40:12 xal9001 ifup: No configuration found for wlan0
Dec 31 18:40:12 xal9001 ntpd[4202]: line 72 column 1 syntax error, unexpected T_EOC, expecting T_Default or T_Ipv4_flag or T_Ipv6_flag or T_String
Dec 31 18:40:12 xal9001 ntpd[4202]: syntax error in /etc/ntp.conf line 72, column 1
Dec 31 18:40:14 xal9001 sudo: pam_systemd(sudo:session): Failed to create session: Invalid argument
Dec 31 18:40:14 xal9001 sudo: pam_systemd(sudo:session): Failed to create session: Invalid argument
Dec 31 18:40:14 xal9001 sudo: pam_systemd(sudo:session): Failed to create session: Invalid argument
Dec 31 18:40:14 xal9001 sudo: pam_systemd(sudo:session): Failed to create session: Invalid argument
Dec 31 18:40:15 xal9001 sudo: pam_systemd(sudo:session): Failed to create session: Invalid argument
Dec 31 18:40:42 xal9001 sudo: pam_systemd(sudo:session): Failed to create session: Invalid argument
Dec 31 18:51:00 xal9001 zma_m1[4395]: WAR [Waiting for capture daemon]
Dec 31 18:51:01 xal9001 zma_m1[4395]: WAR [Waiting for capture daemon]
Dec 31 18:51:02 xal9001 zma_m1[4395]: WAR [Waiting for capture daemon]
Dec 31 18:51:03 xal9001 zma_m1[4395]: WAR [Waiting for capture daemon]

so I have to go deeper ... tomorrow :o


------------
restarting manually after 10 minutes: all fine! - message log
Dec 31 18:50:39 xal9001 zmpkg[4335]: INF [Command: start]
Dec 31 18:50:56 xal9001 zmdc[4360]: INF [Server starting at 11/12/31 18:50:56]
Dec 31 18:50:59 xal9001 zmdc[4360]: INF ['zmc -d /dev/video0' starting at 11/12/31 18:50:59, pid = 4386]
Dec 31 18:50:59 xal9001 zmdc[4386]: INF ['zmc -d /dev/video0' started at 11/12/31 18:50:59]
Dec 31 18:51:00 xal9001 zmc_dvideo0[4386]: INF [Starting Capture]
Dec 31 18:51:00 xal9001 zmdc[4360]: INF ['zma -m 1' starting at 11/12/31 18:51:00, pid = 4395]
Dec 31 18:51:00 xal9001 zmdc[4395]: INF ['zma -m 1' started at 11/12/31 18:51:00]
Dec 31 18:51:00 xal9001 zma_m1[4395]: WAR [Waiting for capture daemon]
Dec 31 18:51:00 xal9001 zmdc[4404]: INF ['zmfilter.pl' started at 11/12/31 18:51:00]
Dec 31 18:51:00 xal9001 zmdc[4360]: INF ['zmfilter.pl' starting at 11/12/31 18:51:00, pid = 4404]
Dec 31 18:51:01 xal9001 zmdc[4360]: INF ['zmaudit.pl -c' starting at 11/12/31 18:51:01, pid = 4413]
Dec 31 18:51:01 xal9001 zmdc[4413]: INF ['zmaudit.pl -c' started at 11/12/31 18:51:01]
Dec 31 18:51:01 xal9001 zma_m1[4395]: WAR [Waiting for capture daemon]
Dec 31 18:51:02 xal9001 zmdc[4421]: INF ['zmwatch.pl' started at 11/12/31 18:51:02]
Dec 31 18:51:02 xal9001 zmdc[4360]: INF ['zmwatch.pl' starting at 11/12/31 18:51:02, pid = 4421]
Dec 31 18:51:02 xal9001 zmfilter[4404]: INF [Scanning for events]
Dec 31 18:51:02 xal9001 zmaudit[4413]: INF [Deleting 90 old images]
Dec 31 18:51:02 xal9001 zma_m1[4395]: WAR [Waiting for capture daemon]
Dec 31 18:51:02 xal9001 zmwatch[4421]: INF [Watchdog starting]
Dec 31 18:51:02 xal9001 zmdc[4434]: INF ['zmupdate.pl -c' started at 11/12/31 18:51:02]
Dec 31 18:51:02 xal9001 zmdc[4360]: INF ['zmupdate.pl -c' starting at 11/12/31 18:51:02, pid = 4434]
Dec 31 18:51:03 xal9001 zmwatch[4421]: INF [Watchdog pausing for 30 seconds]
Dec 31 18:51:03 xal9001 zmupdate[4434]: INF [Checking for updates]
Dec 31 18:51:03 xal9001 zma_m1[4395]: WAR [Waiting for capture daemon]
Dec 31 18:51:05 xal9001 zma_m1[4395]: INF [In mode 3/1, warming up]
Dec 31 18:51:05 xal9001 zmupdate[4434]: INF [Got version: '1.24.4']
Dec 31 18:51:40 xal9001 zma_m1[4395]: INF [Kamera: 344 - Gone into alarm state]
Dec 31 18:51:40 xal9001 zma_m1[4395]: INF [Kamera: 344 - Opening new event 451, alarm start]
Dec 31 18:51:45 xal9001 zma_m1[4395]: INF [Kamera: 364 - Gone into alert state]
Dec 31 18:51:46 xal9001 zma_m1[4395]: INF [Kamera: 374 - Left alarm state (451) - 40(20) images]
Dec 31 18:51:46 xal9001 zma_m1[4395]: INF [Kamera: 374 - Closing event 451, alarm end]
Dec 31 18:52:07 xal9001 zma_m1[4395]: INF [Kamera: 579 - Gone into alarm state]
Dec 31 18:52:07 xal9001 zma_m1[4395]: INF [Kamera: 579 - Opening new event 452, alarm start]
Dec 31 18:52:08 xal9001 zma_m1[4395]: INF [Kamera: 581 - Gone into alert state]
Dec 31 18:52:09 xal9001 zma_m1[4395]: INF [Kamera: 591 - Left alarm state (452) - 22(2) images]
Dec 31 18:52:09 xal9001 zma_m1[4395]: INF [Kamera: 591 - Closing event 452, alarm end]
Dec 31 18:52:25 xal9001 zma_m1[4395]: INF [Kamera: 751 - Gone into alarm state]
Dec 31 18:52:25 xal9001 zma_m1[4395]: INF [Kamera: 751 - Opening new event 453, alarm start]
Dec 31 18:52:29 xal9001 zma_m1[4395]: INF [Kamera: 768 - Gone into alert state]
Dec 31 18:52:30 xal9001 zma_m1[4395]: INF [Kamera: 778 - Left alarm state (453) - 37(17) images]
Dec 31 18:52:30 xal9001 zma_m1[4395]: INF [Kamera: 778 - Closing event 453, alarm end]
Dec 31 18:52:45 xal9001 zmc_dvideo0[4386]: INF [Kamera: 1000 - Capturing at 9.43 fps]
Dec 31 18:52:52 xal9001 zma_m1[4395]: INF [Kamera: 1000 - Processing at 8.93 fps]
Dec 31 18:53:22 xal9001 zma_m1[4395]: INF [Kamera: 1293 - Gone into alarm state]
Dec 31 18:53:22 xal9001 zma_m1[4395]: INF [Kamera: 1293 - Opening new event 454, alarm start]
Dec 31 18:53:26 xal9001 zma_m1[4395]: INF [Kamera: 1311 - Gone into alert state]
Dec 31 18:53:27 xal9001 zma_m1[4395]: INF [Kamera: 1321 - Left alarm state (454) - 38(18) images]
Dec 31 18:53:27 xal9001 zma_m1[4395]: INF [Kamera: 1321 - Closing event 454, alarm end]
Dec 31 18:53:30 xal9001 zms[4457]: INF [Authenticated user 'jr']
Dec 31 18:53:43 xal9001 zms[4464]: INF [Authenticated user 'jr']
Dec 31 18:54:26 xal9001 zmc_dvideo0[4386]: INF [Kamera: 2000 - Capturing at 9.90 fps]
Dec 31 18:54:36 xal9001 zma_m1[4395]: INF [Kamera: 2000 - Processing at 9.62 fps]
Dec 31 18:56:14 xal9001 zmc_dvideo0[4386]: INF [Kamera: 3000 - Capturing at 9.26 fps]
Dec 31 18:56:24 xal9001 zma_m1[4395]: INF [Kamera: 3000 - Processing at 9.26 fps]
Dec 31 18:56:25 xal9001 zms[4457]: INF [Got signal 15 (Terminated), exiting]
Dec 31 18:56:26 xal9001 zms[4942]: INF [Authenticated user 'jr']
Dec 31 18:57:55 xal9001 zmc_dvideo0[4386]: INF [Kamera: 4000 - Capturing at 9.90 fps]
Dec 31 18:58:04 xal9001 zma_m1[4395]: INF [Kamera: 4000 - Processing at 10.00 fps]
Dec 31 18:58:31 xal9001 zma_m1[4395]: INF [Kamera: 4261 - Gone into alarm state]
Dec 31 18:58:31 xal9001 zma_m1[4395]: INF [Kamera: 4261 - Opening new event 455, alarm start]
Dec 31 18:58:31 xal9001 zma_m1[4395]: INF [Kamera: 4262 - Gone into alert state]
Dec 31 18:58:33 xal9001 zma_m1[4395]: INF [Kamera: 4272 - Left alarm state (455) - 21(1) images]
Dec 31 18:58:33 xal9001 zma_m1[4395]: INF [Kamera: 4272 - Closing event 455, alarm end] ...


Happy New Year!
User avatar
monex
Posts: 169
Joined: Mon Jan 22, 2007 1:10 pm

Re: zm will not start - "ZM_PATH_LOGS" not allowed while "st

Post by monex »

Hi,
Dec 31 18:40:14 xal9001 zmpkg[4230]: INF [Command: start]
Dec 31 18:40:14 xal9001 zmpkg[4239]: INF [Command: stop]
I guess that this is the root of the problem. Maybe systemd kills the first process when invoking the stop command which will cause the database corruption. I could reproduce the database corruption by running zmpkg.pl start|status|stop and pressing immediately CTRL-C. After this the Config table was broken for me.

Anyway I have no idea why the stop command was called at all. I've made some changes in the RPM lately but I'm afraid to publish them because it will surely break the Config table during package upgrade and I'm still not sure how to absolutely avoid this problem.

Monex
Image
User avatar
monex
Posts: 169
Joined: Mon Jan 22, 2007 1:10 pm

Re: zm will not start - "ZM_PATH_LOGS" not allowed while "st

Post by monex »

Hi,

I think I have at least a fix for the broken Config table contents. You find new packages in the repository maybe you want to try them out and test if it solve the issue.

Have a lot of fun
Monex
Image
Locked