[ZBX-26350] fping not working in Alpine Zabbix server container images Created: 2025 Apr 23 Updated: 2025 Apr 29 Resolved: 2025 Apr 28 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Packages (C) |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Problem report | Priority: | Trivial |
| Reporter: | Blake Basom | Assignee: | Marks Sunins (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Team: | |
| Sprint: | Sprint candidates |
| Story Points: | 0.5 |
| Description |
|
First, let me say that I think this is similar to The issue is that fping doesn't have the suid bit set in the Alpine Zabbix server container, so ping attempts (using the standard "icmpping" Item) fail with an error like the following: /usr/sbin/fping: can't create socket (must run as root?) We are currently using this container: docker.io/zabbix/zabbix-server-mysql:alpine-7.0.10 But the issue appears to be with all recent Alpine server or proxy containers. And it appears that it is due to a change that was introduced in the alpine 3.16 release. Prior to that, the suid bit was set for the fping binary. In the attached file (screenshot1.jpg), you can see the difference between alpine 3.15 and 3.16. We are able to get around this issue by setting the permissions on the fping binary (see the bottom of the issue reported here for an example), but we were thinking that this might be something that you can fix in the alpine Zabbix server and proxy containers. |
| Comments |
| Comment by Alexander Vladishev [ 2025 Apr 27 ] |
|
Thank you for reporting it! I confirm this issue. |
| Comment by Marks Sunins (Inactive) [ 2025 Apr 28 ] |
|
Fixes present: Proposed solution (recommended): update used container image to latest minor version. Related GitHub issue: 1084. Details: By default, Linux networking subsystem has ping_group_range parameter set to allow ICMP for privileged users only. Docker will inherit sys.net parameters from the host system if none specific configuration provided. In terms of the issue, it means that default zabbix user is not capable of creating a fping socket. As mentioned in a related issue, there are numbers of workarounds, if a user can not upgrade running container image. Workaround:
docker run --sysctl net.ipv4.ping_group_range="<GROUP_ID_MIN> <GROUP_ID_MAX>" docker.io/zabbix/zabbix-server-mysql:alpine-7.0.10 ...
docker run --sysctl net.ipv4.ping_group_range="0 2147483647" docker.io/zabbix/zabbix-server-mysql:alpine-7.0.10 ...
|