Replies: 6 comments 1 reply
|
You do have a Dozzle that is two versions old. So I would try updating first. Meanwhile, I'll see if I can reproduce this. Over 10K people are using agent so I don't think this is related to Dozzle. What is |
|
I did more research.
This is happening because of attach/exec shell session. Which is normal. You might have closed the websocket while it was writing.
This is also normal because Dozzle will listen on stats and stop the collector after a few hours of inactivity.
This is the only real error that suggests something is wrong with TLS handshake. It could be related to Caddy or something else. I would move its own network. I have also updated some of the flags at #4474. But I really doubt it would fix it. |
|
The flag changes are in |
|
I'll try it. Caddy is running for handling https to dozzle server to connect to the server from WAN. Nothing to do with dozzle server to agent comms. I'll keep testing. Dozzle agent is running in a docker container separately from the dozzle server running on a different server and docker container. TLS was generated on local machine and uploaded to both server and agent docker containers. |
|
That's what I figured. Other people are using agents so I am not sure what is different about your system that is causing Dozzle to stop connecting. When this happens, it would be good to help investigate. The healthcheck reuses the same certs to check for connection. I think doing a thread dump would help. If it happens again, I would also bounce the UI server to see if it's actually related to the client for some reason. The agent is pretty stable for me so it might something related to the custom certs that I haven't noticed. |
|
Any update on this? No one else seems to have this problem so I am wondering what is going on. |
Uh oh!
There was an error while loading. Please reload this page.
🔍 Check for existing issues
How is Dozzle deployed?
Agents
📦 Dozzle version
v10.0.2
✅ Command used to run Dozzle
Dozzle Server (on Host A):
Dozzle Agent (on Host B):
🐛 Describe the bug / provide steps to reproduce it
Summary: The Dozzle agent's gRPC listener silently stops accepting new TLS connections after running for ~2 days. The agent process remains alive, the TCP port stays open, and the built-in healthcheck (
/dozzle healthcheck) continues to report healthy. However, all new gRPC connections from the server fail with a TLS handshake error.Setup:
Timeline of failure:
Agent starts normally (Day 0):
Agent encounters errors (~48 hours later):
After these errors, the agent produces no further log output — the gRPC listener appears to enter a zombie state.
Server continuously fails to connect:
Initially
connection reset by peer, then transitions tocontext deadline exceeded:Agent healthcheck still reports healthy despite being unable to serve connections:
Key observations:
runningwithhealthyhealth status throughout the failuredocker restart dozzle-agent) resolves the issue"clients":2,"message":"Connected to Docker")Steps to reproduce:
Workaround: Restart the dozzle-agent container.
Suggested fix: The agent's gRPC goroutine appears to crash/hang after certain Docker socket errors (
context canceled,use of closed network connection) without recovering or exiting. Either:restart: unless-stoppedto bring it back cleanly)healthyeven when the gRPC listener cannot accept new connections💻 Environment
Agent host (Host B):
Server host (Host A):
📜 Dozzle logs are required for debugging purposes. You may need to enable debug mode. See https://dozzle.dev/guide/debugging.
Agent logs (full sequence from start to failure):
{"level":"info","version":"v10.0.2","cert":"/certs/dozzle_cert.pem","key":"/certs/dozzle_key.pem","time":"2026-02-20T10:18:36Z","message":"Loaded custom dozzle certificate and key"} {"level":"info","version":"v10.0.2","time":"2026-02-20T10:18:36Z","message":"Dozzle agent version v10.0.2"} {"level":"info","version":"v10.0.2","time":"2026-02-20T10:18:36Z","message":"Agent listening on [::]:7007"} {"level":"error","version":"v10.0.2","error":"rpc error: code = Canceled desc = context canceled","time":"2026-02-22T01:28:28Z","message":"error while reading event"} {"level":"error","version":"v10.0.2","error":"rpc error: code = Canceled desc = context canceled","time":"2026-02-22T01:28:28Z","message":"error while reading event"} {"level":"error","version":"v10.0.2","error":"rpc error: code = Canceled desc = context canceled","time":"2026-02-22T01:28:28Z","message":"error while reading event"} {"level":"error","version":"v10.0.2","error":"read unix @->/run/docker.sock: use of closed network connection","time":"2026-02-22T01:28:28Z","message":"error while writing to ws"} {"level":"info","version":"v10.0.2","host":"host-b","time":"2026-02-22T07:26:57Z","message":"stopped container stats collector"}Server logs (connection failures — representative sample):
{"level":"warn","version":"v10.0.2","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: authentication handshake failed: read tcp 172.19.0.6:39036->10.0.0.2:7007: read: connection reset by peer\"","host":"host-b","time":"2026-02-22T18:32:53Z","message":"error fetching host info for client"} {"level":"warn","version":"v10.0.2","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: authentication handshake failed: context deadline exceeded\"","host":"host-b","time":"2026-02-23T09:28:36Z","message":"error fetching host info for client"} {"level":"warn","version":"v10.0.2","error":"host <agent-id> unavailable: rpc error: code = Unavailable desc = connection error: desc = \"transport: authentication handshake failed: context deadline exceeded\"","time":"2026-02-23T09:33:25Z","message":"error listing containers"}Server logs after both containers restarted (connection restored):
{"level":"info","version":"v10.0.2","time":"2026-02-23T09:37:39Z","message":"Dozzle version v10.0.2"} {"level":"info","version":"v10.0.2","cert":"/certs/dozzle_cert.pem","key":"/certs/dozzle_key.pem","time":"2026-02-23T09:37:39Z","message":"Loaded custom dozzle certificate and key"} {"level":"info","version":"v10.0.2","clients":2,"time":"2026-02-23T09:37:39Z","message":"Connected to Docker"} {"level":"info","version":"v10.0.2","time":"2026-02-23T09:37:39Z","message":"Accepting connections on :8080"}📸 If applicable, add screenshots to help explain your bug
N/A
All reactions