Ad Widget

Collapse

Problem starting pre-compiled agent on Linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • qix
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2006
    • 423

    #1

    Problem starting pre-compiled agent on Linux

    Hello all,

    I have a problem with starting one of the precompiled agents I downloaded from the Zabbix website.
    I placed it in /usr/sbin and created the zabbix user. Furthermore, the config file is in /etc/zabbix/zabbix_agentd.conf.

    What happens is the following:

    Code:
    root@dboran01:~# /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
    zabbix_agentd [5016]: User zabbix does not exist.
    zabbix_agentd [5016]: Cannot run as root !
    root@dboran01:~# su - zabbix
    zabbix@dboran01:~$ /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
    zabbix@dboran01:~$ ps ax | grep zabbix
     5017 pts/0    S      0:00 su - zabbix
     5023 ?        SN     0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
     5024 ?        RN     0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
     5025 ?        SN     0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
     5026 ?        SN     0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
     5027 ?        SN     0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
     5028 ?        SN     0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
     5030 pts/0    S+     0:00 grep zabbix
    zabbix@dboran01:~$
    The agent doesn't change to zabbix user by itself. When I change to the zabbix user and then start the agent, everything works fine. Collection from the Zabbix server also starts.

    What am I missing here?
    With kind regards,

    Raymond
  • vinny
    Senior Member
    • Jan 2008
    • 145

    #2
    I have already seen this behaviour once..
    this seems to happen when a C function is not properly functioning (function that gets the passwd information), maybe because of gcc difference between ur server and the one used to build the precompiled agent.

    To solve it, I had to compile the agent by hand.

    vinny
    -------
    Zabbix 1.8.3, 1200+ Hosts, 40 000+ Items...zabbix's everywhere

    Comment

    • qix
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Oct 2006
      • 423

      #3
      Hi Vinny,

      Thanks for the reply.
      I'm quite reluctant to compile the agent by hand on every linux box we have here beacuse that would mean an additional install of quite a lot of packages I'd rather not have on these machines. (not to mention it's time wasting)

      Maybe I can build the agent by hand with static linking and copy the binary to the client servers.
      With kind regards,

      Raymond

      Comment

      • vinny
        Senior Member
        • Jan 2008
        • 145

        #4
        In fact, i install the agent nearly a thousand times & i faced this problem once...
        so the ratio is ok for such a good tool.

        The problem may come from the server on which u build the agent.

        vinny
        -------
        Zabbix 1.8.3, 1200+ Hosts, 40 000+ Items...zabbix's everywhere

        Comment

        • qix
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2006
          • 423

          #5
          solved!

          I downloaded the pre-build 1.4.4 binary from the Zabbix website and tried to start that on a server that previously had 1.1.3 installed as a Debian package (purged it with dpkg first). Then I ran into the mentioned problem.

          After your advice I did a build of the 1.4.4 agent with static linking on one of our Zabbix servers and copied the resulting binary over the one on the client server I downloaded from the website.
          My self build binary started without any problems this time.

          So my problem is now solved, thank you very much for the help!
          With kind regards,

          Raymond

          Comment

          • prote
            Junior Member
            • Dec 2008
            • 16

            #6
            I had same problem while testing an installation script for a SuSE-Server on a Debian-Lenny-machine. The precompiled 1.4.4 can't get startet, no logs and no errors will be prompted when run as init-script. Starting the Agent directly it complains about the needed zabbix-user, which was on the system. After reading this thread everything was clear: the same precompiled agent runs without a problem on SuSE and for Debian you can use the agent via apt-get (1.4.6 for Lenny, 1.6.2 for testing)
            Last edited by prote; 23-01-2009, 00:55.

            Comment

            Working...