LinHES Forums
http://forums.linhes.org/

Zoneminder zmupdate.pl not completing from 8.1 to 8.3
http://forums.linhes.org/viewtopic.php?f=21&t=24155
Page 1 of 1

Author:  glennph93 [ Sat Mar 14, 2015 8:58 am ]
Post subject:  Zoneminder zmupdate.pl not completing from 8.1 to 8.3

I'm having trouble with getting zoneminder (1.28.04) to run in linhes 8.3. It was running fine in 8.1 but the database needs upgraded from 1.25.0 to 1.28.0 (seen from logs i needed to run zmupdate.pl). When I run zmupdate.pl(zoneminder is stopped) I get the error below.

Code:
[mythtv@mythtv john]$ sudo zmupdate.pl

Initiating database upgrade to version 1.28.0 from version 1.25.0

Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :

Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /var/tmp if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n

Upgrading database to version 1.28.0
Loading config from DB
No option 'ZM_BLEND_ALARMED_IMAGES' found, removing at /usr/lib64/perl5/ZoneMinder/ConfigAdmin.pm line 89, <STDIN> line 2.
No option 'ZM_LOCAL_BGR_INVERT' found, removing at /usr/lib64/perl5/ZoneMinder/ConfigAdmin.pm line 89, <STDIN> line 2.
No option 'ZM_V4L2_CAPTURE_FIELDS' found, removing at /usr/lib64/perl5/ZoneMinder/ConfigAdmin.pm line 89, <STDIN> line 2.
No option 'ZM_Y_IMAGE_DELTAS' found, removing at /usr/lib64/perl5/ZoneMinder/ConfigAdmin.pm line 89, <STDIN> line 2.
Saving config to DB
DBD::mysql::st execute failed: Data too long for column 'DefaultValue' at row 1 at /usr/lib64/perl5/ZoneMinder/ConfigAdmin.pm line 155, <STDIN> line 2.
Can't execute: Data too long for column 'DefaultValue' at row 1 at /usr/bin/zmupdate.pl line 475.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle database=zm;host=localhost at /usr/share/perl5/core_perl/Carp.pm line 100, <STDIN> line 2.



Is there way to fix this or should/could I start from scratch? (I don't mine restarting from scratch) If so how can I fix this or start fresh(new database)?
Thanks in advance

Author:  glennph93 [ Tue Mar 17, 2015 6:12 pm ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

I was able to reinstall the database with the following steps

Code:
mysql  -uroot
mysql > drop database zm;
mysql > quit;

Then reinstall the database with:
mysql -u root
>create database zm;
>exit
mysql -u root zm < /usr/share/zoneminder/db/zm_create.sql
mysql -u root zm
>grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
>quit



Then added the service. Logs,ps ax, and mythzoneminder shows its running but I can't access the web page to configure my cameras. any ideas?

Author:  bobmyth [ Wed Mar 18, 2015 10:34 pm ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

I had the same problems. Here's what I've figured out so far:

Fix /etc/lighttpd/zm.include to read:
Code:
alias.url += (
 "/zm" => "/data/srv/http/zoneminder/"
)


Enable pdo_mysql extension in /etc/php/php.ini:
Code:
extension=pdo_mysql.so


Then restart lighttpd (or reboot). At this point I had to access zoneminder using:
http://mythtv/zm/index.php

This did not appear to work
http://mythtv/zm/

However, I am unable to get any of my cameras to work at this point (using analog capture cards). Please report if you are able to get your cameras working.

Author:  glennph93 [ Thu Mar 19, 2015 4:03 pm ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

Thanks bobmyth. That pretty much did the trick. Except I had to delete a extra include statement in /etc/lighttpd/lighttpd.conf for the zm.include(I left the one in conf.include) and I got the interface. But like you I couldn't add any monitors, it acts like its going to but nothing shows up.

Author:  glennph93 [ Mon Mar 23, 2015 5:05 pm ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

OK got to add monitors in zoneminder by commenting out the following in /usr/my.cnf. The issue is something to do with null values in the database not being written to.

Code:
###sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES


Then rebooted and I was able to add a monitor through the web interface. Hopefully this doesn't have an affect on the myth database.

Author:  glennph93 [ Mon Mar 23, 2015 5:32 pm ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

One other Thing I had to add write permissions (for all) to these directories:
Code:
[mythtv@mythtv zoneminder]$ pwd
/var/cache/zoneminder
[mythtv@mythtv zoneminder]$ ls -al
total 20
drwxr-xr-x 5 http http 4096 Dec 22 18:42 .
drwxr-xr-x 8 root root 4096 Mar  7 11:57 ..
drwxrwxrwx 2 root root 4096 Dec 22 18:42 events
drwxrwxrwx 2 root root 4096 Mar 23 19:29 images
drwxrwxrwx 2 root root 4096 Dec 22 18:42 temp

Author:  bobmyth [ Mon Mar 23, 2015 10:25 pm ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

glennph93 wrote:
OK got to add monitors in zoneminder by commenting out the following in /usr/my.cnf. The issue is something to do with null values in the database not being written to.

Code:
###sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES


Then rebooted and I was able to add a monitor through the web interface. Hopefully this doesn't have an affect on the myth database.


On my system the my.cnf file is in /etc/mysql/my.cnf. However, I cannot find the sql_mode in that file. Could you confirm the location of your file?

Author:  glennph93 [ Tue Mar 24, 2015 4:43 am ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

I also had one in /etc/mysql/ without that mode. The one in /usr/ did the trick. Not sure how i found that location(maybe mysql post on this forum) but mine was there.

Author:  glennph93 [ Tue Mar 24, 2015 5:37 am ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

This might help. I found my fix in this post https://github.com/ZoneMinder/ZoneMinder/issues/649. You might want to query sql with the following command, found in that post, to see if that mode is set.

Code:
SELECT @@GLOBAL.sql_mode; and/or
SELECT @@SESSION.sql_mode;

Author:  bobmyth [ Tue Apr 14, 2015 9:52 pm ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

I resolved my last issue. Edit /etc/lighttpd/lighttpd.conf and change:
Code:
alias.url += ( "/cgi-bin" => "/data/srv/httpd/cgi-bin/")
to
Code:
alias.url += ( "/cgi-bin" => "/data/srv/http/cgi-bin/")


Then restart lighttpd.

Author:  brfransen [ Wed Apr 15, 2015 9:49 am ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

I think most of the problems are due to a typo when the package was built. The srv directory should have been /data/srv/httpd but it was /data/srv/http. I have fixed that in testing. If you are willing to test it please install and post the results:
Code:
sudo pacman -U http://linhes.org/repo/x86_64/core-testing/zoneminder-1.28.0-5-x86_64.pkg.tar.xz


I also updated the php package so that the php.ini will include the pdo_mysql extension.

Author:  bobmyth [ Thu Apr 16, 2015 9:20 pm ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

I tried the newer package. FYI, there were a few warnings:
Code:
warning: directory permissions differ on /usr/share/polkit-1/rules.d/
filesystem: 700  package: 755
warning: directory permissions differ on /var/run/zm/
filesystem: 754  package: 755

Also, zoneminder was broken after the upgrade. I had to undo my modifications to the cgi-bin directory. I wasn't sure if the newer package was supposed to fix that or not.

Author:  brfransen [ Fri Apr 17, 2015 7:17 am ]
Post subject:  Re: Zoneminder zmupdate.pl not completing from 8.1 to 8.3

bobmyth wrote:
Also, zoneminder was broken after the upgrade. I had to undo my modifications to the cgi-bin directory. I wasn't sure if the newer package was supposed to fix that or not.
The new package should work with the default lighttpd.conf cgi-bin location:
Code:
alias.url += ( "/cgi-bin" => "/data/srv/httpd/cgi-bin/")

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/