Ad Widget

Collapse

zabbix_get firewall issue, which port?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • robertchen
    Member
    • Jun 2014
    • 39

    #1

    zabbix_get firewall issue, which port?

    hi all,

    both way 10050, 10051 are open. telnet on both ways ok:

    [root@zbx01 ~]# telnet host33 10050
    Trying 10.1.50.16...
    Connected to host33.
    Escape character is '^]'.

    [root@zbx01 ~]# zabbix_get -s host33 -k "net.tcp.port[,10050]"
    0

    [root@zbx01 ~]# zabbix_get -s host1 -k "net.tcp.port[,10050]"
    1

    host33 is not returning data, host1 is ok.

    Please help, it is urgent, thanks.
    Last edited by robertchen; 11-07-2014, 07:24.
  • robertchen
    Member
    • Jun 2014
    • 39

    #2
    after enable debug, I found these:

    9799:20140710:235859.233 Requested [net.tcp.port[,10050]]
    9799:20140710:235859.233 TCP expect network error: cannot connect to [[127.0.0.1]:10050]: [13] Permission denied
    9799:20140710:235859.233 Sending back [0]

    how to resolve this?

    Comment

    • filipp.sudanov
      Senior Member
      Zabbix Certified Specialist
      • May 2014
      • 137

      #3
      Do I understand correctly, that you enabled debug on zabbix server?

      The log is saying, that it's trying to connect to 127.0.0.1 - that is to the local host. Have you specified the correct IP address in host properties in zabbix front end?

      Comment

      • robertchen
        Member
        • Jun 2014
        • 39

        #4
        Originally posted by filipp.sudanov
        Do I understand correctly, that you enabled debug on zabbix server?

        The log is saying, that it's trying to connect to 127.0.0.1 - that is to the local host. Have you specified the correct IP address in host properties in zabbix front end?
        I enable debug on the agent, the output is from the agent. some metrics could be return, some like net.tcp.port and proc.num cannot:

        [root@zbx01 ~]# zabbix_get -s host33 -k "net.tcp.port[,10050]"
        0

        [root@zbx01 ~]# zabbix_get -s host33 -k "system.cpu.util[,iowait]"
        0.368201

        on the host33
        [root@host33 zabbix]# zabbix_agent -t net.tcp.port[,10050]
        net.tcp.port[,10050] [u|1]

        Comment

        • filipp.sudanov
          Senior Member
          Zabbix Certified Specialist
          • May 2014
          • 137

          #5
          Ok, so you request item net.tcp.port[,10050] from agent - that is you request the agent to test, if it can open a TCP socket to it's own listening port.

          Code:
          9799:20140710:235859.233 Requested [net.tcp.port[,10050]]
          9799:20140710:235859.233 TCP expect network error: cannot connect to [[127.0.0.1]:10050]: [13] Permission denied
          9799:20140710:235859.233 Sending back [0]
          is saying, that there is some permission issue, that does no allow the agent to open a TCP socket to itself. There should be some difference between host1 and host33 - what OS do they have, is it the same on both machines? What is different in OS, firewall, etc configuration?

          When you run this on host33:
          Code:
          [root@host33 zabbix]# zabbix_agent -t net.tcp.port[,10050]
          net.tcp.port[,10050] [u|1]
          you do it with root's permissions, that's why it's succeeds, result is 1. But when you use zabbix_get, it's connecting to zabbix agent, that is run under "zabbix" user. You can try something like "su - zabbix" and try to run it from zabbix user.

          Comment

          Working...