uptime-kuma: Version 1.7.0 breaks ping for local devices

Describe the bug After updating to version 1.7.0, all my ping monitors for local devices are broken. Prior to v1.7.0 these worked just fine - for example:

Monitor type: Ping Hostname: local IP address - i.e. 192.168.1.21

The above worked just fine before updating to v1.7.0, but now they’re all borked.

To fix, I have to change to:

Monitor type: TCP Port Hostname: local IP address - i.e. 192.168.1.21 Port: 80 (for example, I’m running Pi-Hole on the above local IP address so port 80 is the web UI).

Expected behavior The pings should work still as nothing has changed. Testing manually via a terminal (i.e. ping 192.168.1.21 -c 10 works as expected. The expected behaviour is that the ping monitor should “just work”.

Info Uptime Kuma Version: 1.7.0 Using Docker?: Yes Docker Version: 20.10.3 build b35e731 OS: Synology DSM Browser: Brave / Chrome

Error Log "Device name": Failing: ping: socket: Operation not permitted

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Update: @louislam / @nbvcxz - running as root on the latest image resolves the issue, so definitely a permissions issue.

I’m using a compose file with version 3.5, so the parameters are:

    environment:
      - PUID=0
      - PGID=0

Hope this helps!

Fixed in 1.7.1.

Will try to find out how to reproduce the problem.

I think it is related to #373. The symptoms are very similar.

As Alpine is still working, it is probably not related to the user problem.

I suspect that it could be Synology DSM’s Docker which disabled many Capability Keys by default.

@nbvcxz I would, but it’s a relatively large file that also handles other services like Sonarr, Radarr, NZBGet etc., so I’ve simply provided the relevant parts for the Uptime Kuma container. I’ll add as much as I can that will be relevant.

version: '3.5'
services:
  uptime-kuma:
    image: louislam/uptime-kuma:1-alpine
    container_name: uptime-kuma
    stdin_open: true
    cap_add:
      - NET_RAW
    tty: true
    networks:
        home-media:
            ipv4_address: 172.20.0.13
    restart: unless-stopped
    volumes:
      - ${UPTIME_KUMA_DATA_PATH}:/app/data
    ports:
      - 3001:3001

networks:
  home-media:
    driver: bridge
    name: home-media
    ipam:
        driver: default
        config:
        - subnet: 172.20.0.0/16
          gateway: 172.20.0.1
          ip_range: 127.20.0.1/24

And from my .env file:

UPTIME_KUMA_DATA_PATH=/volume1/docker/uptime-kuma/data

So with those combined, this is what you would expect from the docker-compose.yml file:

version: '3.5'
services:
  uptime-kuma:
    image: louislam/uptime-kuma:1-alpine
    container_name: uptime-kuma
    stdin_open: true
    cap_add:
      - NET_RAW
    tty: true
    networks:
        home-media:
            ipv4_address: 172.20.0.13
    restart: unless-stopped
    volumes:
      - /volume1/docker/uptime-kuma/data:/app/data
    ports:
      - 3001:3001

networks:
  home-media:
    driver: bridge
    name: home-media
    ipam:
        driver: default
        config:
        - subnet: 172.20.0.0/16
          gateway: 172.20.0.1
          ip_range: 127.20.0.1/24

NOTE: The file above is now using the 1-alpine image as recommended by @louislam earlier.

I suggest @raspberrycoulis should try louislam/uptime-kuma:1-alpine.

This fixes the issue @louislam - as in, the local pings work again.