Настраивая мониторинг лог-файла на Windows хосте столкнулся с проблемой - не работают активные проверки.
Начал разбираться:
1. Включил на агенте отладку с уровнем 3 - получил строку:
5944:20151111:123517.436 active check configuration update from [10.2.1.53:10051] started to fail (cannot connect to [[10.2.1.53]:10051]: [0x0000274C] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
2. Начал проверять - действительно - с хоста где установлен агент telnet 10.2.1.53 10051 не проходит. При этом на другие открытые порты (http,ssh) отлично захожу.
3. Зашел на сервер (CentOS Linux release 7.1.1503 (Core)) и для начала отключил selinux и iptables:
[root@zabbix-ca ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@zabbix-ca ~]# service iptables stop
Redirecting to /bin/systemctl stop iptables.service
Failed to issue method call: Unit iptables.service not loaded.
Не помогает.
4. Проверил, слушает ли сервер порт:
[root@zabbix-ca ~]# nmap -sS localhost -p 10051
Starting Nmap 6.40 ( http://nmap.org ) at 2015-11-11 12:41 MSK
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000061s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT STATE SERVICE
10051/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds
[root@zabbix-ca ~]# netstat -tulpn | grep zabbix
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 1408/zabbix_agentd
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 1435/zabbix_server
tcp6 0 0 :::10050 :::* LISTEN 1408/zabbix_agentd
tcp6 0 0 :::10051 :::* LISTEN 1435/zabbix_server
Получается - сервер порт слушает.
4. Попробовал зайти на самом сервере:
[root@zabbix-ca ~]# telnet 10.2.1.53 10051
Trying 10.2.1.53...
Connected to 10.2.1.53.
Escape character is '^]'.
Connection closed by foreign host.
Зайти получилось.
Не могу понять почему не могу соединиться извне - помогите, пожалуйста, разобраться.
PS: Downgrade пакету gnutils сделан (сейчас установлена версия gnutls-3.1.18-10.el7_0.x86_64.rpm) т.к. без этого zabbix сервер в принципе не запускался.
Начал разбираться:
1. Включил на агенте отладку с уровнем 3 - получил строку:
5944:20151111:123517.436 active check configuration update from [10.2.1.53:10051] started to fail (cannot connect to [[10.2.1.53]:10051]: [0x0000274C] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
2. Начал проверять - действительно - с хоста где установлен агент telnet 10.2.1.53 10051 не проходит. При этом на другие открытые порты (http,ssh) отлично захожу.
3. Зашел на сервер (CentOS Linux release 7.1.1503 (Core)) и для начала отключил selinux и iptables:
[root@zabbix-ca ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@zabbix-ca ~]# service iptables stop
Redirecting to /bin/systemctl stop iptables.service
Failed to issue method call: Unit iptables.service not loaded.
Не помогает.
4. Проверил, слушает ли сервер порт:
[root@zabbix-ca ~]# nmap -sS localhost -p 10051
Starting Nmap 6.40 ( http://nmap.org ) at 2015-11-11 12:41 MSK
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000061s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT STATE SERVICE
10051/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds
[root@zabbix-ca ~]# netstat -tulpn | grep zabbix
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 1408/zabbix_agentd
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 1435/zabbix_server
tcp6 0 0 :::10050 :::* LISTEN 1408/zabbix_agentd
tcp6 0 0 :::10051 :::* LISTEN 1435/zabbix_server
Получается - сервер порт слушает.
4. Попробовал зайти на самом сервере:
[root@zabbix-ca ~]# telnet 10.2.1.53 10051
Trying 10.2.1.53...
Connected to 10.2.1.53.
Escape character is '^]'.
Connection closed by foreign host.
Зайти получилось.
Не могу понять почему не могу соединиться извне - помогите, пожалуйста, разобраться.
PS: Downgrade пакету gnutils сделан (сейчас установлена версия gnutls-3.1.18-10.el7_0.x86_64.rpm) т.к. без этого zabbix сервер в принципе не запускался.
Comment