Skip to content

Internal healthcheck uses hardcoded port number #326

@EdRW

Description

@EdRW

Describe the bug

Hi 👋🏿 , currently after changing http.port in the tsdproxy.yaml, the internal healthcheck no longer sends requests to the correct port.

I think maybe the cause is the hardcoded port number in the code below 🤔

h, err := http.Get("http://127.0.0.1:8080/health/ready/")

Expected behavior

The healthcheck command will send requests to the port configured in tsdproxy.yaml.

My config

defaultproxyprovider: default
docker:
    local:
        host: unix:///var/run/docker.sock
        targethostname: 192.168.0.4
files: {}
tailscale:
    providers:
        default:
            authKey: ""
            controlurl: https://controlplane.tailscale.com
    datadir: /data/
http:
    hostname: 0.0.0.0
    port: 8081 # <=== port changed from 8080
log:
    level: info
    json: false
proxyaccesslog: true

Logs

Docker reports an unhealthy status.

$  docker compose ps

NAME                         IMAGE                       COMMAND        SERVICE    CREATED         STATUS                     PORTS
tailscale-proxy-tsdproxy-1   almeidapaulopt/tsdproxy:1   "/tsdproxyd"   tsdproxy   7 minutes ago   Up 7 minutes (unhealthy)   8080/tcp, 0.0.0.0:8081->8081/tcp, [::]:8081->8081/tcp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions