Ad Widget

Collapse

static zabbix_agentd not starting for RHEL 5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • storm
    Member
    • Jan 2012
    • 37

    #1

    static zabbix_agentd not starting for RHEL 5

    Hello all,

    I built zabbix agent on a RHEL 5 box using "./configure --prefix=/tmp/zabbix/zabbix-1.8.10/installhere/ --enable-static --enable-agent". Everything seems to have compiled OK. After doing the make install, I manually copied files into place and setup everything as follows:

    groupadd zabbix
    useradd -c 'Zabbix' -d / -g zabbix -M -s /sbin/nologin zabbix
    cp ./installhere/bin/zabbix_* /usr/bin
    cp ./installhere/sbin/zabbix_agent* /usr/sbin
    mkdir /etc/zabbix
    cp ./zabbix_agentd.conf /etc/zabbix/
    cp ./misc/init.d/redhat/8.0/zabbix_agentd /etc/init.d/
    chown root:root /etc/init.d/zabbix_agentd
    chmod 744 /etc/init.d/zabbix_agentd
    chkconfig --add zabbix_agentd
    chkconfig zabbix_agentd on

    Made appropriate changes to /etc/zabbix/zabbix_agentd.conf and /etc/init.d/zabbix_agentd

    ran /etc/init.d/zabbix_agentd start
    Ran fine

    Then I tar balled the files listed above and moved them to another server also running RHEL 5. Did, as best I can tell, all the same things but this time it fails. Starting the daemon directly gives "Segmentation fault (core dumped)". tailing /var/log/messages shows the following lines.

    Apr 9 16:41:23 chuck kernel: zabbix_agentd[22143]: segfault at 26 ip 00000000004a73e1 sp 00007fff8ec320c0 error 4 in zabbix_agentd[400000+e2000]
    Apr 9 16:41:23 chuck abrt[22144]: saved core dump of pid 22143 (/usr/sbin/zabbix_agentd) to /var/spool/abrt/ccpp-2012-04-09-16:41:23-22143.new/coredump (299008 bytes)
    Apr 9 16:41:23 chuck abrtd: Directory 'ccpp-2012-04-09-16:41:23-22143' creation detected
    Apr 9 16:41:23 chuck abrtd: Executable '/usr/sbin/zabbix_agentd' doesn't belong to any package
    Apr 9 16:41:23 chuck abrtd: Corrupted or bad dump /var/spool/abrt/ccpp-2012-04-09-16:41:23-22143 (res:2), deleting

    What am I doing wrong?

    Thank you,
    Mike
  • CeeEss
    Senior Member
    Zabbix Certified Specialist
    • Nov 2007
    • 103

    #2
    Q: If you're copying agentd between RHEL5 machines, why build it static?

    Comment

    • storm
      Member
      • Jan 2012
      • 37

      #3
      I thought building static was the way to do that; otherwise I would have to compile it on every server; is this not right? Still trying to learn my way around Zabbix.

      Mike

      Comment

      • CeeEss
        Senior Member
        Zabbix Certified Specialist
        • Nov 2007
        • 103

        #4
        You're ok if you built agent on a machine running the same major RHEL version as the machines you're distributing to - i do this for a renderfarm running CentOSes btwn 5.3 and 5.8 and workstations running a couple of different CentOS6's (built an agent on each of the CentOSes) with no problems - i just fling it to a system as a tarball, ssh to the host, unpack,etc via a script and run it. Works fine across kernel updates, too. The only time i tried static was when i was distributing zabbix_proxy across different oBSD versions and IIRC it never worked particularily well. There may be earlier discussions in Forums or in ZBX bug/dev tickets discussing static builds and issues encountered. Agentd doesn't require all of prereqs needed to build server. And, of course, distribute the newer agentd, not vanilla agent.

        regards,

        Comment

        • storm
          Member
          • Jan 2012
          • 37

          #5
          Thank you for your replies. When building agentd, do you use the --diable-server option?

          Comment

          • CeeEss
            Senior Member
            Zabbix Certified Specialist
            • Nov 2007
            • 103

            #6
            I've only used "--enable-agent" - at least there's been no complaints from configure about missing server --enable-xxx's, which you would otherwise expect when building server or proxy

            Comment

            Working...