Installing zoneminder

I’m trying to install zoneminder based upon the rpm’s available on http://www.liquid-co.de/pub/suse/repositories/12.1/

When I run rczm start, I get the following error:

redirecting to systemctl start zm
Job for zm.service failed. See ‘systemctl status zm.service’ and ‘journalctl -n’ for details.

zm.service - ZoneMinder Video Surveillance System
Loaded: loaded (/usr/lib/systemd/system/zm.service; disabled)
Active: failed (Result: resources) since Wed, 2014-06-04 21:42:16 CEST; 7min ago
Process: 2667 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/zm.service

Jun 04 21:42:15 zzzzzz.xxxxxxx sudo[2712]: root : TTY=unknown ; PWD=/srv/www/htdocs/zm ; USER=wwwrun ; COMMAND=/usr/bin/zmdc.pl start zmfilter.pl
Jun 04 21:42:15 zzzzzz.xxxxxxx sudo[2712]: pam_unix(sudo:session): session opened for user wwwrun by (uid=0)
Jun 04 21:42:15 zzzzzz.xxxxxxx sudo[2720]: root : TTY=unknown ; PWD=/srv/www/htdocs/zm ; USER=wwwrun ; COMMAND=/usr/bin/zmdc.pl start zmaudit.pl -c
Jun 04 21:42:15 zzzzzz.xxxxxxx sudo[2720]: pam_unix(sudo:session): session opened for user wwwrun by (uid=0)
Jun 04 21:42:15 zzzzzz.xxxxxxx sudo[2730]: root : TTY=unknown ; PWD=/srv/www/htdocs/zm ; USER=wwwrun ; COMMAND=/usr/bin/zmdc.pl start zmwatch.pl
Jun 04 21:42:15 zzzzzz.xxxxxxx sudo[2730]: pam_unix(sudo:session): session opened for user wwwrun by (uid=0)
Jun 04 21:42:15 zzzzzz.xxxxxxx sudo[2744]: root : TTY=unknown ; PWD=/srv/www/htdocs/zm ; USER=wwwrun ; COMMAND=/usr/bin/zmdc.pl start zmupdate.pl -c
Jun 04 21:42:15 zzzzzz.xxxxxxx sudo[2744]: pam_unix(sudo:session): session opened for user wwwrun by (uid=0)
Jun 04 21:42:16 zzzzzz.xxxxxxx systemd[1]: Failed to start ZoneMinder Video Surveillance System.
Jun 04 21:42:16 zzzzzz.xxxxxxx systemd[1]: Unit zm.service entered failed state

What could be the issue?

Tx - Ivan

On 2014-06-04 21:56, eulaersivan wrote:
>
> I’m trying to install zoneminder based upon the rpm’s available on
> http://www.liquid-co.de/pub/suse/repositories/12.1/

But you probably can not install a 12.1 service into 13.1, the later
uses systemd. And probably more issues.

> When I run rczm start, I get the following error:
>
> redirecting to systemctl start zm
> Job for zm.service failed. See ‘systemctl status zm.service’ and
> ‘journalctl -n’ for details.

A comment: when pasting computer commands and such, please use a CODE
BLOCK, so that the forum software doesn’t do silly things like
converting URLS to tiny urls, parenthesis into smileys, or otherwise
hide or alter the commands you entered. You get them by clicking on the
‘#’ button in the forum editor. See photo


> Jun 04 21:42:16 zzzzzz.xxxxxxx systemd[1]: Failed to start ZoneMinder Video Surveillance System.
> Jun 04 21:42:16 zzzzzz.xxxxxxx systemd[1]: Unit zm.service entered failed state

The actual reason is not there.

Did you “See ‘systemctl status zm.service’ and ‘journalctl -n’ for
details”, as the output said?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I too have had problems, and I wonder if the OP is getting that far!

My system is 13.1 (x64) and I’ve tried both the ZoneMinder RPMS from the opensuse repo, and the ZoneMinder-MP packages.

My first problem was I tried this ages ago, it didn’t work, I got side-tracked and am then coming back to it months later. This machine has also been upgraded since 11.x vintage, and I had a previous configuration of apache that was adapted from an old redhat instance of a site.

Following http://www.zoneminder.com/wiki/index.php/Installing_using_ZoneMinder_RPMs_for_SuSE the sequence seems to be

1 install zoneminder packages & dependencies
2 start mysql
3 start apache
4 configure mysql running instance
5 initialise zoneminder
6 configure zoneminder

I first got stuck at 2, I think the previous mysql install was broken somehow. I did a ‘zypper in --force mysql-community-server’ and that allowed ‘systemctl start mysql.service’ to then work.

Now I’m stuck at 3.

‘systemctl start apache2.service’ fails, using ‘systemctl status apache2.service’ shows:

Jun 05 16:36:26 chunk start_apache2[30692]: AH00526: Syntax error on line 3 of /etc/apache2/conf.d/zm.conf:Jun 05 16:36:26 chunk start_apache2[30692]: Invalid command 'php_admin_flag', perhaps misspelled or defined by a modu...ration
Jun 05 16:36:26 chunk systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Jun 05 16:36:27 chunk start_apache2[30710]: AH00526: Syntax error on line 3 of /etc/apache2/conf.d/zm.conf:
Jun 05 16:36:27 chunk start_apache2[30710]: Invalid command 'php_admin_flag', perhaps misspelled or defined by a modu...ration
Jun 05 16:36:27 chunk systemd[1]: apache2.service: control process exited, code=exited status=1
Jun 05 16:36:27 chunk systemd[1]: Failed to start The Apache Webserver.
Jun 05 16:36:27 chunk systemd[1]: Unit apache2.service entered failed state.

but I reinstalled apache2-mod_php5-5.4.20-4.1.x86_64 just yesterday.

opensuse and packman versions of zm.conf are the same. I don’t know anything about php, so the apache dependencies are a bit of mystery and are next to be investigated.

Daniel

1 install zoneminder packages & dependencies
2 start mysql
3 start apache
4 configure mysql running instance
5 initialise zoneminder
6 configure zoneminder

My system is running OpenSuse 12.3 command line based and I’ve used the rpm’s available http://www.liquid-co.de/pub/suse/repositories/12.3/ .
I’ve gone through all these steps up till step 6. Zoneminder is installed, mysql is started, apache is started, mysql is a running instance and zoneminder is initialised. The zoneminder tables are created in mysql and using the zoneminder account and password available in /etc/zm.conf I can connect to mysql and the appropriate tables.

Did you “See ‘systemctl status zm.service’ and ‘journalctl -n’ for
details”, as the output said?

Running “rczm start” provides the following output


myserver:~ # rczm start
redirecting to systemctl  start zm
Job for zm.service failed. See 'systemctl status zm.service' and 'journalctl -n' for details.

myserver:~ # systemctl status zm.service
zm.service - ZoneMinder Video Surveillance System
      Loaded: loaded (/usr/lib/systemd/system/zm.service; disabled)
      Active: failed (Result: exit-code) since Sat, 2014-06-07 06:58:27 CEST; 8s ago
     Process: 12798 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/zm.service

Jun 07 06:58:26 myserver.mydomain.com systemd[1]: Starting ZoneMinder Video Surveillance System...
Jun 07 06:58:27 myserver.mydomain.com zmpkg[12798]: INF [Command: start]
Jun 07 06:58:27 myserver.mydomain.com sudo[12804]: root : TTY=unknown ; PWD=/srv/www/htdocs/zm ; USER=wwwrun ; COMMAND=/bin/true
Jun 07 06:58:27 myserver.mydomain.com sudo[12804]: pam_unix(sudo:session): session opened for user wwwrun by (uid=0)
Jun 07 06:58:27 myserver.mydomain.com sudo[12807]: root : TTY=unknown ; PWD=/srv/www/htdocs/zm ; USER=wwwrun ; COMMAND=/usr/bin/zmdc.pl check
Jun 07 06:58:27 myserver.mydomain.com sudo[12807]: pam_unix(sudo:session): session opened for user wwwrun by (uid=0)
Jun 07 06:58:27 myserver.mydomain.com systemd[1]: Failed to start ZoneMinder Video Surveillance System.
Jun 07 06:58:27 myserver.mydomain.com systemd[1]: Unit zm.service entered failed state

myserver:~ # journalctl -n
-- Logs begin at Thu, 2014-06-05 08:52:45 CEST, end at Sat, 2014-06-07 07:01:35 CEST. --
Jun 07 07:01:35 myserver.mydomain.com zmpkg[13019]: INF [Command: start]
Jun 07 07:01:35 myserver.mydomain.com sudo[13025]: root : TTY=unknown ; PWD=/srv/www/htdocs/zm ; USER=wwwrun ; COMMAND=/bin/true
Jun 07 07:01:35 myserver.mydomain.com sudo[13025]: pam_unix(sudo:session): session opened for user wwwrun by (uid=0)
Jun 07 07:01:35 myserver.mydomain.com sudo[13025]: pam_unix(sudo:session): session closed for user wwwrun
Jun 07 07:01:35 myserver.mydomain.com sudo[13028]: root : TTY=unknown ; PWD=/srv/www/htdocs/zm ; USER=wwwrun ; COMMAND=/usr/bin/zmdc.pl check
Jun 07 07:01:35 myserver.mydomain.com sudo[13028]: pam_unix(sudo:session): session opened for user wwwrun by (uid=0)
Jun 07 07:01:35 myserver.mydomain.com sudo[13028]: pam_unix(sudo:session): session closed for user wwwrun
Jun 07 07:01:35 myserver.mydomain.com systemd[1]: zm.service: control process exited, code=exited status=1
Jun 07 07:01:35 myserver.mydomain.com systemd[1]: Failed to start ZoneMinder Video Surveillance System.
Jun 07 07:01:35 myserver.mydomain.com systemd[1]: Unit zm.service entered failed state

However …


myserver:/etc/init.d # /usr/bin/perl -T /usr/bin/zmpkg.pl status
running

When I go to http://myserver/zm I get a running webpage (but not yet a camera view). So is this correctly installed, or not?

Any help is much appreciated !!

Ivan

According to what you posted, it should not be surprising that you can see a webpage but not a camera view…
The error describes an authentication issue running zoneminder but not a problem running your webserver (my guess would be apache).

Where did you install zoneminder from and what documentation did you follow to install and configure?
ie. Did you install from source or an rpm package, and from what repository? My guess is that it’s a package because it looks like a systemd Unit file was created and configured, but somewhere there is an error configuring permissions.

If you know the package name, you can post the results of the following which describes where the package is from, its version and more.

zypper info* packagename  * 

TSU

On 2014-06-07 09:06, tsu2 wrote:
> Did you install from source or an rpm package, and from what
> repository?

He posted the repository link already :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-06-07 07:26, eulaersivan wrote:


>   myserver:~ # systemctl status zm.service
>   zm.service - ZoneMinder Video Surveillance System
>   Loaded: loaded (/usr/lib/systemd/system/zm.service; disabled)
>   Active: failed (Result: exit-code) since Sat, 2014-06-07 06:58:27 CEST; 8s ago
>   Process: 12798 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=1/FAILURE)
>   CGroup: name=systemd:/system/zm.service

I think that the most important info is there, that the program
“/usr/bin/zmpkg.pl” existed with code “1”. But I don’t know what that
means, there is no textual info.

As a result, zm.service fails.

I wonder if there is more information in syslog (/var/log/messages), or
if zoneminder keeps its own log file, so you will have to read its
documentation, or wait till somebody appears who has used that program.

I would try “ls -ltr /var/log” to locate which are the last modified log
files, and have a look at all of those, to see if anyone pertains to zm.
Of course, just after attempting to start it.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Did you read and follow the official zoneminder documentation?
http://www.zoneminder.com/wiki/index.php/Installing_using_ZoneMinder_RPMs_for_SuSE

As I described, your error log clearly describes a PAM (Pluggable Authentication Module) error which means that some security context is incorrect. Maybe your MySQL credentials aren’t setup properly. Maybe your app itself is supposed to be run only manually when you are logged in with an account with sufficient permissions like root, I don’t know enough about the app to know how it is designed to work.

But, in general when an app implements PAM, its security is integrated with another security database somewhere… It might be the system’s own security, it might be network security, it might be something else.

TSU

Hi! I installed Zoneminder yesterday on an openSUSE 12.3 without any problems, today, same procedure (same WIKI-page) via YAsT on an openSUSE 13.1 x64, I end up with the very same error, system does not start the Apache…

Did you succeed in resolving the issue?

Rasputin

Jun 14 15:18:20 linux-0lny.site systemd[1]: Starting The Apache Webserver…
Jun 14 15:18:20 linux-0lny.site start_apache2[2851]: AH00526: Syntax error on line 3 of /etc/apache2/conf.d/zm.conf:
Jun 14 15:18:20 linux-0lny.site start_apache2[2851]: Invalid command ‘php_admin_flag’, perhaps misspelled or defined by a module not included in the server configuration
Jun 14 15:18:20 linux-0lny.site systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Jun 14 15:18:20 linux-0lny.site start_apache2[2870]: AH00526: Syntax error on line 3 of /etc/apache2/conf.d/zm.conf:
Jun 14 15:18:20 linux-0lny.site start_apache2[2870]: Invalid command ‘php_admin_flag’, perhaps misspelled or defined by a module not included in the server configuration
Jun 14 15:18:20 linux-0lny.site systemd[1]: apache2.service: control process exited, code=exited status=1
Jun 14 15:18:20 linux-0lny.site systemd[1]: Failed to start The Apache Webserver. Jun 14 15:18:20 linux-0lny.site systemd[1]: Unit apache2.service entered failed state.

Your reported error is different.
You should inspect the specific error and research why the error exists… ie. Is it a command which no longer is supported with the current version of Apache? Oftentimes a command is simply changed in a new app version, can it be modified? Is the command simply incorrect?

You should post back what your result is, whether you found resolution or not and if you found a solution what it is.
If you’re stumped and we can’t resolve with more information you can report a bug for an upstream maintainer to take a look at.

The OP should take a look at your post an verify it isn’t info he missed. If still different (as I expect at this point) he has to consider other possibilities.

TSU

Hi Rasputin,

Sadly I got bogged down and went back to real work :-/

I also got bitten as when re-installing the zoneminder RPM it triggered a write to /var/run/nologin and locked me out of the machine for a few days until I could get back to the console >:(. That was another episode of tail chasing, before I realised what had caused it. systemd/nologin seems to be an issue that affects many distros.

I also realised I made a mistake in my original description, I was using the same RPM packages from monex that the OP was (I had missed the repo subscription in zypper). I think the php_admin_flag is specific to earlier versions of apache/php5 modules and so the pre-built RPM is incompatible with 13.1 x64.

I was also unsure of the correct file ownership/group for /srv/www/htdocs/zm, it seemed sensible for wwwrun:www but think they defaulted to root:root.

Daniel

test for reply, otherwise it doesn’t work… strange

I’m in dozends of forumsens, but this software here is nightmare… BOT

The command line resulting in the error when starting Apache is:

“php_admin_flag short_open_tag On”

I simply commented it out and Apache apparently started without problems.

However, I get an Error 403 when trying to access localhost/zm

No access rights or index file (there is an index.php in /srv/www/htdocs/zm as in the other installations of zm I have)…

Really strange…

A FYI
I will be opening up a thread on the specific error I’m running into, but following up on the content of this thread…
I am running the private RPM Monex package(v 1.27.0) at
https://build.opensuse.org/package/show?project=home%3AMonex%3Astable&package=ZoneMinder

  • I also found that simply commenting out line 3 in /etc/apache2/conf.d/zm.conf resolves the "Invalid command ‘php_admin_flag’ " error. Based on my research, this command was required when PHP was loaded as an external module in <=PHP3. That’s how old the code is…

But, this RPM package sets up external MySQL authentication without configuring in Apache
I’ve posted this issue in a separate Forum thread
https://forums.opensuse.org/showthread.php/499556-Zoneminder-install-using-Monex-private-repo-package-from-OBS-MySQL-authentication-error?p=2653826#post2653826

TSU

Hi,
I have this same problem here.

linux-5kek:~ # systemctl status apache2.service
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: failed (Result: exit-code) since Fri 2014-10-10 21:44:46 EEST; 24min ago
  Process: 1520 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 875 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 875 (code=exited, status=1/FAILURE)
   CGroup: /system.slice/apache2.service

Oct 10 21:44:44 linux-5kek start_apache2[875]: AH00526: Syntax error on line 5 of /etc/apache2/conf.d/zm.conf:
Oct 10 21:44:44 linux-5kek start_apache2[875]: Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server ...iguration
Oct 10 21:44:44 linux-5kek systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Oct 10 21:44:46 linux-5kek start_apache2[1520]: AH00526: Syntax error on line 5 of /etc/apache2/conf.d/zm.conf:
Oct 10 21:44:46 linux-5kek start_apache2[1520]: Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server...iguration
Oct 10 21:44:46 linux-5kek systemd[1]: apache2.service: control process exited, code=exited status=1
Oct 10 21:44:46 linux-5kek systemd[1]: Failed to start The Apache Webserver.
Oct 10 21:44:46 linux-5kek systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

and

linux-5kek:~ # systemctl status zm.service
zm.service - ZoneMinder Video Surveillance System
   Loaded: loaded (/usr/lib/systemd/system/zm.service; disabled)
   Active: inactive (dead)

after reading this last post,

I noticed

So, I edited /etc/sysconfig/apache2 and on line 109 I added php5 among the others (as adviced in /usr/share/doc/packages/php5/README.SUSE). Saved and restarted apache (rcapache2 restart). After started zm (systemctl start zm.service)
Now zoneminder works fine!

linux-5kek:~ # systemctl status apache2.service
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: active (running) since Fri 2014-10-10 22:22:43 EEST; 6s ago
  Process: 1520 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
 Main PID: 5855 (httpd2-prefork)
   Status: "Processing requests..."
   CGroup: /system.slice/apache2.service
           ├─5855 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
           ├─5872 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
           ├─5873 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
           ├─5874 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
           ├─5875 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
           └─5877 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start

Oct 10 22:22:43 linux-5kek systemd[1]: Started The Apache Webserver.
linux-5kek:~ # systemctl start zm.service

A really big THANK YOU fburzler, from my heart.