Ad Widget

Collapse

cannot connect to [[127.0.0.1]:10051

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • me2017
    Member
    • Apr 2017
    • 34

    #1

    cannot connect to [[127.0.0.1]:10051

    I'm using Zabbix 3.2.6 on CentOS 7.3.1611. I see this every time I give 'systemctl restart zabbix-agent' Strangely, the host is reporting in the server's host configuration and everything seems to be functioning just fine.

    Code:
    3816:20170523:111111.975 active check configuration update from [127.0.0.1:10051] started to fail (cannot connect to [[127.0.0.1]:10051]: [111] Connection refused)
    If I ask for more detail, DebugLevel=4

    Code:
      3973:20170523:111638.312 __zbx_zbx_setproctitle() title:'listener #1 [waiting for connection]'
      3976:20170523:111638.795 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
      3976:20170523:111638.795 End of send_buffer():SUCCEED
    I don't see 10051 listening...

    Code:
    # netstat -na | grep 10051
    And it's not defined in my config...

    Code:
    # grep 10051 /etc/zabbix/zabbix_agentd.conf
    Can someone explain what's up here?
  • me2017
    Member
    • Apr 2017
    • 34

    #2
    Solved, with a stroke of genius:

    ## ServerActive=127.0.0.1

    Comment

    • gonsalves2003
      Junior Member
      • Feb 2018
      • 2

      #3
      Originally posted by me2017
      Solved, with a stroke of genius:

      ## ServerActive=127.0.0.1
      How did you resolve this? I am still struggling with the same issue.
      I have the following in my agent conf file. 192.168.25.5 is my Zabbix Server:

      EnableRemoteCommands=1
      Server=192.168.25.5
      ServerActive=192.168.25.5
      Hostname=FileServer01

      Comment

      • me2017
        Member
        • Apr 2017
        • 34

        #4
        I think in my case I found simply that
        Code:
         ServerActive=127.0.0.1
        was set so I commented it out.

        I may have also had trouble with tcp wrappers. I have 127.0.0.1 included for ssh.

        I'm not sure what issue you're experiencing but since this is the server you're having trouble with also check /etc/zabbix/web/zabbix.conf.php

        Here is my servers /etc/zabbix/zabbix_agentd.conf:
        Code:
        PidFile=/var/run/zabbix/zabbix_agentd.pid
        LogType=file
        LogFile=/var/log/zabbix/zabbix.log
        DebugLevel=3
        EnableRemoteCommands=0
        LogRemoteCommands=0
        Server=192.168.1.5
        ListenPort=10050
        ListenIP=192.168.1.5
        StartAgents=3
        ServerActive=192.168.1.5
        Hostname=ktlo01
        RefreshActiveChecks=120
        BufferSend=5
        BufferSize=100
        MaxLinesPerSecond=100
        Timeout=3
        AllowRoot=0
        User=zabbix
        Include=/etc/zabbix/zabbix_agentd.d
        UnsafeUserParameters=1
        LoadModulePath=/usr/lib/modules

        Comment

        • gonsalves2003
          Junior Member
          • Feb 2018
          • 2

          #5
          Originally posted by me2017
          I think in my case I found simply that
          Code:
           ServerActive=127.0.0.1
          was set so I commented it out.
          [/CODE]

          Aah!! Mine is a windows Agent and I added all lines from your script which are relevant for Windows. In fact, here are my code:

          EnableRemoteCommands=0
          LogRemoteCommands=0
          Server=192.168.25.5
          ListenPort=10050
          ListenIP=192.168.25.35
          StartAgents=3
          ServerActive=192.168.25.5
          Hostname=FileServer01
          RefreshActiveChecks=120
          BufferSend=5
          BufferSize=100
          MaxLinesPerSecond=100
          Timeout=3

          The following is the error I get:
          9424:20180227:103015.423 active check configuration update from [192.168.25.5:10051] started to fail (cannot connect to [[192.168.25.5]:10051]: Connection refused.)

          I have enabled 10051 IN and 10050 OUT ports in the server. similarly 10050 IN and 10051 OUT in the client...

          Comment

          • ntluan_gooner
            Junior Member
            • Apr 2020
            • 1

            #6
            i got a same problem and i hope this help

            Check your conf path:
            /etc/zabbix/zabbix_agentd.conf

            In my case , Zabbix agent log was:
            ....using configuration file: /etc/zabbix_agentd.conf

            So be careful !

            Comment

            • ahkhan1990
              Junior Member
              • Nov 2023
              • 6

              #7
              Hello Everyone I am having the same problem . Can anyone assist me? the machines are pinging each other but agent is not working. i tried every methd in this forum and other forum but still its same. Agent is installed in Windows Server 2022 machine with the server IP and server proxy 127.0.0.1 default. I am using PSK key but still its givign me same error.

              Comment

              • MRedbourne
                Senior Member
                • Feb 2023
                • 103

                #8
                Originally posted by ahkhan1990
                Hello Everyone I am having the same problem . Can anyone assist me? the machines are pinging each other but agent is not working. i tried every methd in this forum and other forum but still its same. Agent is installed in Windows Server 2022 machine with the server IP and server proxy 127.0.0.1 default. I am using PSK key but still its givign me same error.
                Can you telnet to the 10051 port on the proxy? Alternatively, what happens if you scan it with nmap?

                Telnet Option > telnet <Proxy IP> 10051
                nmap Option > nmap -p 10051 -Pn <Proxy IP>

                If they return closed, there's likely a firewall in the way. Can be the source, a perimeter firewall (Eg: Cisco, Fortinet, etc) or the destination host blocking the connection.

                Which version of Zabbix (Server/Proxy) are you using?
                Which OS and Version runs Zabbix Server/Proxy?

                Comment

                • cyber
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Dec 2006
                  • 4806

                  #9
                  127.0.0.1 is localhost... if you want your agent to connect to server/proxy, put its address there instead of localhost...

                  Comment

                  • ahkhan1990
                    Junior Member
                    • Nov 2023
                    • 6

                    #10
                    still the same issue .and I see that 10050 is listening but 10051 is not. and both ports are open. Zabbix server and agent machine is also pinging

                    Comment

                    • ahkhan1990
                      Junior Member
                      • Nov 2023
                      • 6

                      #11
                      Originally posted by MRedbourne

                      Can you telnet to the 10051 port on the proxy? Alternatively, what happens if you scan it with nmap?

                      Telnet Option > telnet <Proxy IP> 10051
                      nmap Option > nmap -p 10051 -Pn <Proxy IP>

                      If they return closed, there's likely a firewall in the way. Can be the source, a perimeter firewall (Eg: Cisco, Fortinet, etc) or the destination host blocking the connection.

                      Which version of Zabbix (Server/Proxy) are you using?
                      Which OS and Version runs Zabbix Server/Proxy?
                      Hey I tried but still not working. getting the same error.

                      Comment

                      • ahkhan1990
                        Junior Member
                        • Nov 2023
                        • 6

                        #12
                        Originally posted by cyber
                        127.0.0.1 is localhost... if you want your agent to connect to server/proxy, put its address there instead of localhost...
                        still the same issue .and I see that 10050 is listening but 10051 is not. and both ports are open. Zabbix server and agent machine is also pinging

                        Comment

                        • cyber
                          Senior Member
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Dec 2006
                          • 4806

                          #13
                          Listening where? 10050 is agent port, Server/proxy connects there in case of passive agent. 10051 is trapper port on server/proxy, agent connects there in case of active agent to ask for config updates and send away collected data...
                          Make sure you can connect from agent host to server/proxy:10051 and from server/proxy to agent host:10050. If you do not succeed, find the reason, for example verify FW rules, make sure you server/proxy processes are up and running etc...

                          Comment

                          • ahkhan1990
                            Junior Member
                            • Nov 2023
                            • 6

                            #14
                            Originally posted by cyber
                            Listening where? 10050 is agent port, Server/proxy connects there in case of passive agent. 10051 is trapper port on server/proxy, agent connects there in case of active agent to ask for config updates and send away collected data...
                            Make sure you can connect from agent host to server/proxy:10051 and from server/proxy to agent host:10050. If you do not succeed, find the reason, for example verify FW rules, make sure you server/proxy processes are up and running etc...
                            failed to process an incoming connection from 10.XX.XX:XX cannot accept unencrypted connection

                            Comment

                            • cyber
                              Senior Member
                              Zabbix Certified SpecialistZabbix Certified Professional
                              • Dec 2006
                              • 4806

                              #15
                              Originally posted by ahkhan1990

                              failed to process an incoming connection from 10.XX.XX:XX cannot accept unencrypted connection
                              Agent?

                              Have you configured host in Zabbix GUI with all the encryption, but agent has no config?

                              Comment

                              Working...