need help with Zabbix server
-
@Mike-Davis said in need help with Zabbix server:
I can't log in with the user zabbix. Only as root.
Just for kicks I looked at the zabbix_agentd.log
I'm getting this error:1132:20161020:154817.055 agent #3 started [listener #2] 1134:20161020:154817.056 active check configuration update from [127.0.0.1:10051] started to fail (cannot connect to 127.0.0.1]:10051]: [111] Connection refused)
Is it possible I need to open 127.0.0.1 in the firewall?
I do have this command:sudo firewall-cmd --permanent --zone=public --add-port=10051/tcp
No, there is no network or firewall involved here.
-
@Mike-Davis said in need help with Zabbix server:
sudo firewall-cmd --permanent --zone=public --add-port=10051/tcp
That's not even the right port. Why are you looking at 10051 when 3306 is the MySQL port?
-
The issue is simple, you have a username / password mismatch. There is nothing more to it.
You know that the firewall can't be involved for three reasons...
- Root user works, so you've gotten past that point.
- The MySQL client does not use the network stack to connect in this way.
- Localhost / 127.0.0.1 never goes through the firewall.
-
@scottalanmiller because the agent was getting connection refused and it's on 10051
-
OK, so it's definitely something about the zabbix user account. Switching the zabbix server to connect as root works. How bad is it to let it connect as root?
-
@Mike-Davis said in need help with Zabbix server:
OK, so it's definitely something about the zabbix user account. Switching the zabbix server to connect as root works. How bad is it to let it connect as root?
Anything else running on that database? It isn't best practice but if you have a good backup then you probably won't have any issues.
-
It's a dedicated server just for zabbix.
-
@Mike-Davis said in need help with Zabbix server:
It's a dedicated server just for zabbix.
Did you follow my guide?
-
@Mike-Davis said in need help with Zabbix server:
It's a dedicated server just for zabbix.
Won't be best practice or altogether safe but you can do it. I'm wondering why the Zabbix user doesn't work though that just seems odd.
-
@coliver said in need help with Zabbix server:
@Mike-Davis said in need help with Zabbix server:
It's a dedicated server just for zabbix.
Won't be best practice or altogether safe but you can do it. I'm wondering why the Zabbix user doesn't work though that just seems odd.
Likely because the zabbix user password was fat fingered and is now stuck in a config file somewhere / isn't being overwritten.
-
@JaredBusch said in need help with Zabbix server:
@Mike-Davis said in need help with Zabbix server:
It's a dedicated server just for zabbix.
Did you follow my guide?
no, but I wish I had known it was there last night....
-
@DustinB3403 said in need help with Zabbix server:
@coliver said in need help with Zabbix server:
@Mike-Davis said in need help with Zabbix server:
It's a dedicated server just for zabbix.
Won't be best practice or altogether safe but you can do it. I'm wondering why the Zabbix user doesn't work though that just seems odd.
Likely because the zabbix user password was fat fingered and is now stuck in a config file somewhere / isn't being overwritten.
I created a really long password, so I was pasting it each time. I even used
use mysql;
update user set password=password('aweakpassword​') where user='zabbix';to change the password in SQL and then try to connect with that with no luck.
-
@Mike-Davis said in need help with Zabbix server:
@scottalanmiller because the agent was getting connection refused and it's on 10051
I thought that you were working on the database. The agent doesn't talk to the database.
-
@Mike-Davis said in need help with Zabbix server:
now I just have the user zabbix@localhost
I restarted services and in the log I'm getting:
1141:20161020:154817.079 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
1141:20161020:154817.086 database is down: reconnecting in 10 seconds
1141:20161020:154827.330 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)This is the error that we were addressing, this is between Zabbix and the Database. If you don't have the application talking to the database yet, you should not be toying with the agent. You don't have a working system for the agent to contact yet. You are confusing yourself by jumping around.
-
@Mike-Davis said in need help with Zabbix server:
OK, so it's definitely something about the zabbix user account. Switching the zabbix server to connect as root works. How bad is it to let it connect as root?
Very. Delete the Zabbix account and make a new one. And don't use the same name, make a fresh account.
-
The zabbix server is connected to the database now. (as root, but it's connected)
-
@Mike-Davis said in need help with Zabbix server:
The zabbix server is connected to the database now. (as root, but it's connected)
Okay, that should be fixed, though. But go ahead with the other stuff. It can be fixed later. Put in a ticket, don't let it get forgotten.
-
Could always start over and follow JB's guide. May be a bit easier.
-
@dafyre said in need help with Zabbix server:
Could always start over and follow JB's guide. May be a bit easier.
Not a bad idea. Have a solid baseline and know what the set up is.