无法使用 traefik 的仪表板绑定到端口 8080



我有以下traefik配置文件:

debug = true
logLevel = "DEBUG"
[entryPoints]
[entryPoints.http]
address = ":80"
compress = true
[entryPoints.dashboard]
address=":81"
[entryPoints.dashboard.auth]
[entryPoints.dashboard.auth.basic]
users = [
"admin:-------"
]
[traefikLog]
[accessLog]
[api]
dashboard = true
entryPoint = "dashboard"
[ping]
[docker]

以及 docker 编写中的以下路由:

- ‘5080:80’
- ‘5443:443’
- ‘5000:81’

这就像执行的那样工作,仪表板可以从端口 5000 的外部访问。

当我将仪表板端口更改为 8080 并将其反映在映射中时出现问题('5000:8080'(

我收到以下错误:

level=error msg="Error opening listener listen tcp :8080: bind: address already in use" 
level=fatal msg="Error preparing server: listen tcp :8080: bind: address already in use" 

问题是我没有看到正在使用 8080:

[root@ns3106050 ~]# lsof -i -P -n | grep LISTEN
sshd      1276   root    3u  IPv4    515      0t0  TCP *:22 (LISTEN)
sshd      1276   root    4u  IPv6    517      0t0  TCP *:22 (LISTEN)
dockerd   1277   root    6u  IPv6   5955      0t0  TCP *:2376 (LISTEN)
docker-pr 5425   root    4u  IPv6  24484      0t0  TCP *:5443 (LISTEN)
docker-pr 5436   root    4u  IPv6  24492      0t0  TCP *:5000 (LISTEN)
docker-pr 5447   root    4u  IPv6  22391      0t0  TCP *:5080 (LISTEN)

我能错过什么?

确保在docker-compose 文件中没有为 traefik 命令指定--api标志。CLI 和 toml 配置不能协同工作。

最新更新