Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot fetch dependencies with mix deps.get, seeing :failed_connect error, :honor_cipher_order #9374

Closed
dopatraman opened this issue Oct 1, 2019 · 5 comments

Comments

@dopatraman
Copy link

dopatraman commented Oct 1, 2019

Environment

  • Erlang/OTP 22 [erts-10.5] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
    Elixir 1.9.1 (compiled with Erlang/OTP 21)

  • Ubuntu 16.04

Current behavior

When I run mix deps.get I get the following error for each dependency:

Failed to fetch record for 'hexpm/telemetry' from registry (using cache)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], {:option, :server_only, :honor_cipher_order}}]}
Failed to fetch record for 'hexpm/plug_cowboy' from registry (using cache)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], {:option, :server_only, :honor_cipher_order}}]}
Failed to fetch record for 'hexpm/plug' from registry (using cache)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], {:option, :server_only, :honor_cipher_order}}]}
Failed to fetch record for 'hexpm/ranch' from registry (using cache)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], {:option, :server_only, :honor_cipher_order}}]}

and so on. Is Hex down? Why can't I fetch anything?

Something that looks peculiar is this error:

* Getting telemetry (Hex package)
** (FunctionClauseError) no function clause matching in Regex.safe_run/3    
    
    The following arguments were given to Regex.safe_run/3:
    
        # 1
        ~r/\/\/([^:]*):[^@]+@/
    
        # 2
        "https://repo.hex.pm/tarballs/telemetry-0.4.0.tar"
    
        # 3
        [{:capture, :all, :index}, :global]
    
    Attempted function clauses (showing 1 out of 1):
    
        defp safe_run(%Regex{re_pattern: compiled, source: source, re_version: version}, string, options)
    
    (elixir) lib/regex.ex:463: Regex.safe_run/3
    (elixir) lib/regex.ex:663: Regex.do_replace/4
    (hex) lib/hex/scm.ex:103: Hex.SCM.update/1
    (hex) lib/hex/scm.ex:163: Hex.SCM.checkout/1
    (mix) lib/mix/dep/fetcher.ex:64: Mix.Dep.Fetcher.do_fetch/3
    (mix) lib/mix/dep/converger.ex:190: Mix.Dep.Converger.all/9
    (mix) lib/mix/dep/converger.ex:201: Mix.Dep.Converger.all/9
    (mix) lib/mix/dep/converger.ex:123: Mix.Dep.Converger.all/7

This looks related to the hex failure though (as it cannot fetch the telemetry library). What is going on with Hex?

I've tried uninstalling and reinstalling Erlang and Elixir, hasn't worked.

@fertapric
Copy link
Member

Related: hexpm/hex@f34518e

@dopatraman
Copy link
Author

@fertapric what do you think is causing the problem?

@wojtekmach
Copy link
Member

@dopatraman update your Hex with mix local.hex --force and you should be good to go.

We've fixed it on Elixir master by requiring newer Hex versions: #9357.

The issue is in OTP 22.1 passing this option honor_cipher_order started erroring. This also broke hackney: benoitc/hackney#591.

@josevalim
Copy link
Member

Closing in favor of the Hex one.

@dopatraman
Copy link
Author

Rebuilt Elixir from source, that seems to have fixed the problem 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants