[pbs-devel] [PATCH proxmox-backup] proxy: reduce log level for api_service() errors to log
Christian Ebner
c.ebner at proxmox.com
Fri Aug 8 09:23:56 CEST 2025
Since commit 9cf80dc6 ("proxy: avoid exiting connection acceptor loop
in error case") errors occurring during REST server's api_service
calls are logged as warning. The chosen warning log level is however
a bit to eager, as errors are now logged to the systemd journal as
well. This is not an issue per-se and can help debug connection
issues. However, most health check tools such as e.g. HAProxy's
backend health check periodically establish a connection and simply
disconnect if successful, therefore spamming the journal with the
following log lines:
```
...
Failed to get api service: Transport endpoint is not connected (os error 107)
Failed to get api service: Transport endpoint is not connected (os error 107)
...
```
Therefore, lower the log level to debug which nevertheless allows to
inspect possible errors when invoking the proxy with the respective
log level, but does not spam the systemd journal by default.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
src/bin/proxmox-backup-proxy.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs
index cfd93f928..edd4871b8 100644
--- a/src/bin/proxmox-backup-proxy.rs
+++ b/src/bin/proxmox-backup-proxy.rs
@@ -313,7 +313,7 @@ async fn run() -> Result<(), Error> {
api_service.serve(conn, Some(watcher)).await
});
}
- Err(err) => log::warn!("Failed to get api service: {err:?}"),
+ Err(err) => log::debug!("Failed to get api service: {err:?}"),
}
},
Err(err) => { log::warn!("Failed to accept secure connection: {err:?}"); }
--
2.47.2
More information about the pbs-devel
mailing list