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

TLS client: In state certify at ssl_handshake.erl:361 generated CLIENT ALERT: Fatal - Internal Error #2691

Closed
micah-williamson opened this issue Mar 14, 2022 · 2 comments

Comments

@micah-williamson
Copy link

First time using rebar3 on a fresh project. Tried installing some deps with rebar3 get-deps and got this error.

Command

$ rebar3 get-deps
===> Verifying dependencies...
=NOTICE REPORT==== 14-Mar-2022::14:09:04.234116 ===
TLS client: In state certify at ssl_handshake.erl:361 generated CLIENT ALERT: Fatal - Internal Error
 - {unexpected_error,undef}
===> Failed to update package elli from repo hexpm
===> Package not found in any repo: elli ~> 3.3.0

Config

{deps, [
  {elli, "~> 3.3.0"}
]}.

Crashdump

Error: {try_clause,ok}
[{rebar_core,do,2,
             [{file,"/builddir/build/BUILD/rebar3-3.18.0/src/rebar_core.erl"},
              {line,155}]},
 {rebar_prv_do,do_task,5,
               [{file,"/builddir/build/BUILD/rebar3-3.18.0/src/rebar_prv_do.erl"},
                {line,87}]},
 {rebar_core,do,2,
             [{file,"/builddir/build/BUILD/rebar3-3.18.0/src/rebar_core.erl"},
              {line,155}]},
 {rebar3,run_aux,2,
         [{file,"/builddir/build/BUILD/rebar3-3.18.0/src/rebar3.erl"},
          {line,183}]},
 {rebar3,main,1,
         [{file,"/builddir/build/BUILD/rebar3-3.18.0/src/rebar3.erl"},
          {line,66}]},
 {erl_eval,local_func,6,[{file,"erl_eval.erl"},{line,572}]},
 {escript,interpret,4,[{file,"escript.erl"},{line,780}]},
 {escript,start,1,[{file,"escript.erl"},{line,277}]}]

Environment

Rebar3 report
 version 3.18.0
 generated at 2022-03-14T19:09:51+00:00
=================
Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)
-----------------
Task: rebar3
Entered as:
  rebar3 get-deps
-----------------
Operating System: x86_64-redhat-linux-gnu
ERTS: Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit]
Root Directory: /usr/lib64/erlang
Library directory: /usr/lib64/erlang/lib
-----------------
Loaded Applications:
bbmustache: 1.12.2
certifi: 2.8.0
cf: 0.3.1
common_test: 1.22
compiler: 8.0.4
crypto: 5.0.5
cth_readable: 1.5.1
dialyzer: 4.4.3
edoc: 1.1
erlware_commons: 1.6.0
eunit: 2.7
getopt: 1.0.2
hex_core: 0.7.1
inets: 7.5.1
kernel: 8.2
providers: 1.9.0
public_key: 1.11.3
relx: 4.6.0
sasl: 4.1.1
snmp: 5.11
stdlib: 3.17
syntax_tools: 2.6
tools: 3.5.2

-----------------
Escript path: /usr/bin/rebar3
Providers:
  app_discovery as clean compile compile cover ct deps dialyzer do edoc escriptize eunit get-deps help install install_deps list lock new path pkgs release relup report repos shell state tar tree unlock update upgrade upgrade upgrade version xref 

Current behaviour

$ DEBUG=1 rebar3 get-deps
===> Expanded command sequence to be run: [app_discovery,install_deps,lock,'get-deps']
===> Running provider: app_discovery
===> Found top-level apps: []
	using config: [{src_dirs,["src"]},{lib_dirs,["apps/*","lib/*","."]}]
===> Running provider: install_deps
===> Verifying dependencies...
===> Getting definition for package elli from repo hexpm (#{api_url => <<"https://hex.pm/api">>,name => <<"hexpm">>,
         repo_name => <<"hexpm">>,repo_organization => undefined,
         repo_url => <<"https://repo.hex.pm">>,repo_verify => true,
         repo_verify_origin => true})
=NOTICE REPORT==== 14-Mar-2022::14:13:47.017249 ===
TLS client: In state certify at ssl_handshake.erl:361 generated CLIENT ALERT: Fatal - Internal Error
 - {unexpected_error,undef}
===> Hex get_package request failed: {error,
                                             {failed_connect,
                                              [{to_address,
                                                {"repo.hex.pm",443}},
                                               {inet,
                                                [inet],
                                                {tls_alert,
                                                 {internal_error,
                                                  "TLS client: In state certify at ssl_handshake.erl:361 generated CLIENT ALERT: Fatal - Internal Error\n {unexpected_error,undef}"}}}]}}
===> Failed to update package elli from repo hexpm
===> Package not found in any repo: elli ~> 3.3.0

I haven't touched my hosts and I'm not using any sort of proxy. This is a relatively fresh install where I only downloaded erlang/rebar3 through dnf. I tried going directly to https://repo.hex.pm/ but I get AccessDenied.

@micah-williamson
Copy link
Author

micah-williamson commented Mar 14, 2022

I installed rebar3 from source instead of installing it through dnf and my problems went away. Whatever dnf install erlang-rebar3 is pointing to has issues.

@tsloughter
Copy link
Collaborator

Based on the undef error in ssl_handshare it looks like the issue with the fedora version is possibly with how we use ssl_verify_fun dependency.

We always recommend using either the pre-built escript from rebar3.org or building from source because distros apply their own patches and break things up in odd ways.

So it could be something about their patches or their version of ssl_verify_fun dependency.

Which is the other reason we suggest not using distros packages, we don't know what they are doing :)

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

No branches or pull requests

2 participants