zoneminder won't start error about ip address

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
jamby
Posts: 11
Joined: Tue Jan 08, 2013 6:30 pm

zoneminder won't start error about ip address

Post by jamby »

Hi
Save an old man, I am trying to set up zoneminder on a centos 7 desktop computer. Starting by systemctl start zoneminder.service begats
● zoneminder.service - ZoneMinder CCTV recording and security system
Loaded: loaded (/usr/lib/systemd/system/zoneminder.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/zoneminder.service.d
└─zm-httpd.conf
Active: failed (Result: exit-code) since Wed 2019-12-11 18:07:40 PST; 2s ago
Process: 20958 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)

Dec 11 18:07:40 ace.light zmpkg.pl[20958]: DBI connect('database=zm;host=192.168.2.11','zmuser',...) failed: Host '192.168.2.70' is not allowed to connect to this MariaDB server at /usr/share/perl5/vendor_perl/ZoneMinder/Config.pm line 113.
Dec 11 18:07:40 ace.light zmpkg.pl[20958]: Can't connect to db at /usr/share/perl5/vendor_perl/ZoneMinder/Config.pm line 166.
Dec 11 18:07:40 ace.light zmpkg.pl[20958]: BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/ZoneMinder/Config.pm line 166.
Dec 11 18:07:40 ace.light zmpkg.pl[20958]: Compilation failed in require at /usr/share/perl5/vendor_perl/ZoneMinder.pm line 33.
Dec 11 18:07:40 ace.light zmpkg.pl[20958]: BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/ZoneMinder.pm line 33.
Dec 11 18:07:40 ace.light zmpkg.pl[20958]: Compilation failed in require at /usr/bin/zmpkg.pl line 34.
Dec 11 18:07:40 ace.light systemd[1]: zoneminder.service: control process exited, code=exited status=255
Dec 11 18:07:40 ace.light systemd[1]: Failed to start ZoneMinder CCTV recording and security system.
Dec 11 18:07:40 ace.light systemd[1]: Unit zoneminder.service entered failed state.
Dec 11 18:07:40 ace.light systemd[1]: zoneminder.service failed.
The Host '192.168.2.70' is not allowed is possibly from when this computer was first started and dns gave it that ip addr but its now a static 192.168.2.11 I have no idea where its picking up the 192.168.2.70 from its not in the /etc/hosts file.

Thanks
Jim
jamby
Posts: 11
Joined: Tue Jan 08, 2013 6:30 pm

Re: zoneminder won't start error about ip address

Post by jamby »

Well I found were the "70" ip address was coming from and now its failing because mysql doesn't like the other ip adder?? Oh well.
Maximo1970
Posts: 97
Joined: Sun May 28, 2017 4:29 pm

Re: zoneminder won't start error about ip address

Post by Maximo1970 »

DBI connect('database=zm;host=192.168.2.11','zmuser',...) failed: Host '192.168.2.70' is not allowed to connect to this MariaDB server at /usr/share/perl5/vendor_perl/ZoneMinder/Config.pm line 113.
By default MariaDB will restrict the user account to coming from a certain host, such as 192.168.2.70. If you change your IP address then you'll also need to make sure that you change the user account in MariaDB to reflect the new IP address, such as 192.168.2.11. If you are likely to change IP address on a regular basis then swap the IP address out to be % instead.

I hope that helps.

Regards,

Garry
jamby
Posts: 11
Joined: Tue Jan 08, 2013 6:30 pm

Re: zoneminder won't start error about ip address

Post by jamby »

Thanks Garry
Now I need to find out how to edit the mariadb user. Back to google.

Jim
Last edited by jamby on Thu Dec 12, 2019 5:23 pm, edited 1 time in total.
jamby
Posts: 11
Joined: Tue Jan 08, 2013 6:30 pm

Re: zoneminder won't start error about ip address

Post by jamby »

Hey Garry
Well after hours of hacking around I finally stumbled over a couple of things I believe finally got zoneminder started.
1) in mysql I used GRANT ALL PRIVILEGES ON *.* TO 'zmuser'@'localhost' IDENTIFIED BY 'zmpass'
2) in /etc/zm/zm.conf I changed the ZM_DB_HOST=192.168.2.11 to ZM_DB_HOST=localhost

after that zoneminder started and that's as far as I've got.. for now.

Thanks again
Jim

edit: this is the last set of errors kicked out before those changes.
Dec 12 09:10:34 ace.light systemd[1]: Starting ZoneMinder CCTV recording and security system...
Dec 12 09:10:34 ace.light zmpkg.pl[12299]: DBI connect('database=zm;host=192.168.2.11','zmuser',...) failed: Access denied for user 'zmuser'@'ace' (using password: YES) at /usr/share/perl5/vendor_perl/ZoneMinder/Config.pm line 113.

I believe that the "ace" was coming from the /etc/hosts file.
jamby
Posts: 11
Joined: Tue Jan 08, 2013 6:30 pm

Re: zoneminder won't start error about ip address

Post by jamby »

Hey again

Well sometime later I changed the mysql zm database grant access to zmuser @ localhost then zm would start.
So changes were made to the http.conf file to get the webserver to show the welcome page.
But now web console, had to copy /etc/zm/www/zoneminder.conf to /etc/httpd/conf
The time stamp in php.ini had to be set.
Then the battle was on with the definition of the source of the camera I wanted to capture.
Since it was a webcam on another computer I had to change a few things in the Monitor Definition Panel
first tab
name - what i wanted to call it "garage-1"
Source type - remote # this was the big key it allowed me to define the server on the second tab.
second tab
protocal - http
method - simple
host name - name of computer serving the stream this case "nor"
port - 8088
path - ?actlion=stream
capture width - 528
capture height - 288

This is a computer in the garage that is connected to a cheap logitech webcam, using mjpg-streamer to serve up the pic's on port 8088.

So finally its installed and working. Hope i can remember what I did in a couple of years when I set up a CentOS 8 server.....errrr

Thank again Garry
Post Reply