Re: ZoneMinder Console - Stopped - v1.28.1 (Solved - User error)

Forum for questions and support relating to the 1.28.x releases only.
Locked
Simpler
Posts: 77
Joined: Mon Nov 02, 2015 12:40 am

Re: ZoneMinder Console - Stopped - v1.28.1 (Solved - User error)

Post by Simpler »

I've recently installed ZoneMinder v1.28.1 on a Linux Mint 17.2 box using "The Easy Way":
http://www.zoneminder.com/wiki/index.ph ... e_easy_way

I previously had a LAMP server installed on this machine which is still running fine.

I didn't bother with the static IP section since I already set static IPs from my router.
I didn't bother with the "innodb_file_per_table" section since I already have a functioning MySQL database for other reasons.
I didn't bother with the "Cambozola" section since I use Chrome and/or Firefox (not Internet Explorer).

When I open the /zm/index.php URL, it shows the following at the top of the screen:

Code: Select all

ZoneMinder Console - Stopped - v1.28.1
even though the processes are running:

Code: Select all

user1@box410 ~ $ ps -ef | grep zm
www-data 14712 1 0 19:29 pts/0 00:00:00 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
www-data 14741 14712 13 19:29 pts/0 00:04:35 /usr/bin/zmc -m 1
www-data 14745 14712 0 19:29 pts/0 00:00:00 /usr/bin/perl -wT /usr/bin/zmfilter.pl
www-data 14752 14712 0 19:29 pts/0 00:00:00 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
www-data 14769 14712 0 19:29 pts/0 00:00:00 /usr/bin/perl -wT /usr/bin/zmwatch.pl
user1 15259 14322 0 20:03 pts/0 00:00:00 grep --colour=auto zm
user1@box410 ~ $
Even after I click "Stopped" and click "Apply" to "Start", the header never changes to "Running".

Also, when I add a new Monitor, the name is not clickable to view the camera. The text of the name is there, but it's not a hyperlink with an "onclick()".

BTW, I tried the same install of ZoneMinder on a new VM of Linux Mint 17.2 going through the same instructions and it works fine. I can't figure out what's different between the two. I've looked at the log files. The log file on the broken machine actually states that it is capturing video, but it's not.

Please help...
Last edited by Simpler on Mon Nov 09, 2015 4:27 am, edited 1 time in total.
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: ZoneMinder Console - Stopped - v1.28.1

Post by knight-of-ni »

Did you notice that the document you referred to is labelled as obsolete?
There is a link pointing you to the most current guide.
You should check that out in case there are any relevant differences.

ZoneMinder needs elevated permission the first time it is started to created critical folders. It doesn't have the permission to do that if you are trying to start if from the web console. You should try to start zoneminder, as a service, from the command line.
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/
Simpler
Posts: 77
Joined: Mon Nov 02, 2015 12:40 am

Re: ZoneMinder Console - Stopped - v1.28.1

Post by Simpler »

I did notice that the document was labeled as obsolete, but these are the instructions that I was pointed to specifically by another user who had it working successfully with the same camera that I have.

With that said, I've now compared the instructions at the following two URLs:
http://www.zoneminder.com/wiki/index.ph ... e_easy_way Obsolete
http://www.zoneminder.com/wiki/index.ph ... e_easy_way Current

I've only found the following differences:
- The current version doesn't install: software-properties-common python-software-properties
- The current version doesn't install: libvlc-dev libvlccore-dev vlc
- The current version uses a single symbolic link to the apache.conf file instead of the Ubuntu consistent way described in the obsolete version, but this is cosmetic.
- The current version enables CGI with "a2enmod cgi" (I did this step)

BTW, I'm using the Libvlc setting for my camera, so I need the vlc packages which were installed with the "Obsolete" instructions.


And I've started zoneminder the first time (with elevated permissions) using the following command:

Code: Select all

sudo service zoneminder start


I just tried purging zoneminder and reinstalling and received the following output which might be helpful:

Code: Select all

user1@box410 /etc/zm $ sudo apt-get install zoneminder
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  zoneminder
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,036 kB of archives.
After this operation, 8,963 kB of additional disk space will be used.
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Selecting previously unselected package zoneminder.
(Reading database ... 216544 files and directories currently installed.)
Preparing to unpack .../zoneminder_1.28.1-trusty-2_amd64.deb ...
Unpacking zoneminder (1.28.1-trusty-2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up zoneminder (1.28.1-trusty-2) ...
Stopping ZoneMinder: Zoneminder already stopped


Database already at version 1.28.1, update aborted.

ZoneMinder is stopped
invoke-rc.d: initscript zoneminder, action "status" failed.
Starting ZoneMinder: success

Processing triggers for ureadahead (0.100.0-16) ...
user1@box410 /etc/zm $ 
Are the one or more of the four "failed" messages the cause?
Any other suggestions?
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: ZoneMinder Console - Stopped - v1.28.1

Post by knight-of-ni »

The status shown on the web console is determined from the output of the Perl "zmdc.pl check" command.
https://github.com/ZoneMinder/ZoneMinde ... pl.in#L153

Browsing up a few lines up, you can see that zoneminder socket file is being checked to determine the status.
The path to your socket file is under Options. Make sure the path does not reside on a tmpfs filesystem. That can cause the symptoms you describe. You can check that with df.
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/
Simpler
Posts: 77
Joined: Mon Nov 02, 2015 12:40 am

Re: ZoneMinder Console - Stopped - v1.28.1

Post by Simpler »

knnniggett wrote:Make sure the path does not reside on a tmpfs filesystem.
You are correct.

Code: Select all

PATH_SOCKS=/var/run/zm
df shows:

Code: Select all

Filesystem     1K-blocks      Used Available Use% Mounted on
...
tmpfs             806016      1628    804388   1% /run
...
What is the best way to address this? Just change the PATH_SOCKS variable to point to some other disk location?
Any idea why it is set like this? I don't remember ever changing such a setting.

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

Re: ZoneMinder Console - Stopped - v1.28.1

Post by knight-of-ni »

I usually point PATH, SOCKS, and MAP to /dev/shm for performance.
You will have to either reboot or manually create the new subfolders with the right permissions after making this change.

Your distro is based off Ubuntu 14.04, but Ubuntu 14.04 does use not tmpfs ...your distro does use tmpfs, however. So that is one important difference between Ubuntu and Mint.
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/
Simpler
Posts: 77
Joined: Mon Nov 02, 2015 12:40 am

Re: ZoneMinder Console - Stopped - v1.28.1

Post by Simpler »

I set the following three variables in the Options screen and saved and rebooted (When you said PATH, I think you meant SWAP):

Code: Select all

PATH_MAP=/dev/shm	
PATH_SOCKS=/dev/shm
PATH_SWAP/dev/shm
But the problem(s) still exist. I ran the command from the command line and it says stopped, but the processes are running:

Code: Select all

user1@box410 ~ $ zmdc.pl check
stopped
user1@box410 ~ $ ps -ef | grep zm
www-data  3208     1  0 20:18 ?        00:00:00 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
www-data  3249  3208 22 20:18 ?        00:00:33 /usr/bin/zmc -m 1
www-data  3252  3208  0 20:18 ?        00:00:00 /usr/bin/perl -wT /usr/bin/zmfilter.pl
www-data  3260  3208  0 20:18 ?        00:00:00 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
www-data  3268  3208  0 20:18 ?        00:00:00 /usr/bin/perl -wT /usr/bin/zmwatch.pl
user1     3545  3530  0 20:21 pts/2    00:00:00 grep --colour=auto zm
I appreciate your help, but we (probably me) must be missing something.

(as a side note, my VM that is also running Linux Mint 17.2, has PATH_SOCKS set to /run/zm and /run is tmpfs and ZoneMinder runs correctly on the VM.)
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: ZoneMinder Console - Stopped - v1.28.1

Post by bbunge »

You should not have to change those paths. I suggest your issues may be caused by running a process & memory intensive OS in a VM. Get rid of mint and use the Ubuntu server version.

bb
Simpler
Posts: 77
Joined: Mon Nov 02, 2015 12:40 am

Re: ZoneMinder Console - Stopped - v1.28.1

Post by Simpler »

bbunge wrote: issues may be caused by running a process & memory intensive OS in a VM
I think you misread the posts. The machine having the problem is not a VM. I'm using the separate VM just for testing and the VM works fine with ZoneMinder. It's the desktop system that doesn't work.

I don't have a separate machine that I can install Ubuntu server on, so I have to get this running on the existing desktop that I have.

Thanks...
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: ZoneMinder Console - Stopped - v1.28.1

Post by bbunge »

OK, get rid of ZM again, remove the PPA and start over. make sure the zm database was dropped from MySQL and that you clean out any old directories. You do not need to do the recommended steps such as static IP address, innodb_file_per_table or cambozola. You may not be able to get libvlc working but ffmpeg will work. MAKE SURE YOU DO THE INSTALL FROM A TERMINAL! I have done the Ubuntu 14.04-ZM 1.28.1 install on MInt 17.2 with no issues. I just checked the WIKI and it is accurate except for the area to add sleep 15. The content is OK but the formatting is off a bit. Will get it fixed. As I said you may not get libvlc to work reliability.

bb
Simpler
Posts: 77
Joined: Mon Nov 02, 2015 12:40 am

Re: ZoneMinder Console - Stopped - v1.28.1 (Solved - User error)

Post by Simpler »

After uninstalling/reinstalling again... I finally discovered the source of the problem.

As part of my original LAMP installation, I had edited /etc/apache2/envvars from:

Code: Select all

export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
to

Code: Select all

export APACHE_RUN_USER=user1
export APACHE_RUN_GROUP=user1
in order to resolve a different problem that I had at the time.

Once I changed these two back to www-data and restarted apache2, Zoneminder now works properly.

I want to thank both of you for your patience and help. Your insight helped me find the source of the issue (even if it was self inflicted).

Thanks again...
Locked