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 3AB5E1F508 for ; Mon, 3 Feb 2025 09:29:11 +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=QY9uf+ED; 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=BUCW+G5E; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1738574948; bh=InW7g2QIaHoM1/Wi1ZUA0WL5D7RI72Qs2Whbv0Q5vjE=; 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=QY9uf+EDTm8s/kMJBO9WJEtZ5Or2oLvoXyAxd7O9nS6EM7bhcLCTR3Dl8L16peoWP o2bHQH0pk47w7YRc+0Ov3sTYWf1zsQ8Opzf1VkuVbiWxLMhcVfF2Evyy8+tOMK6dhb VqWDhhP4UQ7ERaj1b8s92gJ7yiYoGIXOIolnSd+E= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id B2F444688B for ; Mon, 3 Feb 2025 09:29:08 +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=BUCW+G5E; dkim-atps=neutral Received: from s.wfbtzhsw.outbound-mail.sendgrid.net (s.wfbtzhsw.outbound-mail.sendgrid.net [159.183.224.105]) by nue.mailmanlists.eu (Postfix) with ESMTPS id E29914620E for ; Mon, 3 Feb 2025 09:29:03 +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=byYVW0oYcNdtQGXMWFEg/xOtUoJE2fij3mfCYfgcbW0=; b=BUCW+G5EarME9moXpexBJrz6QG1yhuOxeltbwYN4eY8YlRMyolQp1KscYF4po0OY5wd1 hT9BH9O1SQDnCngx8JsGo7QjnICmbRMk6gie3jj6Ig10UmuUyx7scQ8OSbDhjukUyD70gk XNpUbaQRs7rHNNQ2y/wK3eT+EZm/gw5aa890jJsdIPwP/Y7oZIpcfDPi3yfUXklJnbhR0L sx54oTkcKBVmlO/u24G3SiJ5FIZqkRUa3ulZH7O1J0SpkX3LMIvF2HQS8Kdyk8fE0HQTuq bqObMwisbeH2wP77nZ9y151qozUF23AqIgdWDKAf2AGAdZY9iOdypSaG2sZZakpA== Received: by recvd-5f9ffdf494-29sch with SMTP id recvd-5f9ffdf494-29sch-1-67A08C5E-B 2025-02-03 09:29:02.79341965 +0000 UTC m=+6955877.500460505 Received: from herokuapp.com (unknown) by geopod-ismtpd-23 (SG) with ESMTP id ft4utjVyQreu-amp-mkJNw for ; Mon, 03 Feb 2025 09:29:02.737 +0000 (UTC) Date: Mon, 03 Feb 2025 09:29:02 +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: mjt58 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: 97584 X-SG-EID: =?us-ascii?Q?u001=2E0OLEj3SXAt5jWrp3sNnLyNePTP+mVJMnOc8RlzMwjbCOKedp=2FdPas3=2FiO?= =?us-ascii?Q?RSz+JHUaLR3lSJhoNHuo5KSStcrUJvvPZ70Oc1X?= =?us-ascii?Q?FtYykkaoMYC4xfX44qSeegV8oZzd5j+zrWWU5o9?= =?us-ascii?Q?fcFCr1SIMjiOI5xH4UtEUEtmy489a41NwN3iNNa?= =?us-ascii?Q?KBsqNSMaqlCqti3Crd4JrHGyfHogF9ehURiiixD?= =?us-ascii?Q?EvZveano4QO8sy53=2FjYXnPI=2FJD5z0JWEdel2dd6?= =?us-ascii?Q?UUquWfCdT1A8T=2FGZMVg0utO8iQ=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: LYM7QC63EGPVWFAUJW7MGVFAEREP5QRN X-Message-ID-Hash: LYM7QC63EGPVWFAUJW7MGVFAEREP5QRN 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:120868] [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: "mjt58 (Mike Thompson) via ruby-core" Cc: "mjt58 (Mike Thompson)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #21104 has been updated by mjt58 (Mike Thompson). shioimm (Misaki Shioi) wrote in #note-1: > 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? Yes, I saw it first running `bundle install` with errors like: ``` Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error ``` > - 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? Yes, I see it on, home wifi, office wifi and when tethered off my phone. ---------------------------------------- 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-111742 * 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/