Ad Widget

Collapse

*** Cannot connect to [10.0.2.66]:10050 [Connection refused]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hanarina
    Junior Member
    • May 2008
    • 11

    #1

    *** Cannot connect to [10.0.2.66]:10050 [Connection refused]

    i have the error when i add the host on the zabbix frontend..i dont know whats the problem,can anyone tell me what i should do to fix the error?

    this is my zabbix_agentd.conf

    # This is config file for zabbix_agentd
    # To get more information about ZABBIX, go http://www.zabbix.com

    ############ GENERAL PARAMETERS #################

    # List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
    # No spaces allowed. First entry is used for sending active checks.
    # Note that hostnames must resolve hostname->IP address and
    # IP address->hostname.

    Server=10.0.10.183 (zabbix_server)

    # Server port for sending active checks

    #ServerPort=10051
    ServerPort=10051


    # Unique hostname. Required for active checks.

    #Hostname=itd.cybersecurity.my (agent hostname)

    # Listen port. Default is 10050

    ListenPort=10050

    # IP address to bind agent
    # If missing, bind to all available IPs

    #ListenIP=127.0.0.1
    ListenIP=10.0.2.188

    # Number of pre-forked instances of zabbix_agentd.
    # Default value is 5
    # This parameter must be between 1 and 16

    StartAgents=5

    # How often refresh list of active checks. 2 minutes by default.

    #RefreshActiveChecks=120

    # Disable active checks. The agent will work in passive mode listening server.

    #DisableActive=1

    # Enable remote commands for ZABBIX agent. By default remote commands disabled.

    # Specifies debug level
    # 0 - debug is not created
    # 1 - critical information
    # 2 - error information
    # 3 - warnings (default)
    # 4 - for debugging (produces lots of information)

    DebugLevel=3

    # Name of PID file

    PidFile=/var/tmp/zabbix_agentd.pid

    # Name of log file.
    # If not set, syslog will be used

    LogFile=/tmp/zabbix_agentd.log

    # Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
    #LogFileSize=1

    # Spend no more than Timeout seconds on processing
    # Must be between 1 and 30Timeout=3

    ####### USER-DEFINED MONITORED PARAMETERS #######
    # Format: UserParameter=<key>,<shell command>
    # Note that shell command must not return empty string or EOL only
    #UserParameter=system.test,who|wc -l
    ### Set of parameter for monitoring MySQL server (v3.23.42 and later)
    ### Change -u<username> and add -p<password> if required
    #UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
    #UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
    #UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q
    "
    #UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
    #UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1-d"O"
    #UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
    #UserParameter=mysql.version,mysql -V

    help me please..i used freebsd 6.3,zabbix 1.4.5
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    Originally posted by hanarina
    Server=10.0.10.183 (zabbix_server)
    Check the IP address for your server. Try and telnet from the command line to the agent

    Code:
    telnet 10.0.2.66 10050
    When you connect type "agent.version". It should return version information for the agent.

    If that does not work that means the agent is rejecting the connection as the inbound IP address does not match the one it has for the server. If it does work then its possible the server is using a different IP address to originate the connection than the one used for your telnet test, this is only a problem for a multi homed host.

    There are many posts regarding this problem in the forums, if you need further help just ask. :-)
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • hanarina
      Junior Member
      • May 2008
      • 11

      #3
      cannot connect to the agent

      Originally posted by nelsonab
      Check the IP address for your server. Try and telnet from the command line to the agent

      Code:
      telnet 10.0.2.66 10050
      When you connect type "agent.version". It should return version information for the agent.

      If that does not work that means the agent is rejecting the connection as the inbound IP address does not match the one it has for the server. If it does work then its possible the server is using a different IP address to originate the connection than the one used for your telnet test, this is only a problem for a multi homed host.

      There are many posts regarding this problem in the forums, if you need further help just ask. :-)

      i tried telnet to the agent ip address as you suggest and it returns like this

      zabbixII# telnet 10.0.2.66 10050
      Trying 10.0.2.66...
      telnet: connect to address 10.0.2.66: Connection refused
      telnet: Unable to connect to remote host

      any other suggestions?thanks nelson..

      Comment

      • nelsonab
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2006
        • 1233

        #4
        That would mean that the agent is refusing the connection from the server. Did you bind the server to a different IP address than the one in the agent config? Is there a NAT firewall between the server and the agent? If so you'll have to use the NAT address of the firewall for the server IP in the agent config.
        RHCE, author of zbxapi
        Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
        Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

        Comment

        • yuhuu
          Member
          • Jan 2010
          • 30

          #5
          hanarina. i hope u can help me. bcoz we work the same thing.

          Comment

          • zabbli
            Junior Member
            • Mar 2010
            • 3

            #6
            you can only connect to the server or IP which you have defined as listen address in the config file

            Comment

            • kasunmr
              Junior Member
              • Nov 2017
              • 1

              #7
              Check the firewall?

              Comment

              Working...