Ad Widget

Collapse

PATCH: 1.1.4: hostname detection in zabbix_agentd

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ekenberg
    Junior Member
    • Mar 2006
    • 21

    #1

    PATCH: 1.1.4: hostname detection in zabbix_agentd

    After upgrading from 1.1beta8 to 1.1.4, zabbix_agentd doesn't start. It also provides no logging or clues what so ever about the cause.

    After debugging step by step with printf() statements, it appears that:

    1. zabbix_agentd won't start because it can't get the current hostname by running the command `hostname`
    2. zabbix_agentd.c tries to log the error before exiting, but nothing is written to the logs because the logs are not yet opened at this point. Seems that opening logs has been delayed for fear of having them opened as root. Maybe that's good, but it's bad not to have any errors reported, and to have useless log-statements left in the code.

    The cause for 1. seems to be that the result from `hostname` is returned as type AR_TEXT instead of the expected AR_STRING. The attached patch attempts to fix this by also accepting AR_TEXT (it works for me).

    Probably 2. should be addressed as well, but I fear I'm not the right person to do this.

    Regards Johan Ekenberg
    /* Running Zabbix 1.1.4 with 2204 items on 312 hosts */
    Attached Files
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Thanks for reporting this. Fixed!
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    Working...