Page 1 of 1

ZoneMinder 1.25.x can't start on Fedora Core 17 - Error 1045

Posted: Mon Oct 15, 2012 6:10 am
by Cubytus
Hello all,

I'm trying to get ZoneMinder to run on a Fedora Core 17. I updated everything in the computer, then proceeded on manually creating the database, as it seemes that ZoneMinder didn't create them automatically.

I created the user with this command:
mysql>use mysql;
mysql>CREATE USER 'zmuser' IDENTIFIED BY 'zmpass';
mysql>GRANT ALL ON zm.* TO 'zmuser'@'localhost';
I now have:

Code: Select all

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
| zm                 |
+--------------------+
5 rows in set (0.00 sec)
and:

Code: Select all

mysql> show grants for zmuser@localhost;
+--------------------------------------------------------+
| Grants for zmuser@localhost                            |
+--------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'zmuser'@'localhost'    |
| GRANT ALL PRIVILEGES ON `zm`.* TO 'zmuser'@'localhost' |
+--------------------------------------------------------+
2 rows in set (0.00 sec)
which, under my understanding, should allow ZoneMinder to run this config file (only shown is the relevant part):

Code: Select all

# ZoneMinder database hostname or ip address
ZM_DB_HOST=localhost

# ZoneMinder database name
ZM_DB_NAME=zm

# ZoneMinder database user
ZM_DB_USER=zmuser

# ZoneMinder database password
ZM_DB_PASS=zmpass
Still, ZoneMinder doesn't start: in the logs, I get

Code: Select all

leblanc zoneminder[7640]: ERROR 1045 (28000): Access denied for user 'zmuser'@'localhost' (using password: YES)
Oct 14 11:05:49 leblanc zoneminder[7640]: Starting ZoneMinder: DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password: YES) at /usr/share/perl5/vendor_perl/ZoneMinder/Config.pm line 89
Oct 14 11:05:49 leblanc zoneminder[7640]: Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/vendor_perl/ZoneMinder/Config.pm line 91.
Oct 14 11:05:49 leblanc zoneminder[7640]: BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/ZoneMinder/Config.pm line 100.
Oct 14 11:05:49 leblanc zoneminder[7640]: Compilation failed in require at /usr/share/perl5/vendor_perl/ZoneMinder.pm line 33.
Oct 14 11:05:49 leblanc zoneminder[7640]: BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/ZoneMinder.pm line 33.
Oct 14 11:05:49 leblanc zoneminder[7640]: Compilation failed in require at /usr/bin/zmpkg.pl line 37.
Oct 14 11:05:49 leblanc zoneminder[7640]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 37.
Oct 14 11:05:49 leblanc zoneminder[7640]: [FAILED]
as an answer to:

Code: Select all

# /etc/init.d/zoneminder start
Of course, the 127.0.0.1/zm address gives out a 403 error.

Ultimately, I would like to be able to configure ZoneMinder from the Web interface to send me an email with a small attachment and/or a SMS alert when movement is detected in either of 3 webcams.


What have I done wrong? Or what have I not understood? Any insight?

Re: ZoneMinder 1.25.x can't start on Fedora Core 17 - Error

Posted: Thu Oct 18, 2012 3:04 pm
by crayxt
I guess the key phrase in logs is "Can't call method "prepare_cached"".

try googling it, it throws out many similiar requests, also being with ZoneMinder.

Have you tried to temporary use the root account to connect to MySQL DB? Did it work?

Re: ZoneMinder 1.25.x can't start on Fedora Core 17 - Error

Posted: Sun Oct 21, 2012 7:41 pm
by Cubytus
I finally managed to get it started, following instructions in the wiki and also disabling SELinux (as written for Fedora 18 (Alpha). I'm still not sure disabling a security feature to be able to run an application is the right way to do it.

HOWEVER, even with httpd, mysqld and zoneminder services running, I end up with a 403 error when trying to access ZM's interface at. Even running Firefox as root doesn't help.

Since 1 issue = 1 topic, I opened another topic in this section.

Re: ZoneMinder 1.25.x can't start on Fedora Core 17 - Error

Posted: Sun Oct 21, 2012 8:26 pm
by bb99
Did you modify /etc/httpd/conf.d/zoneminder.conf ?

Re: ZoneMinder 1.25.x can't start on Fedora Core 17 - Error

Posted: Sun Oct 21, 2012 8:55 pm
by Cubytus
As written in the wiki... yes.

Still doesn't allow access from the web interface.