From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 8DB561FF16B for ; Fri, 7 Nov 2025 14:02:43 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 274F110B96; Fri, 7 Nov 2025 14:03:25 +0100 (CET) Mime-Version: 1.0 Date: Fri, 07 Nov 2025 14:03:21 +0100 Message-Id: To: "Proxmox Backup Server development discussion" From: "Max R. Carrara" X-Mailer: aerc 0.18.2-0-ge037c095a049 References: <20250910154041.1032251-1-m.carrara@proxmox.com> In-Reply-To: <20250910154041.1032251-1-m.carrara@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1762520581725 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.086 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pbs-devel] [PATCH proxmox master v1] fix #6738: rest-server: improve TLS handshake error logging X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" On Wed Sep 10, 2025 at 5:40 PM CEST, Max R. Carrara wrote: > Right now, when a client connects to the server, we continuously peek > into the TCP stream's buffer until we can perform the TLS handshake > check. If the client closes the connection after sending < 5 bytes, we > exit the peek loop. If the client instead keeps the connection open, > the future times out if the handshake check isn't made. > > Instead of exiting with `ErrorKind::ConnectionAborted`, exit with > `ErrorKind::Other` instead, as that variant isn't ever returned by > stdlib functions. That way we can be sure we don't accidentally ignore > an error. > > Reduce the amount of log noise by ignoring our `ErrorKind::Other` > errors, as those are usually only returned when some monitoring > solution opens and closes a TCP connection for its healthchecks [0]. > > Log timeouts without their error chain (like before), as > there isn't any additional context for them. > > Because any other kinds of errors should be sufficiently rare, log > them with their error chain. The error chain is formatted to stay in > one line, as the default formatting looks quite awkward otherwise. > > Make the context added to the `async_io()` coroutine call more > general and informative, as not only the stream buffer peeking can > fail. Shorten the general log message as well. > > [0]: https://forum.proxmox.com/threads/subject-intermittent-backup-errors-and-repeated-tls-handshake-failures.170089/post-795100 > > Fixes: #6738 > Signed-off-by: Max R. Carrara > --- > > Tested this interactively in my Python console by opening a raw TCP > stream using the `socket` module. > > proxmox-rest-server/src/connection.rs | 29 ++++++++++++++++++++++++--- > 1 file changed, 26 insertions(+), 3 deletions(-) > bump _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel