New Zabbix install with Separate MariaDB database
-
@dafyre Nope. Access denied.
-
-
Two quick notes on the zabbix.conf.php file (because I'm looking at the server).
One is that there was a typo and the file wasn't valid. I fixed that.
Second is that the host is not specified at all, so it isn't looking for the database server anywhere but locally.
-
Here is what the file looked like...
$DB['DATABASE'] = 'zabbix'; $DB['USER'] = zabbix'; $DB['PASSWORD'] = 'password'
Noting a missing quote, a missing semi-colon and a missing server name. Here is what it should look like...
$DB['DATABASE'] = 'zabbix'; $DB['USER'] = 'zabbix'; $DB['PASSWORD'] = 'password'; $DB['SERVER'] = 'maria';
-
Correction. I can login. Mistyped the password (where's that damn post it note...)
-
@scottalanmiller said:
$DB['SERVER'] = 'maria';
Ahhh... Wasn't sure how to put that in. Sadly, I still cannot connect
-
What is the command to attempt to start the Zabbix service?
-
@scottalanmiller # service zabbix-server start
-
Feb 18 16:56:31 lab-lnx-zabbix systemd: zabbix-server.service failed. Feb 18 16:56:41 lab-lnx-zabbix systemd: zabbix-server.service holdoff time over, scheduling restart. Feb 18 16:56:41 lab-lnx-zabbix systemd: Starting Zabbix Server... Feb 18 16:56:41 lab-lnx-zabbix systemd: PID file /run/zabbix/zabbix_server.pid not readable (yet?) after start. Feb 18 16:56:41 lab-lnx-zabbix systemd: Started Zabbix Server. Feb 18 16:56:41 lab-lnx-zabbix systemd: zabbix-server.service: main process exited, code=exited, status=1/FAILURE Feb 18 16:56:41 lab-lnx-zabbix kill: Usage: Feb 18 16:56:41 lab-lnx-zabbix kill: kill [options] <pid|name> [...] Feb 18 16:56:41 lab-lnx-zabbix kill: Options: Feb 18 16:56:41 lab-lnx-zabbix kill: -a, --all do not restrict the name-to-pid conversion to processes Feb 18 16:56:41 lab-lnx-zabbix kill: with the same uid as the present process Feb 18 16:56:41 lab-lnx-zabbix kill: -s, --signal <sig> send specified signal Feb 18 16:56:41 lab-lnx-zabbix kill: -q, --queue <sig> use sigqueue(2) rather than kill(2) Feb 18 16:56:41 lab-lnx-zabbix kill: -p, --pid print pids without signaling them Feb 18 16:56:41 lab-lnx-zabbix kill: -l, --list [=<signal>] list signal names, or convert one to a name Feb 18 16:56:41 lab-lnx-zabbix kill: -L, --table list signal names and numbers Feb 18 16:56:41 lab-lnx-zabbix kill: -h, --help display this help and exit Feb 18 16:56:41 lab-lnx-zabbix kill: -V, --version output version information and exit Feb 18 16:56:41 lab-lnx-zabbix kill: For more details see kill(1). Feb 18 16:56:41 lab-lnx-zabbix systemd: zabbix-server.service: control process exited, code=exited status=1 Feb 18 16:56:41 lab-lnx-zabbix systemd: Unit zabbix-server.service entered failed state. Feb 18 16:56:41 lab-lnx-zabbix systemd: zabbix-server.service failed.
-
Here is the Zabbix log now...
15247:20160218:170737.082 using configuration file: /etc/zabbix/zabbix_server.conf 15247:20160218:170737.086 [Z3005] query failed: [1146] Table 'zabbix.users' doesn't exist [select userid from users limit 1] 15247:20160218:170737.086 cannot use database "zabbix": database is not a Zabbix database
To me, it looks like the Zabbix SQL Script has not yet been run against the database server to set up the database.
-
Suspiciouns confirmed...
MariaDB [zabbix]> show tables; Empty set (0.00 sec)
-
And there we go, just needed the database installed:
zcat /usr/share/doc/zabbix-server-mysql-3.0.0/create.sql.gz | mysql -uzabbix -hmaria -ppassword zabbix
Up and running.
-
Now here is the issue, very odd...
-
nothing goes to the logs when this fails, very frustrating.
-
Can't find any reason why it is not connecting to the database and there is zip in the logs. Not impressed with how it handles this situation.
-
@scottalanmiller said:
Can't find any reason why it is not connecting to the database and there is zip in the logs. Not impressed with how it handles this situation.
On the Remote mysql server, make sure the zabbix user has been created, and that flush privileges has been run.
grant all on zabbix.* to zabbix identified by 'xibbaz'; flush privileges;
-
Switched to the local database, all of the same settings. Worked instantly. From what I can tell, this is a Zabbix flaw.