Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5234

zabbix_agentd daemonizes improperly if hostname is not set.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.0.0
    • Agent (G)
    • None
    • ubuntu LTS 12.04

      Ubuntu upstart and possibly other init systems, rely on the fact that the zabbix_agentd will fork twice to track the pid of the zabbix_agent. The upstart config file included in zabbix is configured that way.

      However before zabbix_agent daemonizes itself it may start various system tools to query information. In my case, it would start 'hostname' first to query the current hostname since it wasn't specified in the agent config file. (why not use gethostname directly??). Due to this, upstart would track the wrong pid and wasn't able to stop it.

      Now there may be multiple solutions to this, including having upstart use the PID file (if that's possible), but I think it would be more proper if zabbix_agentd doesn't start any other processes until it has properly daemonized itself.

      This bug may possibly also be present in zabbix_proxy and zabbix_server.

            Unassigned Unassigned
            gogglesguy Sander Jansen
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: