louislam / uptime-kuma

A fancy self-hosted monitoring tool

Home Page:https://uptime.kuma.pet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setpriv: unrecognized option '--host=tcp://u-docker-socke-proxy:2375'

ThierryIT opened this issue · comments

⚠️ Please verify that this question has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

Hello,
Using Uptime-kuma with Traefik.
Things are working well, but I have add a socket-proxy and now there is this error message:

setpriv: unrecognized option '--host=tcp://u-docker-socke-proxy:2375'

idea ?

📝 Error Message(s) or Log

setpriv: unrecognized option '--host=tcp://u-docker-socke-proxy:2375'

🐻 Uptime-Kuma Version

1.23.11

💻 Operating System and Arch

linux / compose file

🌐 Browser

brave

🖥️ Deployment Environment

running with docker compose v2.20.2

`services:
  uptime-kuma:
    image: louislam/uptime-kuma:1.23.11
    security_opt:
      - no-new-privileges:true
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.uptime-kuma.rule=Host(`uptime-kuma.domain.tld`)"
      - "traefik.http.routers.uptime-kuma.entrypoints=https-external"
      - "traefik.http.routers.uptime-kuma.service=uptime-kuma"
      - "traefik.http.services.uptime-kuma.loadbalancer.server.port=3001"
      - "com.centurylinklabs.watchtower.enable=true"
    #environment:
      #UPTIME_KUMA_REMOTE_HOST: tcp://u-docker-socket-proxy:2375
    command:
      - '--host=tcp://u-docker-socke-proxy:2375'
    volumes:
      - /mnt/user/appdata/docker/kuma/data:/app/data
    

    ports:
      # <Host Port>:<Container Port>
      - 3001:3001
    restart: unless-stopped

  dockerproxy:
    image: wollomatic/socket-proxy:1
    container_name: u-docker-socket-proxy
    command:
      - '-loglevel=info'
      - '-allowfrom=0.0.0.0/0' # allow only access from the "watchtower" service
      - '-listenip=0.0.0.0'
      - '-shutdowngracetime=10'
      # this whitelists the API endpoints that watchtower needs:
      - '-allowGET=/v1\..{2}/(containers/.*|images/.*)'
      - '-allowPOST=/v1\..{2}/(containers/.*|images/.*|networks/.*)'
      - '-allowDELETE=/v1\..{2}/(containers/.*|images/.*)'
      # check socket connection every hour and stop the proxy if it fails (will then be restarted by docker):
      - '-watchdoginterval=3600'
      - '-stoponwatchdog'
    restart: unless-stopped
    read_only: true
    mem_limit: 64M
    cap_drop:
      - ALL
    security_opt:
      - no-new-privileges
    user: 65534:995 # change gid from 998 to the gid of the docker group on your host
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    labels:
      - com.centurylinklabs.watchtower.enable=false # if watchtower would try to update the proxy, it would just stop
    networks:
      - socket_u
networks:
  socket_u:
    internal: true
    attachable: false
  mynet:
    driver: bridge
    attachable: false`

If I comment command: - '--host=tcp://u-docker-socke-proxy:2375' and uncomment: UPTIME_KUMA_HOST: tcp://u-docker-socket-proxy:2375 I have now an 2024-04-09T08:24:59+03:00 [SERVICES] INFO: Starting nscd Cannot listen: getaddrinfo ENOTFOUND tcp://u-docker-socket-proxy:2375

How to pass the right command to Kuma ? Or is it a problem with Docker who can not find my u-docker-socket-proxy ??

What are you trying to do here in the first place?

  • You seem to have traefik configured and
  • are using some sort of proxy for something and
  • seem to have configured some networks

uptime-kuma cannot bind to the dns name and port owned by dockerproxy which is in a different network.
What are you trying to use UPTIME_KUMA_REMOTE_HOST (I can't find such an option) for?
Confused.

It's about running uptime-kuma without mounting the docker socket directly in the uptime-kuma-container.
And it works: wollomatic/socket-proxy#9 (my answer to the crossposted question)

@ThierryIT Check your speling: --host=tcp://u-docker-socke**t**-proxy:2375