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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 D98731F508 for ; Sun, 2 Feb 2025 14:27:45 +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=AFwfC8Kl; 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=JDFQmJp0; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1738506463; bh=Lb6puuQ3Twlg0iPivdH86nCXaH3mI7sRjsTt5jD+yb0=; 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=AFwfC8KlRTZk8kFz21Ppogh639wz3X0Qb15NWuA/L9Qu0Rklit059lU2992D2Wus/ x4xMSX244iBr3Y8REE1YkxACAzW+KBLUjTU2dQKHfYtSUfqUKG0jnDb2DOGYD45FWU 3GH4QKDtzMtNwwBea/GLvyZ1FPRWfzqpUl94SGLY= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 548A8468DC for ; Sun, 2 Feb 2025 14:27:43 +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=JDFQmJp0; dkim-atps=neutral Received: from s.wrqvwxzv.outbound-mail.sendgrid.net (s.wrqvwxzv.outbound-mail.sendgrid.net [149.72.154.232]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 51362468AB for ; Sun, 2 Feb 2025 14:27:39 +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=35tM6f+Ky0zKFFXVw+a/c91Alh5c1n0h8mygKcIP25M=; b=JDFQmJp0APqEx1UwF7zwevTonbICUVs/0ZOMDrxIwB+k5XaQBpGWprkj6WDYVQ+c2nMW gPRG3xIJldr4fsZyxB3VvYAo0JD/Lfgwp2pvRk46kfEHAEpnxf0u6NQDQDi+76q0s4kzs7 LQ+FeZWr3y7bFCCUT9f+OrhQXYULQ+/XF/PtmFukaIEImJbZ4WDFiXDIqpU6QcQMSdSiaS Llvx0XmgJrZXMaZUCutXGzQbTfGJl5ivb+eSkhdxK0JAy6sZssUoc32wSdRH7PFZlpeAS+ 4k2s4OLO9my+xb8xGbAZ3hFgNRto1SxEy2E/imQeWdYRk1/PzuXi06OZoQPOIgDA== Received: by recvd-5f54b5d587-bvvcd with SMTP id recvd-5f54b5d587-bvvcd-1-679F80D9-B 2025-02-02 14:27:37.295181007 +0000 UTC m=+6887187.150280366 Received: from herokuapp.com (unknown) by geopod-ismtpd-31 (SG) with ESMTP id yWIlIcc_QP6PlotBm6cvjA for ; Sun, 02 Feb 2025 14:27:37.120 +0000 (UTC) Date: Sun, 02 Feb 2025 14:27:37 +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: 97579 X-SG-EID: =?us-ascii?Q?u001=2EWJBdT2d1vJZT0G13EibnQa5YBUX=2FTH4GyMcSXzi7jEzMPK4xo6jWO9RK4?= =?us-ascii?Q?C9d486tfDoPS5f9W4TriAN70fJlHZyu6SIsQyqJ?= =?us-ascii?Q?cxiSkqtZy81N+e9b5YKY7BnmMpaNytz6Y4oEuvY?= =?us-ascii?Q?yvqd+IashTqOuOblwT7yttF1JoRlX5t5R7jWbHg?= =?us-ascii?Q?JxcmMDcbCFPRXST317KO9QaVLHFC6sUw0iL5vNQ?= =?us-ascii?Q?dlyL=2FBNHqlt9FVqI1Z1NNzoBOJc0sMXCUjwamdk?= =?us-ascii?Q?SEilXV8vhiFd3xI6ZQNuewImqA=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: IPKJAG253KH3WK5NADXH2SKBRX7MX7AT X-Message-ID-Hash: IPKJAG253KH3WK5NADXH2SKBRX7MX7AT 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:120863] [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). I suspect that this issue might be caused by an interaction between the specifications of Happy Eyeballs v2 and certain intermediate devices along the network path. This is because, according to the report you linked, the problem occurs for some people but not for others, even though they are using the same OS, the same Ruby version, the same OpenSSL version, and connecting to the same destination (https://rubygems.org/). I also haven't been able to reproduce this issue in my own environment. To help narrow down the cause, could you provide more information on the following? - You specified 'https://bbc.co.uk' as the host you're connecting to. Does the same issue occur when connecting to other hosts as well? - Does the issue still occur when you use a different network environment? For example, when connecting from your workplace, a cafe, or when using a VPN? ---------------------------------------- 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-111736 * 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/