[ZBX-4950] agent cannot get hostname in LXC client Created: 2012 May 07  Updated: 2017 May 30  Resolved: 2012 Jul 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 1.8.12
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: Harri Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: linux
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian LXC server and client



 Description   

If I run zabbix_agentd in an LXC client, then it fails to start with

  1. zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
    zabbix_agentd [943]: ERROR: invalid host name: []

The log file is not written at all, even with Debug=4.

If I don't define a Hostname in zabbix_agentd.conf, then there is no such problem.

This might be related: On the client command line I get

  1. hostname
    tricia
  2. cat /etc/hostname
    tricia.mydomain.de
  3. hostname --fqdn
    hostname: Name or service not known

It seems that the domain name part is cut off in the LXC client. On a real system "hostname" would have reported "tricia.mydomain.de", and "hostname --fqdn" wouldn't fail.



 Comments   
Comment by Harri [ 2012 Jul 01 ]

problem went away

Generated at Fri Apr 11 18:28:10 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.