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

Uptime-kuma + Traefik issue stuck on look to connect to socket server

arminmacx 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

I recently try to add uptime to my homelab but when i try that with traefik as my reverse proxy, uptime dashboard refresh and gave error that it cannot connect to socker server. I laready read the uptime dock about how to add uptime to traefik and watch few youtube videos too but still its not working.

my config on uptime docker-compsoe file is like this:

version: "3.8"

services:
  uptime-kuma:
    image: louislam/uptime-kuma:latest
    container_name: uptime-kuma
    volumes:
      - ./data:/app/data
    ports:
      - 3001:3001
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    networks:
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.uptime-kuma.entrypoints=http"
      - "traefik.http.routers.uptime-kuma.rule=Host(`uptime-kuma.local.MYDOMAIN`)"
      - "traefik.http.middlewares.uptime-kuma-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
      - "traefik.http.routers.uptime-kuma.middlewares=uptime-kuma-https-redirect"
      - "traefik.http.routers.uptime-kuma-secure.entrypoints=https"
      - "traefik.http.routers.uptime-kuma-secure.rule=Host(`uptime-kuma.local.MYDOMAIN`)"
      - "traefik.http.routers.uptime-kuma-secure.tls=true"
      - "traefik.http.routers.uptime-kuma-secure.service=uptime-kuma"
      - "traefik.http.services.uptime-kuma.loadbalancer.server.port=3001"
      - "traefik.docker.network=proxy"

networks:
  proxy:
    external: true

and i even add these to my middlewares in traefik config.yml :

default-headers:
      headers:
        sslRedirect: true
        frameDeny: true
        browserXssFilter: true
        contentTypeNosniff: true
        forceSTSHeader: true
        stsIncludeSubdomains: true
        stsPreload: true
        stsSeconds: 15552000
        customFrameOptionsValue: SAMEORIGIN
        customRequestHeaders:
          X-Forwarded-Proto: https

and the log on uptime docker shows this continusly :

2024-04-12T14:48:58+03:30 [AUTH] INFO: Username from JWT: admin
2024-04-12T14:48:58+03:30 [AUTH] INFO: Successfully logged in user admin. IP=172.19.0.2
2024-04-12T14:48:59+03:30 [SOCKET] INFO: New polling connection, IP = 172.19.0.2
2024-04-12T14:48:59+03:30 [AUTH] INFO: Login by token. IP=172.19.0.2
2024-04-12T14:48:59+03:30 [AUTH] INFO: Username from JWT: admin

but still not working, and i check other issue i found on github but still nothing works and dashboard stuck on infinit loop to connect to socker server

πŸ“ Error Message(s) or Log

No response

🐻 Uptime-Kuma Version

1.23.11

πŸ’» Operating System and Arch

Ubuntu 22.04

🌐 Browser

Microsoft Edge

πŸ–₯️ Deployment Environment

  • Runtime: Docker 26.0
  • Database:
  • Filesystem used to store the database on:
  • number of monitors:

Have you taken a look at this? #4669

Have you taken a look at this? #4669

unfortunalty i didnt read that, thanks that solve my problem as its look like traefik would update it later to fix the issue.

for others who may have the same problem as me you need to add this to your traefik.yml under your https :

transport:
      respondingTimeouts:
        tcp:
          lingeringTimeout: 180

@arminmacx and others, please NOTE: you need to remove the settings before you upgrade to Traefik v2.11.2 or v3.0.0-rc5. Otherwise it will fail to start.