zabbix / zabbix-docker

Official Zabbix Dockerfiles
https://www.zabbix.com
GNU Affero General Public License v3.0
2.4k stars 1.38k forks source link

Centos zabbix-server-mysql 7.0.3 : hostname command not found #1512

Closed grunlab closed 2 months ago

grunlab commented 2 months ago

The command hostname is missing into the Centos zabbix-server-mysql 7.0.3 image:

$ kubectl logs server-0
...
...
** Updating '/etc/zabbix/zabbix_server.conf' parameter "SMSDevices": ''...removed
/usr/bin/docker-entrypoint.sh: line 539: hostname: command not found
** Updating '/etc/zabbix/zabbix_server.conf' parameter "HANodeName": ''...removed
/usr/bin/docker-entrypoint.sh: line 546: hostname: command not found
** Updating '/etc/zabbix/zabbix_server.conf' parameter "NodeAddress": ':10051'...added
** Updating '/etc/zabbix/zabbix_server.conf' parameter "User": 'zabbix'...added
** Updating '/etc/zabbix/zabbix_server.conf' parameter "WebDriverURL": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "StartBrowserPollers": ''...removed
zabbix_server [1]: ERROR: invalid "NodeAddress" configuration parameter: address ":10051" is invalid
...
...
$ kubectl exec server-0 -ti -- ls -l /usr/bin/hostname
ls: cannot access '/usr/bin/hostname': No such file or directory

This command is needed into the docker-entrypoint.sh to setup HANodeName & NodeAddress: https://github.com/zabbix/zabbix-docker/blob/7.0/Dockerfiles/server-mysql/rhel/docker-entrypoint.sh#L548

Thank you for your support

dotneft commented 2 months ago

Thank you! Fixed! CentOS just removed hostname tool from installed packages. Please wait new latest image or 7.0.4.

grunlab commented 2 months ago

Hi, I confirm that it is now OK when using the current latest tag:

$ kubectl exec -ti server-0 -- hostname
server-0

Thank you for this quick fix.