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

(ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp))) when trashing connections #292

Closed
reactormonk opened this issue Aug 17, 2017 · 11 comments

Comments

@reactormonk
Copy link

Point at a bucket with a lot of small files. I got a (ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp))) pretty reliably.
https://gist.github.com/reactormonk/8106134ccb59190b9cdf8eedd2b66cff

Fixing the issue by moving the sampling one back: https://gist.github.com/reactormonk/8106134ccb59190b9cdf8eedd2b66cff/revisions

batch-s3: TransportError (HttpExceptionRequest Request {
  host                 = "s3.eu-central-1.amazonaws.com"
  port                 = 443
  secure               = True
  requestHeaders       = <censored>
  path                 = "<censored>"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 0
  responseTimeout      = ResponseTimeoutMicro 70000000
  requestVersion       = HTTP/1.1
}
 (ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp)))
@snoyberg
Copy link
Owner

Can you provide a repro that uses only the http-client and http-client-tls libraries?

@rsarres
Copy link

rsarres commented Feb 22, 2018

I had this problem running a Haskell app on an Ubuntu docker image. Installing build-essential package solved the problem.

@kingxueyuf
Copy link

Having the same issue as well

@snoyberg
Copy link
Owner

No minimal repro, and this is likely a file descriptor issue from the sound. Closing.

@reactormonk
Copy link
Author

Yeah, the code runs out of file descriptors. See #307

@exarkun
Copy link

exarkun commented Jul 10, 2018

I had this problem running a Haskell app on an Ubuntu docker image. Installing build-essential package solved the problem.

FWIW, you only need netbase to fix the problem in that context (12.7 KiB compared to 21.7 MiB for build-essential).

@creichert
Copy link
Contributor

creichert commented Jul 12, 2018

I believe @exarkun is right. I had this issue recently and had to install netbase. What's odd is that the failures seemed intermittent.

If the issue persists after installing netbase, check the /etc/hosts file of the to make sure it's sane. I believe at minimum:

$ cat /etc/hosts
127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

gabebw added a commit to gabebw/croniker that referenced this issue Dec 28, 2018
Install `netbase` in Docker, otherwise this issue happens when OAuth-ing
to twitter:

    (ConnectionFailure Network.BSD.getProtocolByName: does not exist (no
    such protocol name: tcp)))

Here's the issue where I found the fix:
snoyberg/http-client#292
@ketzacoatl
Copy link

ketzacoatl commented Feb 7, 2019

Installing netbase fixed this for me, build-essential wasn't enough. Without netbase, I was unable to use cache-s3 or stack build (and ghc installs failed). It was a mess. After installing netbase, caching and builds worked fine. Does anyone know why or how netbase fixes this problem?

@bradrn
Copy link

bradrn commented Feb 16, 2019

I was getting this same error on a Yesod app when deployed to AWS Elastic Beanstalk. Installing netbase fixed it for me as well.

duijf pushed a commit to channable/icepeak that referenced this issue Apr 26, 2019
This is apparently a requirement for the Haskell HTTP client
to work. See snoyberg/http-client#292
jdblischak added a commit to workflowr/workflowr-pkg-tests that referenced this issue Nov 17, 2020
pandoc 1.19 failed to access a GitHub URL. The typical rmarkdown
workarounds are either 1) install pandoc 2+, or 2) set self_contained: no.
This was a super easy fix once I discovered it, and it allows me to
continue testing wflow_html() with pandoc 1 in a standard self-contained
output file.

pandoc document conversion failed with error 67
pandoc: Could not fetch https://raw.githubusercontent.com/workflowr/workflowr-assets/master/img/reproducible.png
FailedConnectionException2 "raw.githubusercontent.com" 443 True getProtocolByName: does not exist (no such protocol name: tcp)

Solution: snoyberg/http-client#292
rmarkdown discussion: rstudio/rmarkdown#228
JoelWAnna added a commit to JoelWAnna/cosmere-books that referenced this issue Feb 5, 2021
netbase needed for `(ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp)))`
snoyberg/http-client#292

zip needed for dark one 

something needed curl, can't remember
@tomjaguarpaw
Copy link

Specifically, the file that seems to be required is /etc/protocols

@tomjaguarpaw
Copy link

Also seems to require /lib/x86_64-linux-gnu/libnss_files.so.2.

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

9 participants