Ad Widget

Collapse

Zabbix Installation Ubuntu Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DSon
    Member
    • Sep 2009
    • 44

    #16
    Another thought..

    .. following on from the previous information, what I tried doing was switching to the zabbix user ("su - zabbix") and then running zabbix-server (again, with the stop|start|restart switches) and it still says permission denied creating the .PID file. There is also no new entry in the zabbix_server.log file when doing this.

    The zabbix user seems to have some sort of permissions problem - however it is confusing since during the server start up it is definitely getting further. What I mean is it seems to me that although the zabbix user account can't create the .PID (or a log file entry) when I use "su", at server start up when the zabbix_server process tries to start it definitely DOES creates a .PID file (therefore removing the previous one) AND it writes a log entry "unable to connect through myqsld.sock").

    Where do I check to find out what user the zabbix_server process is trying to run under (i.e. at server boot up)?

    DSon.

    Comment

    • SRH
      Junior Member
      • Oct 2009
      • 12

      #17
      Zabbix_Server Service

      Hi.

      First, thanks a lot for the installation instruction.

      So, i have the problem, that in the /etc/init.d/... is no zabbix File also i can't start the zabbix_service (/etc/zabbix/) manualy with sudo zabbix_server start. sudo agentd_agent start - it will work but when i check the services with ps -aef | grep zabbix, i can see 4 or 5 agentd services. Strange, isn't it?

      The Webfrontend works fine...
      I use Ubuntu Server LTS 8.04 with Zabbix-1.6.6

      Someone a idea? ( I follow exactly the installation instruction)

      By Roger

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #18
        Originally posted by SRH
        Hi.

        First, thanks a lot for the installation instruction.

        So, i have the problem, that in the /etc/init.d/... is no zabbix File also i can't start the zabbix_service (/etc/zabbix/) manualy with sudo zabbix_server start. sudo agentd_agent start - it will work but when i check the services with ps -aef | grep zabbix, i can see 4 or 5 agentd services. Strange, isn't it?

        The Webfrontend works fine...
        I use Ubuntu Server LTS 8.04 with Zabbix-1.6.6

        Someone a idea? ( I follow exactly the installation instruction)

        By Roger
        Sounds like you skipped copying the files into /etc/init.d/ below are the steps for doing that. By the way, when you get the agent started, you are going to see multiple instances of zabbix_agentd running. By default, I believe it is 5. Same with zabbix_server

        Anyway, follow these steps and you should be good to go:

        Copy the init.d scripts to the right spot:
        Code:
        sudo cp misc/init.d/debian/zabbix-server /etc/init.d
        sudo cp misc/init.d/debian/zabbix-agent /etc/init.d
        You may need to edit these script files as the compiled versions of the zabbix files is placed under /usr/sbin (/usr/bin in older versions).

        Code:
        sudo nano /etc/init.d/zabbix-server
        Look for the following line: 
        DAEMON=/home/zabbix/bin/${NAME}
        and replace it with: 
        DAEMON=/usr/sbin/${NAME} (old versions use /usr/bin/${NAME})
        Save and exit.

        Code:
        sudo nano /etc/init.d/zabbix-agent
        Look for the following line: 
        DAEMON=/home/zabbix/bin/${NAME}
        and replace it with: 
        DAEMON=/usr/sbin/${NAME}  (old versions use /usr/bin/${NAME})
        Save and exit.
        Now set the correct permissions and set ZABBIX to start when the machine boots:

        Code:
        sudo chmod 755 /etc/init.d/zabbix-server
        sudo update-rc.d zabbix-server defaults
        sudo chmod 755 /etc/init.d/zabbix-agent
        sudo update-rc.d zabbix-agent defaults
        When those steps are done, you should be able to start the server and agent with these commands:

        sudo /etc/init.d/zabbix-server start
        sudo /etc/init.d/zabbix-agent start

        and they should also auto-start on boot-up

        Comment

        • SRH
          Junior Member
          • Oct 2009
          • 12

          #19
          Done... but

          Hi tchjts1

          Thanks for your answear.

          So these steps are done. I made one mistake in the zabbix-server and zabbix-agent file - Wrong path and i execute update.

          When i try with the right path in both files and try to update again:
          System startup links for /etc/init.d/zabbix-server already exist.
          System startup links for /etc/init.d/zabbix-agent already exist.

          ???I think that is not importante when i execute the update syntax with the false path value in both file. Or I'm wrong? (i have no idea, how i can delete the startup link)???

          zabbix_server will not start when the server reboots.

          manualy sudo zabbix_server start - that works. By checking the log, zabbix_server had a problem to connect to the mysql. Now i fixed this problem and zabbix_server runs.

          sudo zabbix_agentd start works, too (but not after a reboot)

          By Roger
          Last edited by SRH; 12-10-2009, 19:49.

          Comment

          • troffasky
            Senior Member
            • Jul 2008
            • 567

            #20
            I suggest you read the MySQL tuning thread and then post a new question if that thread doesn't answer your questions.

            Comment

            • gospodin.horoshiy
              Senior Member
              • Sep 2008
              • 272

              #21
              Just a little extra: I suggest you add your zabbix user to adm group to:
              sudo adduser zabbix adm

              so you have priviligies to monitor log files on the server. (like /var/log/syslog)
              Zbx 2.0.4 on Debian and MYSQL5 on Ubuntu Server 64bit 8.04,
              200+ Win Agents, 50+ Linux Agents, 150+ Network Devices

              Comment

              Working...