Zoneminder1.30.2 on ubantu 16.04 will not start

Forum for questions and support relating to the 1.30.x releases only.
Locked
linuxnutt
Posts: 37
Joined: Fri Aug 12, 2016 6:06 am

Zoneminder1.30.2 on ubantu 16.04 will not start

Post by linuxnutt »

Following the steps in:
Ubuntu Server 16.04 64-bit with Zoneminder 1.30.2 the easy way, here https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way.

When I try to start zoneminder I get this error:
service zoneminder start
Job for zoneminder.service failed because the control process exited with error code. See "systemctl status zoneminder.service" and "journalctl -xe" for details.
*******************************
media ~ # systemctl status zoneminder.service
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2017-04-23 12:51:27 PDT; 58s ago
Process: 15081 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)

Apr 23 12:51:27 media zmpkg.pl[15081]: Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 129.
Apr 23 12:51:27 media zmpkg.pl[15081]: BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 129.
Apr 23 12:51:27 media zmpkg.pl[15081]: Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
Apr 23 12:51:27 media zmpkg.pl[15081]: BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Apr 23 12:51:27 media zmpkg.pl[15081]: Compilation failed in require at /usr/bin/zmpkg.pl line 48.
Apr 23 12:51:27 media zmpkg.pl[15081]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 48.
Apr 23 12:51:27 media systemd[1]: zoneminder.service: Control process exited, code=exited status=255
Apr 23 12:51:27 media systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
Apr 23 12:51:27 media systemd[1]: zoneminder.service: Unit entered failed state.
Apr 23 12:51:27 media systemd[1]: zoneminder.service: Failed with result 'exit-code'.
************************************
media ~ # journalctl -xe
Apr 23 13:25:35 media zmpkg.pl[15642]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 48.
Apr 23 13:25:35 media systemd[1]: zoneminder.service: Control process exited, code=exited status=255
Apr 23 13:25:35 media systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
-- Subject: Unit zoneminder.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit zoneminder.service has failed.
--
-- The result is failed.
Apr 23 13:25:35 media systemd[1]: zoneminder.service: Unit entered failed state.
Apr 23 13:25:35 media systemd[1]: zoneminder.service: Failed with result 'exit-code'.
Apr 23 13:39:01 media CRON[15732]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 23 13:39:01 media CRON[15733]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean)
Apr 23 13:39:01 media CRON[15732]: pam_unix(cron:session): session closed for user root
Apr 23 13:45:30 media systemd[1]: Started CUPS Scheduler.
-- Subject: Unit cups.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit cups.service has finished starting up.
--
-- The start-up result is done.

Something is wrong and I don't know what. It looks like zoneminder is not able to connect to the data base but I don't know why.
mysql is running:

media ~ # service mysql status
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2017-04-23 13:11:38 PDT; 1h 0min ago
Main PID: 15427 (mysqld)
CGroup: /system.slice/mysql.service
└─15427 /usr/sbin/mysqld
Apr 23 13:11:37 media systemd[1]: Starting MySQL Community Server...
Apr 23 13:11:38 media systemd[1]: Started MySQL Community Server.

connecting via the browser gives me this error:
Unable to connect to ZM db.SQLSTATE[HY000] [1045] Access denied for user 'zmuser'@'localhost' (using password: YES)

Any suggestion as how to fix this?

Thanks
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Zoneminder1.30.2 on ubantu 16.04 will not start

Post by rockedge »

zoneminder is unable to connect to the mysql database. There may not be a "zmuser" in mysql or incorrect password? Or some config has the wrong database authorization settings. At any rate, there is an issue with username and password for the mysql database.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Zoneminder1.30.2 on ubantu 16.04 will not start

Post by bbunge »

Did you make the required change to MySQL?

In the [mysqld] section add the following

sql_mode = NO_ENGINE_SUBSTITUTION
linuxnutt
Posts: 37
Joined: Fri Aug 12, 2016 6:06 am

Re: Zoneminder1.30.2 on ubantu 16.04 will not start

Post by linuxnutt »

I was able to discover my error after doing a new install. Anyway the only thing I did differently is after the new install I did not restore the /home directory from a my previous Mint Maya system with ZM 1.25 (this assumes I didn't foobar the Easyway ZM1.30.2. install in the first place). Apparently restoring the /home directories had something bad in there as the reason for the new rebuild was because the mysql database was hosed somehow with MySQL -Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) type errors among other errors, and I was not able to fix.
Locked