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 E040F62D0A for ; Thu, 1 Oct 2020 12:55:11 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D41F720752 for ; Thu, 1 Oct 2020 12:55:11 +0200 (CEST) Received: from pmg.fws.fr (pmg.fws.fr [51.91.175.36]) (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 A5BC820744 for ; Thu, 1 Oct 2020 12:55:10 +0200 (CEST) Received: from pmg.fws.fr (localhost [127.0.0.1]) by pmg.fws.fr (Proxmox) with ESMTP id 7CB9EC0CDF for ; Thu, 1 Oct 2020 12:55:10 +0200 (CEST) Received: from zmproxy.fws.fr (zmproxy.fws.fr [10.29.1.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pmg.fws.fr (Proxmox) with ESMTPS id 2D91CC018B for ; Thu, 1 Oct 2020 12:55:07 +0200 (CEST) Received: from zmproxy.fws.fr (localhost [127.0.0.1]) by zmproxy.fws.fr (Postfix) with ESMTPS id 253198B79BF for ; Thu, 1 Oct 2020 12:55:07 +0200 (CEST) Received: from zmproxy.fws.fr (localhost [127.0.0.1]) by zmproxy.fws.fr (Postfix) with ESMTPS id 0E5588B79C0 for ; Thu, 1 Oct 2020 12:55:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zmproxy.fws.fr 0E5588B79C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=firewall-services.com; s=7DAD15A2-D84A-11E9-8F77-BEC4FAA34EBC; t=1601549707; bh=/FKDsP/vOeJJgQtORBjZ/nMCsxrAk38L868LiC40hSM=; h=Date:From:To:Message-ID:MIME-Version; b=1CV0amQQclsk94Y3RuizwOQCIEovMnFJ3olrwCKZ82GWcprS9w2N4gNSYf8ZYWYQl /O1rFOUd+f7JaMb6D0xbHcEJ/GDPBE+Gpoz9++TqkqWdmAHzjlFBqklc26sMaE+74u PvF9NBa5C85JaBR23GRFdH8ipbiGMtFdwpKWwSPH5WbvVXEVoWLVDvkHJUPxygE4VZ W72TLE3dyl45WnqDcW5sFCmcm8DXIyNy9Ptd5VJtj1U0d8Ya4ZylnWCq2tUOOkVlIM PGKpzE3wt03KkLlH6eJmIoNC8OzR3zzjtqJ7ryeI8wnWQXiNgA6lxKSdgMu8oFvdX5 iyazVoeiDYTxg== Received: from zmstore.fws.fr (zmstore.fws.fr [10.29.3.15]) by zmproxy.fws.fr (Postfix) with ESMTP id 082458B79BF for ; Thu, 1 Oct 2020 12:55:07 +0200 (CEST) Date: Thu, 1 Oct 2020 12:55:06 +0200 (CEST) From: Daniel Berteaud To: Proxmox VE development discussion Message-ID: <1408702569.181241.1601549706910.JavaMail.zimbra@fws.fr> In-Reply-To: <1601543152.9js94vfimk.astroid@nora.none> References: <20200930140909.1612753-1-daniel@firewall-services.com> <20200930140909.1612753-2-daniel@firewall-services.com> <1601543152.9js94vfimk.astroid@nora.none> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.29.1.17] X-Mailer: Zimbra 8.8.15_GA_3963 (ZimbraWebClient - GC85 (Linux)/8.8.15_GA_3963) Thread-Topic: Close the acme standalone connection after sending a response Thread-Index: kXWHWbQWGJ2U1Y+AghZab+vTIyObxg== X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain 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. [firewall-services.com, standalone.pm, fws.fr] 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 10:55:12 -0000 ----- Le 1 Oct 20, =C3=A0 11:15, Fabian Gr=C3=BCnbichler f.gruenbichler@pro= xmox.com a =C3=A9crit : > On September 30, 2020 4:09 pm, Daniel Berteaud wrote: >> Without this, the first req get a response, but not the next ones as the >> 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 { >> =09=09} else { >> =09=09 $c->send_error(404, 'Not found.') >> =09=09} >> +=09=09$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 ;) Indeed, having a few more handlers could limit the risk of this happening. >=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 You're right, the issue was on my rev proxy, which didn't re-used keep-aliv= ed 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 wi= thout any modification Sorry for not having looked at this more closely before posting ;-) Cheers, Daniel --=20 [ https://www.firewall-services.com/ ] =09 Daniel Berteaud=20 FIREWALL-SERVICES SAS, La s=C3=A9curit=C3=A9 des r=C3=A9seaux=20 Soci=C3=A9t=C3=A9 de Services en Logiciels Libres=20 T=C3=A9l : +33.5 56 64 15 32=20 Matrix: @dani:fws.fr=20 [ https://www.firewall-services.com/ | https://www.firewall-services.com ]