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_alert internal error #160

Closed
teamon opened this issue Jan 31, 2018 · 2 comments · Fixed by #163
Closed

tls_alert internal error #160

teamon opened this issue Jan 31, 2018 · 2 comments · Fixed by #163

Comments

@teamon
Copy link

teamon commented Jan 31, 2018

I went to update ibrowse from 4.2 to 4.4 and got this difference in behaviour:

ibrowse 4.2.2

iex(1)> :ibrowse.send_req('https://httpbin.org/uuid', [], :get)
{:ok, '200', ...}

ibrowse 4.4.0

iex(1)> :ibrowse.send_req('https://httpbin.org/uuid', [], :get)
{:error, {:conn_failed, {:error, {:tls_alert, 'internal error'}}}}
2018-01-31 21:05:49.194 [info] ['TLS', 32, 'client', 58, 32, 73, 110, 32, 115, 116, 97, 116, 101, 32, 'hello', 32, 'received SERVER ALERT: Fatal - Internal Error', 10]

Requests for other URL work fine like e.g. 'https://google.com' work fine on both versions.

What has changed between 4.2 and 4.4 in terms of ssl handling?

```bash λ elixir --version Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.6.0 (compiled with OTP 20)

</details>
teamon added a commit to elixir-tesla/tesla that referenced this issue Jan 31, 2018
@tazjin
Copy link
Contributor

tazjin commented Jul 13, 2018

I ran into this in the context of the issue linked above (hex2nix failing with the same error you posted when connecting to hex.pm).

Using git bisect and this script it seems that the commit that introduced the error is 216f84cf92caebdaa3efc6dfaa8c65766f66e8db.

It's late here and I'll have to continue investigating this tomorrow evening :)

tazjin added a commit to tazjin/ibrowse that referenced this issue Jul 13, 2018
In cases where no proxy is configured, first establishing a TCP
connection and then upgrading the connection to TLS can cause errors
on some TLS servers.

This commit splits the logic in such a way that configurations without
proxies (presumably the majority!) will connect directly using
`ssl:connect`, whilst proxy connections will still establish a socket
first and then upgrade.

This fixes cmullaparthi#160.
@tazjin
Copy link
Contributor

tazjin commented Jul 13, 2018

Opened #163 with a fix for this. There are some test failures on my local machine which I haven't quite figured out, but I'm really overdue for some sleep and it'll have to wait if it fails in CI, too.

tazjin added a commit to tazjin/hex2nix that referenced this issue Jul 14, 2018
Unpinned dependency versions can cause build issues in Nix if the
package registry index snapshot contains a newer version than what is
packaged in nixpkgs.

See NixOS/nixpkgs#43430 for context.

The versions chosen here are the most recent ones currently packaged
in nixpkgs, with the exception of ibrowse which has been pinned to a
version that is not affected by cmullaparthi/ibrowse#160.
tazjin added a commit to tazjin/hex2nix that referenced this issue Jul 14, 2018
Unpinned dependency versions can cause build issues in Nix if the
package registry index snapshot contains a newer version than what is
packaged in nixpkgs.

See NixOS/nixpkgs#43430 for context.

The versions chosen here are the most recent ones currently packaged
in nixpkgs, with the exception of ibrowse which has been pinned to a
version that is not affected by cmullaparthi/ibrowse#160.
tazjin added a commit to tazjin/hex2nix that referenced this issue Jul 14, 2018
Unpinned dependency versions can cause build issues in Nix if the
package registry index snapshot contains a newer version than what is
packaged in nixpkgs.

See NixOS/nixpkgs#43430 for context.

The versions chosen here are the most recent ones currently packaged
in nixpkgs, with the exception of ibrowse which has been pinned to a
version that is not affected by cmullaparthi/ibrowse#160.
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

Successfully merging a pull request may close this issue.

2 participants