From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 7457162D48 for ; Thu, 1 Oct 2020 13:56:13 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 64A5C20F15 for ; Thu, 1 Oct 2020 13:55:43 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id ABF8520F09 for ; Thu, 1 Oct 2020 13:55:41 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 7806845B92 for ; Thu, 1 Oct 2020 13:55:41 +0200 (CEST) Date: Thu, 01 Oct 2020 13:55:34 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion References: <20200930140909.1612753-1-daniel@firewall-services.com> <20200930140909.1612753-2-daniel@firewall-services.com> <1601543152.9js94vfimk.astroid@nora.none> <1408702569.181241.1601549706910.JavaMail.zimbra@fws.fr> In-Reply-To: <1408702569.181241.1601549706910.JavaMail.zimbra@fws.fr> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1601553281.hf4ta6d6wj.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.036 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [standalone.pm] Subject: Re: [pve-devel] [PATCH proxmox-acme 1/1] Close the acme standalone connection after sending a response X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2020 11:56:13 -0000 On October 1, 2020 12:55 pm, Daniel Berteaud wrote: > ----- Le 1 Oct 20, =C3=A0 11:15, Fabian Gr=C3=BCnbichler f.gruenbichler@p= roxmox.com a =C3=A9crit : >=20 >> On September 30, 2020 4:09 pm, Daniel Berteaud wrote: >>> Without this, the first req get a response, but not the next ones as th= e >>> listeners stays busy >>> Fixes #3048 >>>=20 >>> Signed-off-by: Daniel Berteaud >>> --- >>> src/PVE/ACME/StandAlone.pm | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>=20 >>> diff --git a/src/PVE/ACME/StandAlone.pm b/src/PVE/ACME/StandAlone.pm >>> index 0e2ece6..552c35c 100644 >>> --- a/src/PVE/ACME/StandAlone.pm >>> +++ b/src/PVE/ACME/StandAlone.pm >>> @@ -55,8 +55,8 @@ sub setup { >>> } else { >>> $c->send_error(404, 'Not found.') >>> } >>> + $c->close(); >>=20 >> I think this is not right - we only end up looping/blocking on >> get_request if the client requested keep alive, in which case the server >> should obviously not close the connection.. >>=20 >> I guess we have to fork (up to some limit) on accept()? it's obviously >> not ideal that anybody can race with the LE validation attempts and >> block the single request handler ;) >=20 > Indeed, having a few more handlers could limit the risk of this happening= . >=20 >>=20 >> maybe you can change something in your apache config to close the >> connection (or rather, to propagate the connection closing from the >> actual client)? it looks like this can only affect you if >> - your apache proxy keeps the connection open >> - your apache proxy does not re-use the open connection >=20 > You're right, the issue was on my rev proxy, which didn't re-used keep-al= ived connexions as it should (it was an old httpd 2.2.3 on a CentOS 5 box, = on which I had no control). > Switching my setup so it now runs behind a nginx proxypass works normaly = without any modification >=20 > Sorry for not having looked at this more closely before posting ;-) no worries. I retitled the bug you filed to track the actual issue -=20 feel free to write a patch for it anyway ;) =