Start up problems on F20_64

Forum for questions and support relating to the 1.27.x releases only.
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Start up problems on F20_64

Post by jHeron »

I have installed all the prerequisites and the f20_64 RPM from here http://www.zoneminder.com/forums/viewto ... =9&t=21400
as well as downgraded gnutls. I then followed the instructions for setting up HTTPD and mysql (MariaDb in my case since I already have Mythtv running with it).
When I run

Code: Select all

sudo zmpkg.pl start
I don t get any errors but it doesn't start. In the zm log from the console I get these errors:

Code: Select all

2014-04-04 15:29:30.837390	zmpkg	3633	ERR	Unable to run "/usr/bin/zmdc.pl startup", output is "Starting server"	zmpkg.pl	
2014-04-04 15:29:30.796900	zmdc	3641	FAT	Can't connect: No such file or directory	zmdc.pl	
2014-04-04 15:29:22.868080	zmdc	3644	FAT	Can't bind: No such file or directory	zmdc.pl	
2014-04-04 15:29:20.796600	zmdc	3644	INF	Server starting at 14/04/04 15:29:20	zmdc.pl	
2014-04-04 15:29:20.641300	zmpkg	3633	INF	Command: start	zmpkg.pl
.
I checked and zmdc.pl is where it should be in /usr/bin.
Any suggestion on what might be the problem here?
I have spent the last couple hours googling arouind without much joy...
Any help would be appreciated!
Cheers,
Jon
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Start up problems on F20_64

Post by knight-of-ni »

Either selinux is blocking zoneminder (very common) or there is another reason why zoneminder cannot create a socket.
Verify the folder zoneminder is using for sockets (its in options) exists and then verify that apache can write to it.
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/
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Start up problems on F20_64

Post by jHeron »

Thanks for the response!
selinux is disabled altogether. I checked under options->Paths->PATH_SOCKS and its set to /tmp/zm/
That folder didnt exist so I created it and did a

Code: Select all

sudo chmod 777
to it and still no joy...
I am not sure how to make sure apache can write to it?
Excuse my linux ignorance!
I will research now how to make sure apache can write to it...
[Edit]
I tried

Code: Select all

sudo chown apache /tmp/zm 
and still no joy...
[/edit]
Cheers,
Jon
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Start up problems on F20_64

Post by jHeron »

I am trying to wrap my head around what the permissions should be.
For example when I ls -l on /var/www I see that root has ownership, is that correct or should it be owned by apache or www-data?
I am confused... As usual...

Code: Select all

[jon@localhost-localdomain ~]$ ls -l /var/www
total 8
drwxrwxrwx. 2 root root 4096 Mar 28 07:10 cgi-bin
drwxrwxrwx. 2 root root 4096 Mar 28 07:10 html
I also notice that the html and cgi-bin folders are empty and dont contain a zm folder.
Am I barking up the wrong tree here or what?
Cheers,
Jon
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Start up problems on F20_64

Post by knight-of-ni »

The RPM will install all the files and permissions necessary for a working system.
This has been tested on a clean system and is known to work fine.

My recommendation is to set everything back to its defaults. Undo the changes you have made in options, undo the virtual host settings and any other apache changes you have made (let's stick with the basic for now), and undo anything else you may have changed.

PATH_SOCKS should point to /var/lib/zoneminder/sock
It works. Don't change this.

Nothing should live under /var/www. This is by design and is why the owner is root. Instead, web applications are aliased in from a subfolder under /usr/share. This is the current way of doing things. If you look under /usr/share/zoneminder you will the web files and that they ahve the proper permission.

Apache is the username you should look for when checking permissions on CentOS. www-data comes from the devian/ubuntu world and will not (should not) exist.

Also, make sure you don't have anything laying around from a previous attempt at installing zoneminder ....most especially if you tried to install from source previously.... you have to get rid of everything with a "make uninstall" first before installing an rpm package.

Once we get your system back to a known good state then let's get it working. After that, then let's slowly customize it (e.g. apache virtualhost) and verify every step along the way.
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/
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Start up problems on F20_64

Post by jHeron »

FWIW I also noticed that the installer is looking for the readme with the version number appended onto zoneminder, like this:

Code: Select all

Running transaction
  Installing : zoneminder-1.27.0-1.fc20.x86_64                              1/1 
Adding user apache to group video
Adding user apache to group dialout
/usr/share/doc/zoneminder-1.27.0/README.Fedora: No such file or directory
  Verifying  : zoneminder-1.27.0-1.fc20.x86_64                              1/1 

Installed:
  zoneminder.x86_64 0:1.27.0-1.fc20                                             

Complete!
I can see that the readme is there but its under just zoneminder.
This likely has nothing to do with my problem but I thought I would report it just in case... :|
Cheers,
Jon
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Start up problems on F20_64

Post by jHeron »

OK, thanks!
I have not changed anything in options, by default it had /tmp/zm for PATH_socks. Shall I change it to /var/lib/zoneminder/sock?
I have surly screwed this all up from previous attempts to install from source as well as trying to install the 1.25 RPM from the fedora repo (I just stumbled upon the users submission part of the forum yesterday where I saw your generous RPMS)...
FWIW I have always done a make uninstall or sudo yum remove action before starting with a new attempt...
So I guess at this point I will remove all packages and folders that are related that I can find and start over with a fresh install of your generously made RPM?
Thanks for your help and dedication!
Jon
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Start up problems on F20_64

Post by knight-of-ni »

jHeron wrote:OK, thanks!
I have not changed anything in options, by default it had /tmp/zm for PATH_socks. Shall I change it to /var/lib/zoneminder/sock?
I have surly screwed this all up from previous attempts to install from source as well as trying to install the 1.25 RPM from the fedora repo (I just stumbled upon the users submission part of the forum yesterday where I saw your generous RPMS)...
FWIW I have always done a make uninstall or sudo yum remove action before starting with a new attempt...
So I guess at this point I will remove all packages and folders that are related that I can find and start over with a fresh install of your generously made RPM?
Thanks for your help and dedication!
Jon
The fact that your PATH_SOCKS wasn't pointing to the value it should have been pointing to, I think reveals a vital clue as to what the overall problem may be.
Are you using existing database from another system or a previous non-rpm installation of zoneminder?
I think that is what the issue is.
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/
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Start up problems on F20_64

Post by jHeron »

No, though I have set up DB's from non RPM sources on this same machine I never got them working and just dropped and then re created the DB on subsequent attempts to get it running again... The current DB looks correct and is listed as 1.27, at least to my rookie eyes...
I tried changing the SOCKS path to what you said should be default and zm is now running!
Though I am still getting errors I feel I am getting closer now...

Code: Select all

2014-04-05 12:49:30.162090	zmwatch	2804	ERR	Memory map file '/dev/shm/zm.mmap.1' should have been 896 but was instead 0	zmwatch.pl	
2014-04-05 12:49:30.135310	zmwatch	2804	ERR	Memory map file '/dev/shm/zm.mmap.1' should have been 896 but was instead 0	zmwatch.pl	
2014-04-05 12:49:26.112240	zmdc	2745	ERR	'zma -m 1' exited abnormally, exit status 255	zmdc.pl	
2014-04-05 12:49:26.090468	undef	3012	ERR	Attempt to fetch integer value for ZM_OPT_ADAPTIVE_SKIP, actual type is boolean. Try running 'zmupdate.pl -f' to reload config.	/builddir/build/BUILD/ZoneMinder-1.27.0/src/zm_config.cpp	185
2014-04-05 12:49:26.028720	zmdc	3012	INF	'zma -m 1' started at 14/04/05 12:49:26	zmdc.pl	
2014-04-05 12:49:26.028710	zmdc	2745	INF	'zma -m 1' starting at 14/04/05 12:49:26, pid = 3012	zmdc.pl	
2014-04-05 12:49:26.003890	zmdc	2745	INF	Starting pending process, zma -m 1
Shall I still proceed to remove anything related that I can and start fresh or do you think I should start troubleshooting the now running zm?
Thanks for you support!
Cheers,
Jon
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Start up problems on F20_64

Post by jHeron »

Ok, I ran the zmupdate.pl -f as suggested in the log and it now seems to be running fine with no errors in the log!!
I am going to try to get a camera working now... Will post an update if I get it all going.
Thanks again!
Cheers,
Jon
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Start up problems on F20_64

Post by jHeron »

OK I got a camera setup and everything is green :)
I am having an issue with seeing the stream though:

Code: Select all

2014-04-05 13:30:04.162286	web_php	2902	ERR	socket_sendto( /var/lib/zoneminder/sock/zms-243717s.sock ) failed: No such file or directory	/usr/share/zoneminder/www/includes/functions.php
This sounds alot like an issue I had last year with f18 and 1.25. I think it was a permissions problem.
I am going to research it now...
Cheers,
Jon
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Start up problems on F20_64

Post by knight-of-ni »

Glad the system seems to be running.
The underlying issue here is that the system was not in a clean state at the time you chose to install the RPM.
However, if you continue to have issues, I would recommend you start over after making sure all zoneminder related files & databases have been purged. Then follow the installation steps in README.Fedora.

The most common reason for socket_sendto errors is an incorrect Apache config. The README has details on an an issue with overlapping scriptaliases that you should read if you have not already.
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/
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Start up problems on F20_64

Post by jHeron »

"Bring out yer dead.....Bring out yer dead...
I'm not dead yet... actually I'm feeling better..
Thunk!!"
:P
Well its recording events, I can edit the zone images and can browse the stills, just the live video is failing with the socket error mentioned above.
I read the readme and made the edits as suggested with no joy.
Here are my files if its of any use, I tried these and also where I comment out the allias in the httpd.conf file altogether.
httpd.conf zoneminder.conf

Code: Select all

Alias /zm "/usr/share/zoneminder/www"
<Directory "/usr/share/zoneminder/www">
    Options -Indexes +MultiViews +FollowSymLinks
    AllowOverride All
    <IfModule mod_authz_core.c>
       # Apache 2.4
       Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order deny,allow
        Allow from all
    </IfModule>
    # The code unfortunately uses short tags in many places
    php_value short_open_tag 1
</Directory>

ScriptAlias /cgi-bin/zm "/usr/libexec/zoneminder/cgi-bin"
<Directory "/usr/libexec/zoneminder/cgi-bin">
    AllowOverride All
    Options ExecCGI
    <IfModule mod_authz_core.c>
       # Apache 2.4
       Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order deny,allow
        Allow from all
    </IfModule>
</Directory>
I will keep plugging away...
Cheers,
Jon
Attachments
httpd.conf.zip
(11.5 KiB) Downloaded 467 times
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Start up problems on F20_64

Post by knight-of-ni »

Make sure PATH_ZMS = /cgi-bin/zm/nph-zms
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/
jHeron
Posts: 73
Joined: Sun Jun 16, 2013 5:06 pm

Re: Start up problems on F20_64

Post by jHeron »

I cant thank you enough!
Its working like a charm now, that was it.
The path that was in mine was /cgi-bin/nph-zms :shock:
Cheers,
Jon
Locked