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

fn create app myapp errors out with "read: connection reset by peer" #1586

Open
saurabhuja opened this issue May 23, 2021 · 1 comment
Open

Comments

@saurabhuja
Copy link

Description

fn create app myapp

Fn: Post "http://localhost:8080/v2/apps": read tcp [::1]:41904->[::1]:8080: read: connection reset by peer

Steps to reproduce the issue:

  1. Install Docker in linux environment
  2. Disconnect VPN
  3. Download and install fn
  4. fn start --log-level DEBUG
    Notice in output-
    time="2021-05-23T16:56:54Z" level=info msg="Fn serving on :8080" type=full version=0.3.749
  5. fn init --runtime go hello
  6. cd hello
  7. fn create app myapp

Describe the results you received:
Fn: Post "http://localhost:8080/v2/apps": read tcp [::1]:41904->[::1]:8080: read: connection reset by peer

Describe the results you expected:
myapp created

Additional information you deem important (e.g. issue happens only occasionally):

Output of fn version (CLI command):

fClient version is latest version: 0.6.6
Server version:  ?

Additional environment details (OSX, Linux, flags, etc.):
Linux

@yawkat
Copy link

yawkat commented Jun 25, 2021

I had a similar (though not the same) issue, and managed to work around it. Here's what I found in my case:

  • The connection reset by peer is from docker-proxy. It happens because the fnserver container doesn't actually bind to a port inside its container.
  • My fnserver doesn't bind to a port because it is stuck before the startup procedure completes. If the startup did manage to complete, it would yield a message like Fn serving on :8080. You do have this message, but I do not. So your issue is probably with the point above.
  • In my case, the fnserver was stuck during startup because it failed to connect to docker. It tried connecting to the unix domain socket, even though my docker was configured to bind to tcp, and DOCKER_HOST was set. My workaround was to bind my docker to the unix domain socket instead.

Just in case someone else comes by from googling this issue as well :)

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