Appears started, but web page says stopped

Forum for questions and support relating to the 1.29.x releases only.
Post Reply
tkalfaoglu
Posts: 65
Joined: Wed Nov 22, 2006 6:19 am

Appears started, but web page says stopped

Post by tkalfaoglu » Thu Jul 28, 2016 6:26 am

This is an old installation; it has been working with no changes for months.
After a reboot, today the web console shows Stopped.

However it appears to be running..

Code: Select all

# service zoneminder status
Redirecting to /bin/systemctl status  zoneminder.service
● zoneminder.service - ZoneMinder CCTV recording and security system
   Loaded: loaded (/usr/lib/systemd/system/zoneminder.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2016-07-28 08:43:32 EEST; 41min ago
  Process: 10402 ExecStop=/usr/bin/zmpkg.pl stop (code=exited, status=0/SUCCESS)
  Process: 10438 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=0/SUCCESS)
 Main PID: 10453 (zmdc.pl)
   CGroup: /system.slice/zoneminder.service
           ├─10453 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
           ├─10486 /usr/bin/perl -wT /usr/bin/zmfilter.pl
           ├─10494 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
           └─10504 /usr/bin/perl -wT /usr/bin/zmwatch.pl

Jul 28 08:43:27 www.kalfaoglu.net  systemd[1]: Starting ZoneMinder CCTV recording and security system...
Jul 28 08:43:32 www.kalfaoglu.net systemd[1]: Started ZoneMinder CCTV recording and security system.
Jul 28 08:58:19 www.kalfaoglu.net systemd[1]: Started ZoneMinder CCTV recording and security system.
Jul 28 09:11:37 www.kalfaoglu.net systemd[1]: Started ZoneMinder CCTV recording and security system.
Jul 28 09:13:51 www.kalfaoglu.net systemd[1]: Started ZoneMinder CCTV recording and security system.
Neither /var/log/messages nor /var/log/zm/* show anything useful.

"service zoneminder restart"
seems to restart it.. But the web page stays the same, but it's clearly missing some components that should be running:

Code: Select all

# ps ax|grep zm
13087 ?        S      0:00 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
13113 ?        S      0:00 /usr/bin/perl -wT /usr/bin/zmfilter.pl
13121 ?        S      0:00 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
13131 ?        S      0:00 /usr/bin/perl -wT /usr/bin/zmwatch.pl
13143 pts/1    S+     0:00 grep --color=auto zm
What shall I do?
Thanks! -t

tkalfaoglu
Posts: 65
Joined: Wed Nov 22, 2006 6:19 am

Re: Appears started, but web page says stopped

Post by tkalfaoglu » Thu Jul 28, 2016 7:14 am

After I did an:
# /usr/bin/zmdc.pl stop
# /usr/bin/zmdc.pl startup
now it's worse:
# ps ax|grep zm
13397 pts/1 S 0:00 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
13472 pts/1 S+ 0:00 grep --color=auto zm
#

tkalfaoglu
Posts: 65
Joined: Wed Nov 22, 2006 6:19 am

Re: Appears started, but web page says stopped

Post by tkalfaoglu » Thu Jul 28, 2016 7:44 am

PS: There is NOTHING in the logs; even after enabling debug and setting it to the maximum level..

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

Re: Appears started, but web page says stopped

Post by knight-of-ni » Fri Jul 29, 2016 2:05 pm

The first thing I noticed was that you are trying to manage the status of ZoneMinder, on a system using systemd, with the old sys v init style of commands:

Code: Select all

service zoneminder restart
zmpkg.pl start
Don't do it that way. Instead, do it this way:

Code: Select all

systemctl restart zoneminder
The problem you are experiencing is a known issue. Unlike the legacy sys v init, systemd cares how zoneminder is stopped & started. If you manage the status of zoneminder w/o going through systemd, then you run into the problem of systemd & the zoneminder web console disagreeing on the actual status of zoneminder.

We've resolved the issue in newer versions of ZoneMinder which redirects all commands through systemd, but it still requires one to build ZoneMinder properly. Based on what you have shown in your logs, ZoneMinder is not redirecting through systemd. Hence the problem. So in order to figure out why, we need to know:
- version of zoneminder you are running
- what distro you are using
- exactly how you installed ZoneMinder
- Was there ever a previous version of zoneminder on your system.
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/

tkalfaoglu
Posts: 65
Joined: Wed Nov 22, 2006 6:19 am

Re: Appears started, but web page says stopped

Post by tkalfaoglu » Sat Jul 30, 2016 6:25 am

Thank you very much for your reply.
Here is how it went: systemctl restart zoneminder said it failed, upon examining the logs I found that it had upgraded itself to 1.30.
(I had tried the zmupgrade.pl two days ago after I experienced the problems; but it had said that the database was the same version as the code)
I ran zmupgrade.pl and it upgraded the database.
Then systemctl restart zoneminder completed successfully.
Now in the logs I see that it deleted lots of events (good).
On the web interface I see that it's in stopped state. these are running:
# ps ax|grep zm
24347 ? S 0:00 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
24375 ? S 0:00 /usr/bin/perl -wT /usr/bin/zmfilter.pl
24383 ? S 0:00 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
24391 ? S 0:00 /usr/bin/perl -wT /usr/bin/zmwatch.pl
24404 ? S 0:00 /usr/bin/perl -w /usr/bin/zmtelemetry.pl


I'm attempting to start it from the web interface..
It still says Stopped.
]# ps ax|grep zm
24347 ? S 0:00 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
24375 ? S 0:00 /usr/bin/perl -wT /usr/bin/zmfilter.pl
24383 ? S 0:00 /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
24391 ? S 0:00 /usr/bin/perl -wT /usr/bin/zmwatch.pl
24404 ? S 0:00 /usr/bin/perl -w /usr/bin/zmtelemetry.pl

After several minutes. The process list stayed the same, and the Stopped status as well.
I'm using Fedora 23:
Linux www.kalfaoglu.net 4.6.4-201.fc23.x86_64 #1 SMP Tue Jul 12 11:43:59 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Yes, I had attempted from source after the distro. Perhaps there is a conflict there; system upgraded what I had installed from source..
Give me a few hours; I'll delete the RPM installed upgrade and recompile from source - or failing that (I remember it was very difficult), I'll re-install from RPM after a cleanup..
Many thanks,
-turgut

tkalfaoglu
Posts: 65
Joined: Wed Nov 22, 2006 6:19 am

Re: Appears started, but web page says stopped

Post by tkalfaoglu » Sat Jul 30, 2016 7:43 am

UPDATE: I had source-installed stuff from an older installation, and after Fedora "upgraded" zoneminder, some remained, hence the troubles.
I did a fresh install; removed everything with dnf uninstall zoneminder, and then searching the disk for remains. Dropped the database,
and reinstalled from RPM.
I had backed up the database, and I was able to restore the two tables Zones and Monitors, so I could get the monitors and the zones back; which are the hardest to re-create with 9 monitors.

Many thanks for your help,
-turgut

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

Re: Appears started, but web page says stopped

Post by knight-of-ni » Sat Jul 30, 2016 12:51 pm

tkalfaoglu wrote:UPDATE: I had source-installed stuff from an older installation, and after Fedora "upgraded" zoneminder, some remained, hence the troubles.
I did a fresh install; removed everything with dnf uninstall zoneminder, and then searching the disk for remains. Dropped the database,
and reinstalled from RPM.
Yes, switching from-source -> from-package is problematic. It's one of many reasons why I recommend everyone not ever install from-source. Even when I'm doing development work, I always build what I'm working on into a package before I deploy it. In any case, you did the right thing by manually purging everything and starting over.

One thing that is easily overlooked.... Since you are on Fedora, make sure you delete the old zoneminder sys v init script under the init.d folder. The only start/stop script you should have is zoneminder.service under your systemd folder. It will cause problems if you have the old script lying around.

Note that upgrading to Fedora 24 should be a smooth transition. I've got ZoneMinder packages for F24 on zmrepo. As usual, if I don't see any reports in the forums, I assume no news is good news that everything is working.
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/

tkalfaoglu
Posts: 65
Joined: Wed Nov 22, 2006 6:19 am

Re: Appears started, but web page says stopped

Post by tkalfaoglu » Sat Jul 30, 2016 2:23 pm

Indeed - after I cleaned up my system and installed zoneminder from RPM, I had nothing else to do - not even the stuff in the README.
Regards, -turgut

mh00
Posts: 1
Joined: Mon Mar 06, 2017 8:19 am

Re: Appears started, but web page says stopped

Post by mh00 » Mon Mar 06, 2017 8:25 am

I seem to have this same problem. I am running Fedora 25, and installing zoneminder from zmrepo (zoneminder-1.30.0-5.fc25.i686). I did a fresh install, but I've kept my old database and settings. I have been using zoneminder in fedora on this system for many years, always installed by rpm, but recently updated from 24 to 25, where zoneminder in fedora is broken (and now removed). So I'm trying to switch over to zmrepo.

In my logs, I See this message:

Code: Select all

pkexec[15361]: apache: Executing command [USER=root] [TTY=unknown] [CWD=/usr/shae/zoneminder/www] [COMMAND=/usr/bin/perl /usr/bin/zmsystemctl.pl start]
This makes me think the web interface is not starting zoneminder through systemd. I have the same problem as stated above: zoneminder is recording new events, but the web interface shows it as stopped, and won't start it.

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

Re: Appears started, but web page says stopped

Post by knight-of-ni » Mon Mar 06, 2017 1:33 pm

mh00 wrote:I seem to have this same problem. I am running Fedora 25, and installing zoneminder from zmrepo (zoneminder-1.30.0-5.fc25.i686). I did a fresh install, but I've kept my old database and settings. I have been using zoneminder in fedora on this system for many years, always installed by rpm, but recently updated from 24 to 25, where zoneminder in fedora is broken (and now removed). So I'm trying to switch over to zmrepo.
Well, technically no, it isn't broken. Intentionally moved would be a better description.

ZoneMinder does still live in Fedora 25:
https://apps.fedoraproject.org/packages/zoneminder

Those of us involved with packaging zoneminder agreed that zoneminder does not have any business living in Fedora due to its ffmpge/vlc/h264 dependencies. I have an open bug report in RPMFusion to have it moved over there, but that's long term.... for now just use zmrepo.
mh00 wrote: In my logs, I See this message:

Code: Select all

pkexec[15361]: apache: Executing command [USER=root] [TTY=unknown] [CWD=/usr/shae/zoneminder/www] [COMMAND=/usr/bin/perl /usr/bin/zmsystemctl.pl start]
Working as intended. That's a normal event. If you look at the contents of zmsystemctl.pl you will see it calls systemctl.
mh00 wrote: CWD=/usr/shae/zoneminder/www
^ Is that a typo, or is your system really looking under /usr/shae/zoneminder/www, rather than /usr/share/zoneminder/www ?

If you are still having issues, please describe your symptoms in greater detail:
- make sure any zoneminder sys v init script under init.d are gone
- after reboot start zoenminder from the command line (it should do this automatically unless you disabled the service), then verify the status from the web console
- stop zoneminder from the command line, now start it from the web console and verify the status from the command line
- With zoneminder running, restart it from the web console, then verify the status from the command line

In each case, if undesired results occur, then show us your entire logs. Do not cherry pick single events... show us everything from the moment zoneminder was started.
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: Appears started, but web page says stopped

Post by knight-of-ni » Mon Mar 06, 2017 1:33 pm

mh00 wrote:I seem to have this same problem. I am running Fedora 25, and installing zoneminder from zmrepo (zoneminder-1.30.0-5.fc25.i686). I did a fresh install, but I've kept my old database and settings. I have been using zoneminder in fedora on this system for many years, always installed by rpm, but recently updated from 24 to 25, where zoneminder in fedora is broken (and now removed). So I'm trying to switch over to zmrepo.
Well, technically no, it isn't broken. Intentionally moved would be a better description.

ZoneMinder does still live in Fedora 25:
https://apps.fedoraproject.org/packages/zoneminder

Those of us involved with packaging zoneminder agreed that zoneminder does not have any business living in future versions of Fedora due to its ffmpge/vlc/h264 dependencies. I have an open bug report in RPMFusion to have it moved over there, but that's long term.... for now just use zmrepo.
mh00 wrote: In my logs, I See this message:

Code: Select all

pkexec[15361]: apache: Executing command [USER=root] [TTY=unknown] [CWD=/usr/shae/zoneminder/www] [COMMAND=/usr/bin/perl /usr/bin/zmsystemctl.pl start]
That's a normal event. If you look at the contents of zmsystemctl.pl you will see it calls systemctl.
mh00 wrote: CWD=/usr/shae/zoneminder/www
^ Is that a typo, or is your system really looking under /usr/shae/zoneminder/www, rather than /usr/share/zoneminder/www ?

If you are still having issues, please describe exactly how to reproduce the issue:
- make sure any zoneminder sys v init script under init.d are gone
- after reboot start zoenminder from the command line (it should do this automatically unless you disabled the service), then verify the status from the web console
- stop zoneminder from the command line, now start it from the web console and verify the status from the command line
- With zoneminder running, restart it from the web console, then verify the status from the command line

In each case, if undesired results occur, then show us your entire logs. Do not cherry pick single events... show us everything from the moment zoneminder was started.
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/

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests