Page 1 of 1

[SOLVED] Arch - Can't connect to db at ....

Posted: Mon Feb 09, 2015 3:18 pm
by hedeon
Hi

I really like to try ZoneMinder, but I suck in understanding SQL, PHP, Perl, Apache etc...
I am stuck no starting the service.
httpd starts fine, then when I go with zoneminder, I get:
systemctl start zoneminder.service
Job for zoneminder.service failed. See "systemctl status zoneminder.service" and "journalctl -xe" for details.

Code: Select all

 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: failed (Result: exit-code) since Mon 2015-02-09 14:56:30 GMT; 12s ago
  Process: 597 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)

Feb 09 14:56:30 ZoneMinderServer zmpkg.pl[597]: Can't connect to db at /usr/lib/perl5/ZoneMinder/Config.pm line 100.
Feb 09 14:56:30 ZoneMinderServer zmpkg.pl[597]: BEGIN failed--compilation aborted at /usr/lib/perl5/ZoneMinder/Config.pm line 100.
Feb 09 14:56:30 ZoneMinderServer zmpkg.pl[597]: Compilation failed in require at /usr/lib/perl5/ZoneMinder.pm line 33.
Feb 09 14:56:30 ZoneMinderServer zmpkg.pl[597]: BEGIN failed--compilation aborted at /usr/lib/perl5/ZoneMinder.pm line 33.
Feb 09 14:56:30 ZoneMinderServer zmpkg.pl[597]: Compilation failed in require at /usr/bin/zmpkg.pl line 37.
Feb 09 14:56:30 ZoneMinderServer zmpkg.pl[597]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 37.
Feb 09 14:56:30 ZoneMinderServer systemd[1]: zoneminder.service: control process exited, code=exited status=255
Feb 09 14:56:30 ZoneMinderServer systemd[1]: Failed to start ZoneMinder CCTV recording and security system.
Feb 09 14:56:30 ZoneMinderServer systemd[1]: Unit zoneminder.service entered failed state.
Feb 09 14:56:30 ZoneMinderServer systemd[1]: zoneminder.service failed.

Any one has an idea?
Thanks for all the help

Re: Arch - Can't connect to db at ....

Posted: Mon Feb 09, 2015 9:44 pm
by christophe_y2k
try to rebuild all perl module with perl cleaner
# perl-cleaner reallyall
after reinstall zoneminder

Re: Arch - Can't connect to db at ....

Posted: Tue Feb 10, 2015 1:43 am
by knight-of-ni
That error message simply means zoneminder can't connect to your database.
It does not indicate that there is a problem with your Perl.

Standard dB troubleshooting applies here:
Is mysql running?
Did you create the zm database?
Is the the zonminder user account created and does it have the right permissions?
Are the database user account credentials correctly entered into zm.conf?

The following README is for Fedora, but the steps that show how to set up the database apply:
https://github.com/ZoneMinder/ZoneMinde ... DME.Fedora

Re: Arch - Can't connect to db at ....

Posted: Tue Feb 10, 2015 9:55 am
by hedeon
knnniggett wrote:That error message simply means zoneminder can't connect to your database.
It does not indicate that there is a problem with your Perl.

Standard dB troubleshooting applies here:
Is mysql running?
Did you create the zm database?
Is the the zonminder user account created and does it have the right permissions?
Are the database user account credentials correctly entered into zm.conf?

The following README is for Fedora, but the steps that show how to set up the database apply:
Thanks for replays. As I said, I have completely 0 understanding of things like php, sql, etc... (maybe it is a time to change that?)
I have followed arch guide (can't post links) and there is nothing about setting up MySQL. I'll give a go the thread for fedora, and probably will comeback here if this won't help.

Thanks

Re: Arch - Can't connect to db at ....

Posted: Tue Feb 10, 2015 1:14 pm
by hedeon
Well, Setting up mySQL was the thing! Thank you very much, I will mark thread as solved.
However I have different problem now and was hoping that I could get pushed in to right direction once again. While trying to connect to ZM through browser, I am getting

Access Forbidden Error 403

I am trying to access it from different machine as local one has no GUI/monitor/keyboard

Re: [SOLVED] Arch - Can't connect to db at ....

Posted: Tue Feb 10, 2015 1:30 pm
by knight-of-ni
That is a problem with your Apache config.
You need to look for "Allow from" and/or "Deny from" statements in your config and adjust them accordingly.
I'm not familiar with Arch so I can't be more preceise than that.

Re: [SOLVED] Arch - Can't connect to db at ....

Posted: Tue Feb 10, 2015 3:29 pm
by hedeon
knnniggett wrote:That is a problem with your Apache config.
You need to look for "Allow from" and/or "Deny from" statements in your config and adjust them accordingly.
I'm not familiar with Arch so I can't be more preceise than that.
Cheers, Thank you a lot :)