Hello,
First of all, I am having an issue with communication PSK. Hope you help me understand why? and how to fix it?
1. Topology
Zabbix Client: 10.30.3.115
Zabbix Server: 10.30.3.116
OS: Ubuntu 16.04 LTS
Zabbix Server
Zabbix Client
Zabbix Client communicate directly with Zabbix Server without Zabbix Proxy. I installed Zabbix package from repository for both of them.
2. What did I implement?
On Zabbix Client, I wrote the agent configuration as below:
Zabbix agent is running on port 10050
and Zabbix server is running on port 10051
Then I added successfully Zabbix Client to Zabbix Server, also enabled PSK at "connections to host" and "connection from host" of Encryption tab in Configuration/ Host. Screen of Zabbix Client appears well, I can create some screens about CPU, network and memory.


After that, I need to create a custom monitoring for Graylog process. Now I need to use zabbix-get, and, from here, I found an issue with PSK.
3. What happened?
Zabbix Client: 10.30.3.115
Zabbix Server: 10.30.3.116
I declared the IP of Zabbix Agent to Zabbix Agent configuration on Zabbix Server.
And zabbix-get works on Zabbix Server
But, it is not working with Zabbix Client
Although, I already declared IP of Zabbix Client at Server directive at /etc/zabbix/zabbix_agentd.conf. So I traced the log file and found the issue with PSK.
Zabbix server log
Zabbix client log
As I see, the PSK is having an issue. So now, my question are:
- How to fix an issue "zabbix_get [8674]: Check access restrictions in Zabbix agent configuration"
- How to fix an issue with PSK?
- What did I misconfigured?
Thank you so much!!!
First of all, I am having an issue with communication PSK. Hope you help me understand why? and how to fix it?
1. Topology
Zabbix Client: 10.30.3.115
Zabbix Server: 10.30.3.116
OS: Ubuntu 16.04 LTS
Zabbix Server
sky@zabbix-srv-01:~$ dpkg -l | grep zabbix
ii zabbix-agent 1:3.2.11-1+xenial amd64 Zabbix network monitoring solution - agent
ii zabbix-frontend-php 1:3.2.11-1+xenial all Zabbix network monitoring solution - PHP front-end
ii zabbix-get 1:3.2.11-1+xenial amd64 Zabbix network monitoring solution - get
ii zabbix-release 3.2-1+xenial all Zabbix official repository configuration
ii zabbix-server-mysql 1:3.2.11-1+xenial amd64 Zabbix network monitoring solution - server (MySQL)
ii zabbix-agent 1:3.2.11-1+xenial amd64 Zabbix network monitoring solution - agent
ii zabbix-frontend-php 1:3.2.11-1+xenial all Zabbix network monitoring solution - PHP front-end
ii zabbix-get 1:3.2.11-1+xenial amd64 Zabbix network monitoring solution - get
ii zabbix-release 3.2-1+xenial all Zabbix official repository configuration
ii zabbix-server-mysql 1:3.2.11-1+xenial amd64 Zabbix network monitoring solution - server (MySQL)
Zabbix Client
sky@graylog-srv-01:~$ dpkg -l | grep zabbix
ii zabbix-agent 1:3.2.11-1+xenial amd64 Zabbix network monitoring solution - agent
ii zabbix-get 1:3.2.11-1+xenial amd64 Zabbix network monitoring solution - get
ii zabbix-release 3.2-1+xenial all Zabbix official repository configuration
ii zabbix-agent 1:3.2.11-1+xenial amd64 Zabbix network monitoring solution - agent
ii zabbix-get 1:3.2.11-1+xenial amd64 Zabbix network monitoring solution - get
ii zabbix-release 3.2-1+xenial all Zabbix official repository configuration
sky@graylog-srv-01:~$ ls -lrt /etc/zabbix/
total 32
drwxr-xr-x 2 root root 4096 Feb 12 02:20 zabbix_agentd.d
-rw-r--r-- 1 root root 65 Feb 12 02:20 zabbix_agentd.psk
-rw-r--r-- 1 root root 10347 Feb 12 02:20 zabbix_agentd.conf.orig
-rw-r--r-- 1 root root 10364 Feb 13 02:38 zabbix_agentd.conf
total 32
drwxr-xr-x 2 root root 4096 Feb 12 02:20 zabbix_agentd.d
-rw-r--r-- 1 root root 65 Feb 12 02:20 zabbix_agentd.psk
-rw-r--r-- 1 root root 10347 Feb 12 02:20 zabbix_agentd.conf.orig
-rw-r--r-- 1 root root 10364 Feb 13 02:38 zabbix_agentd.conf
Zabbix Client communicate directly with Zabbix Server without Zabbix Proxy. I installed Zabbix package from repository for both of them.
2. What did I implement?
On Zabbix Client, I wrote the agent configuration as below:
~$ sudo vim /etc/zabbix/zabbix_agentd.conf
...
Server=10.30.3.116 # Zabbix Server
ServerActive=10.30.3.116
TLSConnect=psk
TLSAccept=psk
TLSPSKIdentity=PSK 007
TSLPSKFile=/etc/zabbix/zabbix_agentd.psk
ServerActive=10.30.3.116
TLSConnect=psk
TLSAccept=psk
TLSPSKIdentity=PSK 007
TSLPSKFile=/etc/zabbix/zabbix_agentd.psk
Zabbix agent is running on port 10050
sky@graylog-srv-01:~$ netstat -tapn | grep 10050
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN -
tcp6 0 0 :::10050 :::* LISTEN -
sky@graylog-srv-01:~$
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN -
tcp6 0 0 :::10050 :::* LISTEN -
sky@graylog-srv-01:~$
and Zabbix server is running on port 10051
sky@zabbix-srv-01:~$ netstat -tapln | grep 10051
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN -
tcp6 0 0 :::10051 :::* LISTEN -
tcp6 0 0 ::1:41360 ::1:10051 TIME_WAIT -
tcp6 0 0 ::1:41344 ::1:10051 TIME_WAIT -
tcp6 0 0 ::1:41460 ::1:10051 TIME_WAIT -
tcp6 0 0 ::1:41396 ::1:10051 TIME_WAIT -
tcp6 0 0 ::1:41432 ::1:10051 TIME_WAIT -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN -
tcp6 0 0 :::10051 :::* LISTEN -
tcp6 0 0 ::1:41360 ::1:10051 TIME_WAIT -
tcp6 0 0 ::1:41344 ::1:10051 TIME_WAIT -
tcp6 0 0 ::1:41460 ::1:10051 TIME_WAIT -
tcp6 0 0 ::1:41396 ::1:10051 TIME_WAIT -
tcp6 0 0 ::1:41432 ::1:10051 TIME_WAIT -
Then I added successfully Zabbix Client to Zabbix Server, also enabled PSK at "connections to host" and "connection from host" of Encryption tab in Configuration/ Host. Screen of Zabbix Client appears well, I can create some screens about CPU, network and memory.
After that, I need to create a custom monitoring for Graylog process. Now I need to use zabbix-get, and, from here, I found an issue with PSK.
3. What happened?
Zabbix Client: 10.30.3.115
Zabbix Server: 10.30.3.116
I declared the IP of Zabbix Agent to Zabbix Agent configuration on Zabbix Server.
sky@zabbix-srv-01:~$ sudo vim /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1,10.30.3.115,10.30.3.116
Server=127.0.0.1,10.30.3.115,10.30.3.116
And zabbix-get works on Zabbix Server
sky@graylog-srv-01:~$ zabbix_get -s 10.30.3.116 -k 'proc.num[zabbix_server,zabbix]'
28
sky@graylog-srv-01:~$
28
sky@graylog-srv-01:~$
But, it is not working with Zabbix Client
sky@graylog-srv-01:~$ zabbix_get -s 10.30.3.115 -k 'proc.num[zabbix_server,zabbix]'
zabbix_get [8674]: Check access restrictions in Zabbix agent configuration
zabbix_get [8674]: Check access restrictions in Zabbix agent configuration
Although, I already declared IP of Zabbix Client at Server directive at /etc/zabbix/zabbix_agentd.conf. So I traced the log file and found the issue with PSK.
Zabbix server log
sky@zabbix-srv-01:~$ tail -f /var/log/zabbix/zabbix_server.log
31582:20190213:023538.060 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:023625.636 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:023734.472 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:023808.172 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:023900.675 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:024100.690 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31583:20190213:024300.703 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31582:20190213:024500.717 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:024700.732 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:024809.099 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31582:20190213:023538.060 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:023625.636 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:023734.472 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:023808.172 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:023900.675 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:024100.690 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31583:20190213:024300.703 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31582:20190213:024500.717 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:024700.732 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
31581:20190213:024809.099 cannot send list of active checks to "10.30.3.115": connection of type "TLS with PSK" is not allowed for host "Zabbix server"
Zabbix client log
sky@graylog-srv-01:~$ zabbix_get -s 127.0.0.1 -k 'proc.num[zabbix_server,zabbix]'
zabbix_get [29503]: Check access restrictions in Zabbix agent configuration
29495:20190213:031609.353 no active checks on server [10.30.3.116:10051]: connection of type "TLS with PSK" is not allowed for host "Zabbix server"
29494:20190213:024812.549 failed to accept an incoming connection: from 127.0.0.1: unencrypted connections are not allowed
zabbix_get [29503]: Check access restrictions in Zabbix agent configuration
29495:20190213:031609.353 no active checks on server [10.30.3.116:10051]: connection of type "TLS with PSK" is not allowed for host "Zabbix server"
29494:20190213:024812.549 failed to accept an incoming connection: from 127.0.0.1: unencrypted connections are not allowed
As I see, the PSK is having an issue. So now, my question are:
- How to fix an issue "zabbix_get [8674]: Check access restrictions in Zabbix agent configuration"
- How to fix an issue with PSK?
- What did I misconfigured?
Thank you so much!!!
Comment