Viewing logs of the Traekif-Manager-Agent in the binary installation #119
Replies: 8 comments 4 replies
|
Yes. The binary installation runs TMA as a systemd service, so its stdout/stderr is in the system journal rather than a separate log file. Use: sudo systemctl status tma --no-pager -l
sudo journalctl -u tma -n 200 --no-pager
sudo journalctl -u tma -fThe last command follows new messages while you reproduce the error. This is the unit name used by the documented binary install: https://github.com/chr0nzz/traefik-manager/blob/e9ad656a3e27c9f0429b96de0c7e172753746ccd/docs/agent.md#install-via-binary For the suspected YAML permission issue, also inspect the exact unit configuration and path permissions: sudo systemctl cat tma
sudo namei -l /path/from/CONFIG_PATHThe service needs access not only to each sudo systemctl daemon-reload
sudo systemctl restart tmaIf |
|
Hi, thx for the answer. The only lines in journactl are those even if i reproduce the error : Jul 24 13:09:24 rev-prox-ext systemd[1]: Stopped tma.service - Traefik Manager Agent.
Jul 24 13:09:24 rev-prox-ext systemd[1]: Started tma.service - Traefik Manager Agent.
Jul 24 13:09:24 rev-prox-ext tma[4977]: 2026/07/24 13:09:24 TMA v1.7.3 listening on :8090 (traefik=https://urlobfuscated/, insecure-tls=false)On sur Traefik-Manager instance, there's a specific traefik-manager user who own the yaml files or conf.d folder. |
|
That 401 is the whole answer, and it's good news - it rules out permissions and TLS entirely. TMA reached your Traefik fine; Traefik's API replied 401 Unauthorized. So this isn't a yml permission issue at all (the binary agent runs as root anyway, and it never got that far). What's happening: The fix is to point the agent at Traefik's internal, unauthenticated API, not the public URL. On the same LXC as Traefik that's normally: which needs Traefik's admin API on sudo systemctl daemon-reload
sudo systemctl restart tmaYou can confirm which endpoint is which by curling from the LXC: curl -si http://localhost:8080/api/http/routers | head -1 # want: HTTP/1.1 200 OK
curl -si https://your-public-url/api/http/routers | head -1 # this is the one returning 401Point TMA at whichever returns One thing that's on me: the agent only returns these errors to the Manager UI and doesn't write them to its own journal, which is why |
|
Quick follow-up: rather than only pointing the agent at an unauthenticated API, the next release lets it authenticate to a protected Traefik API directly. Set TRAEFIK_API_USER and TRAEFIK_API_PASSWORD on the agent and it'll send basic auth on every Traefik API call, so you can keep your existing setup as-is. The installer will also ask for it when you tell it the API is behind basic auth. Shipping alongside the TMA_DEBUG logging in the same release. Thanks again for the detailed report - it turned into two improvements. |
|
Thx again and sorry to add you some more work ;-) Maybe it's because of my traefik.yml configuration : traefik:
address: :6081
http:
middlewares:
- auth@file
forwardedHeaders:
trustedIPs: 10.0.10.0/24
insecure: false
proxyProtocol:
trustedIPs: 10.0.10.0/24
insecure: false |
|
v1.8.0 is out, and it has two things aimed straight at what you hit here. You can now keep your authenticated Traefik API and give the agent credentials. Set
To upgrade your binary install, grab the new agent binary: sudo systemctl stop tma
sudo curl -fsSL https://github.com/chr0nzz/traefik-manager/releases/latest/download/tma-linux-amd64 -o /usr/local/bin/tma
sudo chmod +x /usr/local/bin/tma(swap Then add the credentials to and reload: sudo systemctl daemon-reload
sudo systemctl restart tmaThe startup line now reports whether auth and debug are active, so you can confirm it picked them up: sudo journalctl -u tma -n 20 --no-pager
# ...listening on :8090 (traefik=..., traefik-auth=true, debug=true)Give it a try and let me know how it goes. Thanks again for the detailed report - it's what drove both of these. |
|
That's not a permission problem either, and it's the same root cause as the 401 was not: the agent runs as root, so it reads What's happening: the Routes and Middlewares tabs are built from the dynamic-config files the agent reads at Check it: sudo systemctl cat tma | grep CONFIG_PATHIt should be your dynamic-config directory: Then: sudo systemctl daemon-reload
sudo systemctl restart tmaOne caveat: the agent reads |


Uh oh!
There was an error while loading. Please reload this page.
Is there any log availables of the TMA service binary ?
In fact, my installation of the binary TMA on a second LXC instance works (seen in green in Traefik-Manager) but makes errors :

Maybe it's a permission issue on yml files but without logs it's hard to investigate.
Thx.
All reactions