zmupdate.pl throwing errors

Forum for questions and support relating to the 1.29.x releases only.
Locked
TT_ZX
Posts: 9
Joined: Thu Mar 11, 2010 7:24 am

zmupdate.pl throwing errors

Post by TT_ZX »

I recently compiled ZM from source on Gentoo and everything was working great. I just now recompiled from source because I wanted to try libvlc and in doing so updated to the latest source files from git.

When restarting ZM I get the following in my logs:

Code: Select all

ERR [Config mismatch, expected 213 items, read 211. Try running 'zmupdate.pl -f' to reload config.]
Not unexpected and I've had this before. I stop ZM and run zmupdate.pl -f but this throws these errors:

Code: Select all

Use of uninitialized value $Config{"ZM_DIR_EVENTS"} in pattern match (m//) at /usr/bin/zmupdate.pl line 82.
Use of uninitialized value $Config{"ZM_PATH_WEB"} in concatenation (.) or string at /usr/bin/zmupdate.pl line 82.
Use of uninitialized value in concatenation (.) or string at /usr/bin/zmupdate.pl line 82.
Use of uninitialized value $Config{"ZM_WEB_USER"} in getpwnam at /usr/bin/zmupdate.pl line 90.
Use of uninitialized value in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/5.20.2/ZoneMinder/Logger.pm line 156.
Use of uninitialized value in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/5.20.2/ZoneMinder/Logger.pm line 206.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in pattern match (m//) at /usr/lib64/perl5/vendor_perl/5.20.2/ZoneMinder/Database.pm line 83.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_NAME"} in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/5.20.2/ZoneMinder/Database.pm line 96.
Use of uninitialized value in concatenation (.) or string at /usr/lib64/perl5/vendor_perl/5.20.2/ZoneMinder/Database.pm line 96.
DBI connect('database=;host=','',...) failed: Access denied for user 'root'@'localhost' (using password: NO) at /usr/lib64/perl5/vendor_perl/5.20.2/ZoneMinder/Database.pm line 96.
Can't call method "trace" on an undefined value at /usr/lib64/perl5/vendor_perl/5.20.2/ZoneMinder/Database.pm line 102.
I don't know where to go from here. It doesn't look a db issue to me. Can anyone point me in the right direction? If I can provide any more info please ask.

Thanks in advance.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zmupdate.pl throwing errors

Post by knight-of-ni »

Welcome to the world of building from-source and the reason behind why we discourage people from attempting it.

The only way to give any kind of precise answer to this is to know exactly what state your system was in prior to your attempt at building from source (what version of previous zoneminder, how it was installed, was it a package?), knowing exactly how you built the new zoneminder with all the cmake parameters you used, and seeing your entire build output from start to finish. Even with this information, it still might not be obvious what happened.

The source of the problem is going be either how you chose to build zoneminder (especially if it was in any way different from the previous zoneminder on your system), or stale files lying around from the previous zoneminder.

Really, the only advice I can give is to get your system back to clean state. The database itself can stay, but everything else needs to go. Make uninstall will not remove everything. You have to manually search your file system and get rid of all the old zoneminder files, in particular zm.conf and the Perl modules. Perl no longer supports "make uninstall" so you've got to delete them yourself. The Perl Make::Maker authors think this is a feature apparently.

Once you are certain your system is clean, you could attempt to build from-source again, but I would encourage you to attempt another solution.

You stated you went down this path because you wanted libvlc support. If the zoneminder package you initially installed really does not have libvlc support, then the best course of action would be to contact the package maintainer and have him add it. All he has to do is include the right libvlc libraries in his build environment, then zoneminder will include it automatically during the build.

Another alternative would be to build a custom zoneminder package yourself. I don't use Gentoo and can't help you with that. I would search Gentoo related sites for information on how to build a zoneminder package.
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/
TT_ZX
Posts: 9
Joined: Thu Mar 11, 2010 7:24 am

Re: zmupdate.pl throwing errors

Post by TT_ZX »

Hi knnniggett, thanks for your comments. Most of the packages in Gentoo are built from source and this is handled by the package manager, Portage. Portage also handles removal of the installed files when a package is removed so stale files shouldn't be the cause.

I had a look at recent commits in the Git repository and found a number of changes (merge_db_connects) around how the database is accessed. I cloned the Git repository and reversed these commits and after building from this source the problems with zmupdate.pl went away. So I think these changes haven't been fully implemented yet or its a bug or something.

I haven't had time to do anything else on this since. I might try building from the latest master branch and see if the problem persists in a few days. If so I'll contact the devs to see if they are aware of it.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zmupdate.pl throwing errors

Post by knight-of-ni »

Actually, this is a problem with the zoneminder source code. I was unaware certain changes where made while I was on vacation.
Those changes are causing this issue:
https://github.com/ZoneMinder/ZoneMinde ... -220142179

I got the same error when I ran my weekly builds for fedora and centos.
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/
Locked