From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id F3DD81F508 for ; Tue, 4 Feb 2025 12:27:57 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=zb/4S9ji; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=l8K9/r9R; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1738672075; bh=MYnGN+PRBsgnM3qEz+Mt0dVq5qgGVMaipyee3Vliim8=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=zb/4S9ji2MHG8b2/NUj95Y844hz5Qba3Zg+TZAr935QhJHHeeTGjIjYpdOlU2YkIj FuM+ydj7pPlxRdaFdAJ4m1RLZC7uubiY34UDEaEvNF0F0JyA9yyl7jscAXTCEAWUtm QrIgNj3CtAIc55WhYxRrce+HCmEPI/98Jc8lHNIc= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 5874D468B2 for ; Tue, 4 Feb 2025 12:27:55 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=l8K9/r9R; dkim-atps=neutral Received: from s.wrqvtvvn.outbound-mail.sendgrid.net (s.wrqvtvvn.outbound-mail.sendgrid.net [149.72.120.130]) by nue.mailmanlists.eu (Postfix) with ESMTPS id AE95046881 for ; Tue, 4 Feb 2025 12:27:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=BrPKmmplkkw+4NM3d84VAWU7mS2DyIIGsWgISvR4Upg=; b=l8K9/r9R0aEiwauXwhJ9M7CQSxihayE8lDNInEYocSSaeAHkDP4Nf0n370ZAnzxZqwib TOB3S1+NJI9ERMXJyQa1C6NmU8JmCoyyXntDBupCdCSNaqBLKxpmX2X+iIwA02GyipTSC/ o7hJ17veWwIMbJ0AMgPX3vr7GGNR+t4raEPIB96KAGdXDj0VcZWTKi/qUAiG0XebsOIhMk V0zQ5w8kiwkegTQxfM8w1zKYInGN+DnXYbnlpCaGRqtjMmcHM5UPA84VvyQrYvaREZv6lv HQ362TQjSN3SX6zPgo+OIbrWxtCfGajfVOxRmZvUiL2uc6Y2zbc1jjKu4nouP7yQ== Received: by recvd-69cbc48b94-5zxfq with SMTP id recvd-69cbc48b94-5zxfq-1-67A207C5-20 2025-02-04 12:27:49.478720643 +0000 UTC m=+7052657.998783257 Received: from herokuapp.com (unknown) by geopod-ismtpd-31 (SG) with ESMTP id hULYA58mT--dKQtMxciB1g for ; Tue, 04 Feb 2025 12:27:49.328 +0000 (UTC) Date: Tue, 04 Feb 2025 12:27:49 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 21104 X-Redmine-Issue-Author: mjt58 X-Redmine-Issue-Priority: Normal X-Redmine-Sender: shioimm X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 97592 X-SG-EID: =?us-ascii?Q?u001=2EWJBdT2d1vJZT0G13EibnQa5YBUX=2FTH4GyMcSXzi7jEzMPK4xo6jWO9RK4?= =?us-ascii?Q?C9d486tfDoPS5f9W4TriAN70fJlHZyu6SIsQyqJ?= =?us-ascii?Q?cxiSkqtZy822eFQLpEqes4E0=2FRhq3+St3+NdYr7?= =?us-ascii?Q?+pnVNcbL0i0XjV7yuw+NOSkN63i45wDESwrNU4+?= =?us-ascii?Q?SIceiCMQD1YjcBwpg2IBb1gAUqpRpY4Qkg2jTg=2F?= =?us-ascii?Q?PzGt14nQ4g=2FO0Tqc7JACHE21xpnGq5Qzywmt8yy?= =?us-ascii?Q?mmeIRVI6c7wu=2FWfrT5qHoc=2FY3g=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: QFUWSXFZEILIKGIR5FNT4DRKL7NZ3X56 X-Message-ID-Hash: QFUWSXFZEILIKGIR5FNT4DRKL7NZ3X56 X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:120876] [Ruby master Bug#21104] Net::HTTP connections failing in Ruby >= 3.4.0 on macOS with Happy Eyeballs enabled List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "shioimm (Misaki Shioi) via ruby-core" Cc: "shioimm (Misaki Shioi)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #21104 has been updated by shioimm (Misaki Shioi). @mjt58 Thank you for your reply. Since you're seeing this issue across different environments, I'm starting to think it's more likely influenced by software running on the host rather than a problem with network intermediaries. Could you also check the following? - Do you get any errors when running `TCPSocket.new` directly without using net/http? For example, try executing a script like this: ```ruby require "socket" p TCPSocket.new("bbc.co.uk", 80, fast_fallback: true) ``` - Could you verify via packet capture whether the source IP of the RST is the client host itself? You can see which IP address sends an RST by using tcpdump, for example, by running `sudo tcpdump -i host bbc.co.uk`, and then executing `Net::HTTP.get(URI("https://bbc.co.uk"))`. I'd appreciate your help with further debugging. ---------------------------------------- Bug #21104: Net::HTTP connections failing in Ruby >= 3.4.0 on macOS with Happy Eyeballs enabled https://bugs.ruby-lang.org/issues/21104#change-111751 * Author: mjt58 (Mike Thompson) * Status: Open * ruby -v: ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin24] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- A project I work on recently upgraded Ruby to 3.4.1 from 3.3.5. Following the upgrade, and when running locally on my Mac, all attempts to connect to an external service within the project over http(s) fail. We use `mise` for managing development tool dependencies, including Ruby, and I am using macOS 15.3. For example running something as simple as: ``` require 'net/http' puts Net::HTTP.get(URI('https://bbc.co.uk')) ``` Will fail with the following stack trace: ``` /path/to/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/net/protocol.rb:46:in 'OpenSSL::SSL::SSLSocket#connect_nonblock': Connection reset by peer - SSL_connect (Errno::ECONNRESET) from /path/to/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/net/protocol.rb:46:in 'Net::Protocol#ssl_socket_connect' from /path/to/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/net/http.rb:1736:in 'Net::HTTP#connect' from /path/to/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/net/http.rb:1636:in 'Net::HTTP#do_start' from /path/to/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/net/http.rb:1625:in 'Net::HTTP#start' from /path/to/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/net/http.rb:1064:in 'Net::HTTP.start' from /path/to/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/net/http.rb:824:in 'Net::HTTP.get_response' from /path/to/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/net/http.rb:805:in 'Net::HTTP.get' from request.rb:2:in '
' ``` I tried different versions of Ruby and confirmed that the issue appears with 3.4.0. After reading the release notes for this version, I tried setting `RUBY_TCP_NO_FAST_FALLBACK=1` and this worked, allowing me to work around the problem. This issue has also been encountered by others, please see: https://github.com/rubygems/rubygems/issues/8390 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/