Zoneminder RPM & SRPMS for Red Hat & CentOS 6

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
sipi
Posts: 118
Joined: Wed Feb 14, 2007 5:18 pm

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by sipi » Mon Aug 25, 2014 6:41 pm

OK, I done a last test. I should have got one depency from internet because it didn't include any repos. It is libmodplug.so.1 (libmodplug-0.8.8.5-x.el6-x86_64.rpm). I intalled it then I could install vlc. I had some "fortune"...

I installed zm but I can't connect http://IP_adress/zm or http://localhost/zm because apache send an 403 Forbidden error message. I think I nee to setup some www user but I don't know how can I make it on centos especially.

sipi
Posts: 118
Joined: Wed Feb 14, 2007 5:18 pm

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by sipi » Thu Aug 28, 2014 5:40 pm

I think I need to setup some www user but I don't know how can I make it on centos especially.
No, it was default. I forgotten to disable selinux and zm works now.

But I have a bad news: zm and EyeZM can't work properly on centos too if I use analog cam resolution (704x576, 352x288, 176x144).

I tested it an analog ProVideo PV149 card and an Axis 240Q video server. The trounle same as on OpenSuSE (memory allocation)...

Thanks knnniggett for help.

lpallard
Posts: 85
Joined: Fri Mar 05, 2010 10:59 pm

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by lpallard » Sat Sep 06, 2014 6:37 pm

Hey knnniggett,

when I follow the instructions to setup the zmrepo on a Centos 6.5 server, all goes fine until I try to install ZM with

yum --disablerepo=rpmforge install zoneminder

then I get the following error:

[code]warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 27297b34: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-el-6-zmrepo
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-zmrepo-zmrepo

GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-zmrepo-zmrepo[/code]

Would you know what this is?
Cheers!

User avatar
knight-of-ni
Posts: 2226
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by knight-of-ni » Sat Sep 06, 2014 7:43 pm

lpallard wrote:Hey knnniggett,

when I follow the instructions to setup the zmrepo on a Centos 6.5 server, all goes fine until I try to install ZM with

yum --disablerepo=rpmforge install zoneminder

then I get the following error:

Code: Select all

warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 27297b34: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-el-6-zmrepo
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-zmrepo-zmrepo

GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-zmrepo-zmrepo
Would you know what this is?
Cheers!
Oh, I messed that up. Copy/paste error. Give me a minute to generate a new zmrepo rpm and push it up to the repo. I'll let you know when its ready.
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
knight-of-ni
Posts: 2226
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by knight-of-ni » Sat Sep 06, 2014 8:01 pm

Alright, I've pushed a new zmrepo rpm up with the fix. To grab it w/o waiting for your yum cache to expire do this:

Code: Select all

sudo yum clean metadata
sudo yum update
All should be well after that.

Note that you are ahead of me on developing a set of steps to convert existing zoneminder systems over to zmrepo so I'll just lay down what I've got in my head, but haven't tested:

1) permanently disable rpmforge. Don't think anyone should have a reason to keep this old repo hanging around.
2) Permanently disable rpmfusion & epel unless you need either for something else (you might). If so, I recommend you use yum priorities to force zmrepo to a *lower* priority (e.g. higher number in the repo file) than rpmfusion & epel.
3) install the zmrepo rpm
4) sudo yum update (at the moment should not have any updates)
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/

lpallard
Posts: 85
Joined: Fri Mar 05, 2010 10:59 pm

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by lpallard » Sat Sep 06, 2014 10:15 pm

knnigett, I followed the steps you explained but after yum clean metadata & yum update, yum found zmrepo package was in need of updating but after I accepted to update it, I still received the same error..

Weird no?

EDIT: Using --nogpgcheck allows updating and using your repo.

User avatar
knight-of-ni
Posts: 2226
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by knight-of-ni » Sat Sep 06, 2014 10:26 pm

lpallard wrote:knnigett, I followed the steps you explained but after yum clean metadata & yum update, yum found zmrepo package was in need of updating but after I accepted to update it, I still received the same error..

Weird no?

EDIT: Using --nogpgcheck allows updating and using your repo.
Look under /etc/yum.repos.d for a zmrepo.repo.rpmnew
It may not have updated the original file
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/

lpallard
Posts: 85
Joined: Fri Mar 05, 2010 10:59 pm

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by lpallard » Sun Sep 07, 2014 3:30 am

There are 2 repo files under /etc/yum.repos.d

zmrepo.repo

[code][zmrepo]
name=Zoneminder and its dependencies for Enterprise Linux 6 - $basearch
baseurl=http://zmrepo.mehvc.com/el/6/$basearch
http://zmrepo.connortechnology.com/el/6/$basearch
#mirrorlist=http://zmrepo.mehvc.com/el/6/$basearch
enabled=1
gpgcheck=1
# zmrepo uses packages from other repos
# Import all required gpg keys
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6-zmrepo
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-el-6-zmrepo
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-zmrepo[/code]

zmrepo.repo.rpmsave
[code][zmrepo]
name=Zoneminder and its dependencies for Enterprise Linux 6 - $basearch
baseurl=http://zmrepo.mehvc.com/el/6/$basearch
http://zmrepo.connortechnology.com/el/6/$basearch
#mirrorlist=http://zmrepo.mehvc.com/el/6/$basearch
enabled=1
gpgcheck=1
# zmrepo uses packages from other repos
# Import all required gpg keys
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-el-6-zmrepo
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-zmrepo-zmrepo[/code]

I assume the zmrepo.repo.rpmsave is obsolete and can be deleted?

Until you push the next package update, we wont know if its working unless I uninstall the repo package and reinstall it but AFAIK when I "upgraded" the package today, I was still getting the GPG error..

Other anomaly is that I have no image in the camera monitor and even within the playback window. Simply the page is blank. The logs contains

[code]2014-09-06 23:27:06.501344 web_js 11737 ERR getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-431917s.sock ) failed: No such file or directory - checkStreamForErrors() ?view=watch
2014-09-06 23:27:06.436128 web_php 11735 ERR socket_sendto( /var/run/zm/zms-431917s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2337
2014-09-06 23:27:02.368191 zma_m1 20097 INF Monitor-1: 24000 - Processing at 29.41 fps /builddir/build/BUILD/ZoneMinder-1.27.0/src/zm_monitor.cpp 1153
2014-09-06 23:26:53.422412 web_js 11737 ERR getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-431917s.sock ) failed: No such file or directory - checkStreamForErrors() ?view=watch
2014-09-06 23:26:53.396967 web_php 11732 ERR socket_sendto( /var/run/zm/zms-431917s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2337
2014-09-06 23:26:49.698699 web_js 11731 ERR getCmdResponse stream error: socket_sendto( /var/run/zm/zms-502153s.sock ) failed: No such file or directory - checkStreamForErrors() ?view=event
2014-09-06 23:26:49.667692 web_php 11742 ERR socket_sendto( /var/run/zm/zms-502153s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2337
2014-09-06 23:26:40.701800 zmc_m1 11402 INF Monitor-1: 690000 - Capturing at 30.30 fps /builddir/build/BUILD/ZoneMinder-1.27.0/src/zm_monitor.cpp 2831
2014-09-06 23:26:40.383698 web_js 11733 ERR getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-431917s.sock ) failed: No such file or directory - checkStreamForErrors() ?view=watch
2014-09-06 23:26:40.358692 web_php 11744 ERR socket_sendto( /var/run/zm/zms-431917s.sock ) failed: No such file or directory /usr/share/zoneminder/www/includes/functions.php 2337[/code]

Seems the system can capture from the IP camera just fine as the source is "green", I have events (confirmed its working by walking in front of the cam, then the event counter goes +1) and in the logs I see messages like "Monitor-1: 26000 - Processing at 29.41 fps".

If you can give quick help for this issue, to me its more important than the repo issue since ZM is not really functional at this time.

BTW, Congrats on the repo and packaging ZM for Centos!!!!!!! Now this is really installed in a breeze which is most definitely appreciated!

User avatar
knight-of-ni
Posts: 2226
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by knight-of-ni » Sun Sep 07, 2014 2:06 pm

Starting from a fresh system, here is the relevant part of what I see when I "sudo yum install zoneminder":

Code: Select all

warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6-zmrepo
Importing GPG key 0x0608B895:
 Userid : EPEL (6) <epel@fedoraproject.org>
 Package: zmrepo-6-4.el6.noarch (@/zmrepo-6-4.el6.noarch)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6-zmrepo
Is this ok [y/N]: y
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-el-6-zmrepo
Importing GPG key 0x849C449F:
 Userid : RPM Fusion free repository for EL (6) <rpmfusion-buildsys@lists.rpmfusion.org>
 Package: zmrepo-6-4.el6.noarch (@/zmrepo-6-4.el6.noarch)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-el-6-zmrepo
Is this ok [y/N]: y
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-zmrepo
Importing GPG key 0x27297B34:
 Userid : Andrew Bauer <knnniggett@users.sourceforge.net>
 Package: zmrepo-6-4.el6.noarch (@/zmrepo-6-4.el6.noarch)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-zmrepo
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
As you can see, three times it detects an rpm with a key that is not currently in your local rpm dB and asks if it is okay to import the key found in /etc/pki/rpm-gpg/. As long as you answer "yes" all three times, it imports the keys and everything works. Note that once answer "yes" three times, then it will remember them from here on after.

Lastly, it does this three times because zmrepo contains rpms from three different places. At this time, I am not signing the rpm's that come from RPMFusion and EPEL with my own key, but if it keeps causing problems then maybe I will.

If you aren't seeing the same output on your sytstem, then try removing the zmrepo rpm altogether, delete all "/etc/yum.repos.d/zmrepo*" files that may still be around, and then re-install the latest zmrepo rpm again. Remember to enter "y" all three times if/when asked about the key!


To answer your next question, you can see that the backend is working with the messages "Processing at x.xx fps". Knowing that, the most common cause to your problem is an incorrect apache config. I know you and I have been down this path before.... On a stock, unmodified centos system all you have to do is delete the line that says "DELETE THIS LINE" per the README file. Don't make any other changes. You'll need to restart apache following this change.

If you are sure you've done that, then here are some other things to check, one at a time, to try and isolate the problem:
1) permanently disable selinux by editing /etc/selinux/config (requires reboot)
2) verify this is not a browser problem by using Firefox. Firefox is the most zoneminder-friendly.
3) verify this is not a case where your system simply can't keep up with that high of a frame rate. Turn the frame rate of your camera down to ~10 fps and see if that makes a difference. Yes, I know I've told you this before. :-)
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
knight-of-ni
Posts: 2226
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by knight-of-ni » Wed Sep 10, 2014 11:55 am

I've made a youtube video that shows how to install zoneminder on centos6 using zmrepo:
https://www.youtube.com/watch?v=l2lLvl8WxfU
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/

lpallard
Posts: 85
Joined: Fri Mar 05, 2010 10:59 pm

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by lpallard » Thu Sep 11, 2014 2:04 am

Hey knnniggett


thanks for the youtube video! I watched it and came to the conclusion that I had followed every steps you showed...

I still cannot get the live stream and playback still doesnt work.

I double checked the zoneminder.conf file in /etc/httpd/conf.d had the line "DELETE THIS LINE" deleted...

I checked httpd.conf for misconfigurations, couldnt find any.

No errors in httpd errors log

The only thing that came to my mind was when I first tried to install ZM on a slackware machine about 18 months ago.. I had to copy the files "nph-zms" & "zms" to /var/www/cgi-bin because they were not automatically copied there or symlinked somehow..

Now I wonder if this is not related to my issue?

I tried copying them (actually symlinked them)

lrwxrwxrwx 1 root root 39 Sep 6 23:49 nph-zms -> /usr/libexec/zoneminder/cgi-bin/nph-zms
lrwxrwxrwx 1 root root 35 Sep 6 23:49 zms -> /usr/libexec/zoneminder/cgi-bin/zms

But it didnt help. I then thought that CGI wasnt functional on my Centos server ...

Im baffled! Any clues?

lpallard
Posts: 85
Joined: Fri Mar 05, 2010 10:59 pm

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by lpallard » Thu Sep 11, 2014 2:30 am

... Additionally, these errors seems to populate web_php.log when I try to get live stream or playback


2014-09-10 22:26:31.382157 web_js 6948 ERR getStreamCmdResponse stream error: socket_sendto( /var/run/zm/zms-752275s.sock ) failed: No such file or directory - checkStreamForErrors() ?view=watch


These errors are (according to a google search) linked to execution of CGI as I suspected from my Slackware days... Something's definitely flaky in ZM's code...

On Centos how do you activate CGI support? Everybody's running ubuntu and it seems running "a2enmod cgi" is enough.. On Centos this command is nonexistent!

User avatar
knight-of-ni
Posts: 2226
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by knight-of-ni » Thu Sep 11, 2014 12:59 pm

That's just it. The RPM puts everything in place, exactly where it is supposed to go. You'll likely make things worse if you start moving files around, symlinking things, or doing anything else that isn't stated in the README.

To me, this sounds like you have unknowingly altered your system in a way that is causing problems. We need to figure out what that is. When you installed the Operating System, did you perform any steps, no matter how insignificant, that are not stated in the zoneminder documentation? For example, if you look a few posts prior to yours, one person chose to comment out the tmpfs in fstab and apparently forgot about it. Since zonemidner needs that to function, it caused all sorts of frustration, and it wasn't something I would know to ask since that is turned on by default.

The second question is, are you starting from a new, empty database? Hopefully you have not copied the database over from a previous installation (e.g. slackware) because that will certainly not work (the file paths to certain things under Options are different).

So go back and review the steps you have taken. If you did anything other than install a basic operating system, create an admin user, and then install zoneminder with a new database then we need to review that.

Last question, do you know the camera you are using works in zoneminder? I think the answer to this is yes from your previous posts, but we need to make sure.
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/

lpallard
Posts: 85
Joined: Fri Mar 05, 2010 10:59 pm

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by lpallard » Thu Sep 11, 2014 10:50 pm

OK I took a close look at what I have..

Everything done by the command "yum install zoneminder" is intact including: the files & folders, zoneminder.conf (deleted the Deny from all line!!), the /var/www/cgi-bin folder is empty (I deleted the symlinks I previously created). In other words, I am back to the state I was right after installing ZM .

The other thing is that I have reused an older database from a previous Centos install (same OS release = 6.5) but at that time I was running ZM 1.25

I tried to upgrade the DB as per the Readme file running this command:

zmupdate.pl --user=root --pass=XXXXXXXXXXXXXXXXXXXXX --version=1.25

But it returned

Initiating database upgrade to version 1.27 from version 1.25

WARNING - You have specified an upgrade from version 1.25 but the database version found is 1.27. Is this correct?
Press enter to continue or ctrl-C to abort :

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/lib/zoneminder/temp if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n

Upgrading database to version 1.27
Loading config from DB
Saving config to DB
Upgrading DB to 1.26.1 from 1.26.0

Database successfully upgraded from version 1.26.1.
Upgrading DB to 1.26.2 from 1.26.0

Database successfully upgraded from version 1.26.2.
Upgrading DB to 1.26.3 from 1.26.0

Database successfully upgraded from version 1.26.3.
Upgrading DB to 1.26.5 from 1.26.0

Database successfully upgraded from version 1.26.5.
Upgrading DB to 1.27.0 from 1.26.0
ERROR 1060 (42S21) at line 16: Duplicate column name 'User'
Output:
Command 'mysql -hlocalhost -uroot -XXXXXXXXXXXXXXXXXXXx zoneminder < /usr/share/zoneminder/db/zm_update-1.27.0.sql' exited with status: 1

Finally yes I did a lot of things before installing zoneminder.. Actually, ZM was the last thing I installed on this server...

Yes, the camera works flawlessly in ZM. Tested for months.

I will try to maybe uninstall ZM completely, then delete the DB, reinstall ZM, and follow the instructions of the readme file to the letter...

Any better idea?

Cheers!

lpallard
Posts: 85
Joined: Fri Mar 05, 2010 10:59 pm

Re: Zoneminder RPM & SRPMS for Red Hat & CentOS 6

Post by lpallard » Thu Sep 11, 2014 11:46 pm

I went ahead and reinstalled ZM and a new database.

It must be an option of some sort creating problems because right after installation and database configuration, I went to the ZM webinterface, added my camera source in a monitor, immediately the source came up green and live stream worked.

Then I decided to configure the options and it crapped. Now I am back to square one. I really did not change many options, pretty much only the path where I want to store the events & images (on my freenas box), logging options and email settings....

Attached are screenshots of my options. Take a look and let me know if you see anything that could/would cause such issues...
Attachments
zm3.jpeg
zm3.jpeg (76.08 KiB) Viewed 4503 times
zm2.jpeg
zm2.jpeg (109.87 KiB) Viewed 4503 times
zm1.jpeg
zm1.jpeg (137.24 KiB) Viewed 4503 times

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests