Upgrading from 1.26.4 to 1.26.5 Error's

Forum for questions and support relating to the 1.26.x releases only.
Locked
User avatar
2Psycho
Posts: 37
Joined: Tue Jan 24, 2012 9:45 pm

Upgrading from 1.26.4 to 1.26.5 Error's

Post by 2Psycho »

Hello,

Today I tried to upgrade my current setup from 1.26.4 to 1.26.5.
The compilation runs ok without any error's but at the moment I want to upgrade the database to the latest version or the start it generates several errors:
zmupdate.pl --user=USER_NAME--pass=MYSQL_PASSWORD

Code: Select all

Use of uninitialized value in transliteration (tr///) at /usr/local/lib64/perl5/ZoneMinder/Config.pm line 82, <CONFIG> line 51.
Can't use an undefined value as a symbol reference at /usr/local/lib64/perl5/ZoneMinder/Config.pm line 83, <CONFIG> line 51.
BEGIN failed--compilation aborted at /usr/local/lib64/perl5/ZoneMinder/Config.pm line 100, <CONFIG> line 51.
Compilation failed in require at /usr/local/bin/zmupdate.pl line 47, <CONFIG> line 51.
BEGIN failed--compilation aborted at /usr/local/bin/zmupdate.pl line 47, <CONFIG> line 51.
I discoverd that the value of "ZM_SERVER_HOST" was empty and changed the value in the zm.conf file to other values like: localhost, SERVERNAME, DOMAIN name etc.
The error output then indicates this:

Code: Select all

Bareword "ZM_VERSION" not allowed while "strict subs" in use at /usr/local/bin/zmupdate.pl line 134.
Bareword "ZM_VERSION" not allowed while "strict subs" in use at /usr/local/bin/zmupdate.pl line 150.
Bareword "ZM_VERSION" not allowed while "strict subs" in use at /usr/local/bin/zmupdate.pl line 360.
Bareword "ZM_VERSION" not allowed while "strict subs" in use at /usr/local/bin/zmupdate.pl line 366.
Bareword "ZM_VERSION" not allowed while "strict subs" in use at /usr/local/bin/zmupdate.pl line 475.
Bareword "ZM_VERSION" not allowed while "strict subs" in use at /usr/local/bin/zmupdate.pl line 1036.
Bareword "ZM_VERSION" not allowed while "strict subs" in use at /usr/local/bin/zmupdate.pl line 1047.
Execution of /usr/local/bin/zmupdate.pl aborted due to compilation errors.
I removed 1.26.5 and went back to 1.26.4 this one is running fine.
Enjoyment Matters
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Upgrading from 1.26.4 to 1.26.5 Error's

Post by knight-of-ni »

The current workaround is to put ZM_VERSION back into your zm.conf file like this:

Code: Select all

ZM_VERSION=1.26.5
The plan is to make ZM_VERSION disappear entirely. This has been fixed for the next release.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
User avatar
2Psycho
Posts: 37
Joined: Tue Jan 24, 2012 9:45 pm

Re: Upgrading from 1.26.4 to 1.26.5 Error's

Post by 2Psycho »

After modifying the zm.conf file I was able the execute the update.pl command and upgrade the database.

Code: Select all

ZM_VERSION=1.26.5
ZM_SERVER_HOST=DOMAIN-NAME
At the moment I try to start zoneminder I get the following error message in the MySQL log file:

Code: Select all

2013-12-27 16:23:42.626360	zmpkg	30468	ERR	Unable to run "/usr/local/bin/zmfix", output is ""	zmpkg.pl	
2013-12-27 16:23:42.504194	undef	30480	ERR	Attempt to fetch integer value for ZM_BLEND_ALARMED_IMAGES, actual type is boolean. Try running 'zmupdate.pl -f' to reload config.	zm_config.cpp	185
2013-12-27 16:23:41.601030	zmpkg	30468	INF	Command: start	zmpkg.pl	
The database is set to the tinyint but the program expects an boolean?
Enjoyment Matters
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Upgrading from 1.26.4 to 1.26.5 Error's

Post by knight-of-ni »

Did you run zmudpate.pl -f like the message suggests?

ZM_BLEND_ALARMED_IMAGES is no longer needed in 1.26.5.
If zmupdate.pl -f doesn't purge that then go into the Config table and delete that record manually.

Lastly, note that your zmuser will need the "Lock Tables" mysql permission added to it if it doesn't already have it.

Edit: changed reference to dB to Config table
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
User avatar
2Psycho
Posts: 37
Joined: Tue Jan 24, 2012 9:45 pm

Re: Upgrading from 1.26.4 to 1.26.5 Error's

Post by 2Psycho »

In the upgrade script only new field is added see the script below:

Code: Select all

--
-- This updates a 1.26.4 database to 1.26.5
--

--
-- Add AlarmRefBlendPerc field for controlling the reference image blend percent during alarm (see pull request #241)
--
ALTER TABLE `Monitors` ADD `AlarmRefBlendPerc` TINYINT(3) UNSIGNED NOT NULL DEFAULT '3' AFTER `RefBlendPerc`;
Should there be additional lines added for the zmuser en removal of the ZM_BLEND_ALARMED_IMAGES fields?

I will try to recompile again :)
Enjoyment Matters
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Upgrading from 1.26.4 to 1.26.5 Error's

Post by knight-of-ni »

AlarmRefBlendPerc is a new column that was added to the Monitors table. Adding columns to the Monitors table requires an entry in the zm_update-x.x.x.sql.

ZM_BLEND_ALARMED_IMAGES is a variable that happens to be stored as a single record in the Config table. This does not require an entry in zm_update-x.x.x.sql.

As new versions of zoneminder are released, new variables are added and old ones are deleted. Zoneminder should automatically insert or delete these variables as needed. I can't explain why that didn't happen on your system. However, you should manually delete the single record in your Config table if it is not automatically deleted.

Might want to verify you don't have any stale files lying around from zm 1.26.4 and make sure your zmuser has these permissions:

Code: Select all

grant select,insert,update,delete,lock tables,alter on zm.* to '<database user>'@localhost identified by '<database password>';

ZM_BLEND_ALARMED_IMAGES was removed with this commit:
https://github.com/ZoneMinder/ZoneMinde ... 2e426e0508
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
swiftflic
Posts: 9
Joined: Fri Dec 27, 2013 4:51 pm

Re: Upgrading from 1.26.4 to 1.26.5 Error's

Post by swiftflic »

I had simular problems like above. Could not start ZM after upgrading to 1.26.5. Now I have reverted to 1.26.4, but I get these errors:

Code: Select all

Dec 27 18:51:12 server zmpkg[1883]: INF [Command: start]
Dec 27 18:51:16 server zmdc[1909]: INF [Server starting at 13/12/27 18:51:16]
Dec 27 18:51:19 server zmdc[1909]: FAT [Can't bind: Permission denied]
Dec 27 18:51:26 server zmdc[1908]: FAT [Can't connect: Permission denied]
Dec 27 18:51:26 server zmpkg[1883]: ERR [Unable to run "su [zm-user] --shell=/bin/sh --command='/usr/local/bin/zmdc.pl startup'", output is "Starting server"]
Any suggestions how I should debug this?

Thanks

Edit:
As I found many references linking to permissions I was looking at those all over the system for some hours already. Finally fount it!
/tmp/zm had the correct group, but wrong user as owner for my setup. Is this traceable by a debug setting (in case I run into this again)?
User avatar
2Psycho
Posts: 37
Joined: Tue Jan 24, 2012 9:45 pm

Re: Upgrading from 1.26.4 to 1.26.5 Error's

Post by 2Psycho »

After the removal of the field "ZM_BLEND_ALARMED_IMAGES" I was able to start ZoneMinder again.

Initially there was problem with the startup script zm which starts ZoneMinder automatic during the boot/shutdown process.
I had to chmod the config file in /usr/local/etc/zm.conf to 606.
By default it is owned now by Apache but during boot this is the system.
Enjoyment Matters
Locked