Ad Widget

Collapse

Zabbix-Agent restart no pid file...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MrRobbert
    Member
    • Nov 2006
    • 50

    #1

    Zabbix-Agent restart no pid file...

    Hi All,

    I run a Zabbix server, i have several host running, they are shown "available" in mij "host list". But then some hosts give me the next message instead of available:

    Availability: "Not available"
    Error: "Cannot connect to [host10] [Connection refused]"

    Now when i logon to that machine and i try to restart the zabbix agent i get the following message:

    root@VMWARESERVER01:/# /etc/init.d/zabbix-agent restart
    Stopping Zabbix agent: zabbix_agentd
    No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.
    Starting Zabbix agent: zabbix_agentd



    My zabbix-agent.conf file contains the following:

    ##-Configured
    # 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=172.17.6.217
    #172.17.6.217
    #172.17.6.217

    # Server port for sending active checks

    # ServerPort=10050

    # Unique hostname. Required for active checks.

    Hostname=host217

    # Listen port. Default is 10050

    # ListenPort=10050

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

    # ListenIP=172.17.6.217

    # 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=10

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

    #DisableActive=1

    #EnableRemoteCommands=1

    # 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/run/zabbix/agentd.pid
    #/var/run/zabbix/agentd.pid
    #/var/run/zabbix/agentd.pid
    #PidFile=/var/run/zabbix/agentd.pid
    #/var/run/zabbix/agentd.pid
    #/var/tmp/zabbix_agentd.pid

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

    LogFile=/var/log/zabbix/agentd.log
    #/var/log/zabbix/agentd.log
    #/var/log/zabbix/agentd.log
    #/tmp/zabbix_agentd.log

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

    Timeout=30

    ####### 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"$
    #UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -$
    #UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1$
    #UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
    #UserParameter=mysql.version,mysql -V

    #UserParameter=iptb_out[*],iptc_getrule filter from_us "$1" b
    #UserParameter=iptp_out[*],iptc_getrule filter from_us "$1" p
    #UserParameter=iptb_in[*],iptc_getrule filter to_us "$1" b
    #UserParameter=iptp_in[*],iptc_getrule filter to_us "$1" p









    If you need more information please let me know?

    My OS is debian...

    Grz Robbert
  • amcorreia
    Member
    • Mar 2006
    • 73

    #2
    Hi,

    check if you have the directory '/var/run/zabbix/' and '/var/log/zabbix'
    check the permissions of both directories.
    I guess, the owner must be user 'zabbix' and group 'root' with 750 permissions.


    I hope this help.

    Comment

    • MrRobbert
      Member
      • Nov 2006
      • 50

      #3
      Hey...

      this are my settings...


      root@VMWARESERVER01:/var/run/zabbix# ls -l
      total 4
      -rwxrwxrwx 1 root root 5 2006-11-21 14:52 zabbix_agentd.pid


      root@VMWARESERVER01:/var/log/zabbix# ls -l
      total 0
      -rwxrwxrwx 1 root root 0 2006-11-20 09:51 agentd.log
      -rwxrwxrwx 1 root root 0 2006-11-21 12:19 agent.log


      root@VMWARESERVER01:/var/run/zabbix# /etc/init.d/zabbix-agent restart
      Stopping Zabbix agent: zabbix_agentd
      No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.
      Starting Zabbix agent: zabbix_agentd


      grz Robbert

      Comment

      • amcorreia
        Member
        • Mar 2006
        • 73

        #4
        Originally posted by MrRobbert
        Hey...

        root@VMWARESERVER01:/var/run/zabbix# ls -l
        total 4
        -rwxrwxrwx 1 root root 5 2006-11-21 14:52 zabbix_agentd.pid
        send 'ls -la' this include information of current directory.
        if the user zabbix don't have permission to entry into /var/run/zabbix
        777 in zabbix_agentd.pid, don't have effect.

        Originally posted by MrRobbert
        root@VMWARESERVER01:/var/run/zabbix# /etc/init.d/zabbix-agent restart
        Stopping Zabbix agent: zabbix_agentd
        No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.
        Starting Zabbix agent: zabbix_agentd
        grz Robbert
        owww, you tring to 'restart' a process with maybe not running at moment.
        try
        # /etc/init.d/zabbix-agent start
        # ps fax | grep zabbix

        if have process don't have troble.

        if do not.
        # tail /var/log/zabbix/agentd.log

        and see the error.

        Comment

        • MrRobbert
          Member
          • Nov 2006
          • 50

          #5
          Hey, oke i tried it, but didnt work...

          root@VMWARESERVER01:~# /etc/init.d/zabbix-agent start
          Starting Zabbix agent: zabbix_agentd
          root@VMWARESERVER01:~# ps fax | grep zabbix
          5482 pts/1 S+ 0:00 \_ grep zabbix
          root@VMWARESERVER01:~# tail /var/log/zabbix/agentd.log
          root@VMWARESERVER01:~# /etc/init.d/zabbix-agent stop
          Stopping Zabbix agent: zabbix_agentd
          No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.


          my server still wont connect to monitor this host...

          Grz Robbert

          Comment

          • amcorreia
            Member
            • Mar 2006
            • 73

            #6
            ....
            I guess you are tring to run zabbix version 1.1.4, ok?

            and if you run, just:
            # ./zabbix_agentd -c <config_file>

            Comment

            • MrRobbert
              Member
              • Nov 2006
              • 50

              #7
              i dont know what i did, but i just restarted the server and suddenly it started to monitor that perticular server... i did everything here in this topic... i'll hope its stays monitored now...

              anyway everyone tnx for youre help...

              Comment

              • MrRobbert
                Member
                • Nov 2006
                • 50

                #8
                Oke now its very strange, but now again i get the same message and my zabbix server doesnt reconnect again... Anybody knows what i can do about this?

                Comment

                • cadbury
                  Member
                  • Apr 2005
                  • 77

                  #9
                  can you post a ls -al of the directories /var/run/zabbix and /var/log/zabbix ?

                  on your first post, in the config file, you have
                  PidFile=/var/run/zabbix/agentd.pid

                  but in your ls, it shows
                  /var/run/zabbix/zabbix_agentd.pid

                  not quite the same ...

                  Comment

                  • MrRobbert
                    Member
                    • Nov 2006
                    • 50

                    #10
                    Hi it is...


                    root@VMWARESERVER01:/var/log/zabbix# ls -l
                    total 0
                    -rwxrwxrwx 1 root root 0 2006-11-20 09:51 agentd.log
                    -rwxrwxrwx 1 root root 0 2006-11-21 12:19 agent.log


                    --- and

                    root@VMWARESERVER01:/var/run/zabbix# ls -l
                    total 0
                    -rwxrwxrwx 1 root root 0 2006-11-27 09:41 agentd.pid


                    --- and

                    root@VMWARESERVER01:/var/run/zabbix# /etc/init.d/zabbix-agent restart
                    Stopping Zabbix agent: zabbix_agentd
                    No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.
                    Starting Zabbix agent: zabbix_agentd



                    --- Log files are empty...

                    Grz Robbert

                    Comment

                    • cadbury
                      Member
                      • Apr 2005
                      • 77

                      #11
                      ok i saw that, but ps -l is not ps -al

                      Comment

                      • MrRobbert
                        Member
                        • Nov 2006
                        • 50

                        #12
                        ow yeah srry

                        root@VMWARESERVER01:/var/log/zabbix# ps -al
                        F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
                        4 S 0 7203 3827 0 76 0 - 1009 - tty1 00:00:00 bash
                        0 R 0 22883 22588 0 76 0 - 550 - pts/1 00:00:00 ps


                        root@VMWARESERVER01:/var/run/zabbix# ps -al
                        F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
                        4 S 0 7203 3827 0 76 0 - 1009 - tty1 00:00:00 bash
                        0 R 0 22893 22588 0 75 0 - 550 - pts/1 00:00:00 ps


                        Grz Robbert

                        Comment

                        • cadbury
                          Member
                          • Apr 2005
                          • 77

                          #13
                          my bad it's ls -al not ps

                          Comment

                          • MrRobbert
                            Member
                            • Nov 2006
                            • 50

                            #14
                            lol

                            root@VMWARESERVER01:/var/run/zabbix# ls -al
                            total 0
                            drwxr-xr-x 2 root root 60 2006-11-27 09:41 .
                            drwxr-xr-x 8 root root 540 2006-11-27 09:40 ..
                            -rwxrwxrwx 1 root root 0 2006-11-27 09:41 agentd.pid
                            root@VMWARESERVER01:/var/run/zabbix# ls -al /var/log/zabbix/
                            total 8
                            drwxrwx--- 2 zabbix adm 4096 2006-11-21 12:19 .
                            drwxr-xr-x 7 root root 4096 2006-11-27 06:25 ..
                            -rwxrwxrwx 1 root root 0 2006-11-20 09:51 agentd.log
                            -rwxrwxrwx 1 root root 0 2006-11-21 12:19 agent.log

                            Comment

                            • cadbury
                              Member
                              • Apr 2005
                              • 77

                              #15
                              ok

                              the owner of the /var/run/zabbix dir is root, and write acces is only set for root,
                              what i do is set zabbix as owner and don't change the rights, they are good.

                              assuming a user zabbix exists,
                              just make a
                              chown zabbix /var/run/zabbix/
                              and
                              chown zabbix /var/run/zabbix/*

                              to be fully correct, also run :
                              chmod 664 /var/run/zabbix/*

                              and for the log dir :
                              chmod 755 /var/log/zabbix/
                              chown zabbix /var/log/zabbix/*
                              chmod 664 /var/log/zabbix/*

                              I think that will make it
                              repost ls -al after modifications, just to be sure

                              Comment

                              Working...