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

Connection reset by peer #102

Closed
jimmiebtlr opened this issue Jan 27, 2020 · 1 comment
Closed

Connection reset by peer #102

jimmiebtlr opened this issue Jan 27, 2020 · 1 comment

Comments

@jimmiebtlr
Copy link

I'm having trouble with a fairly simple example, using curl I'm always getting connection reset by peer.

using Mux

println("Starting")

@app routes = (
  Mux.defaults,
        page(respond("Healthy")),
  Mux.notfound())

serve(routes, ENV["PORT"])

println("Done starting")

Base.JLOptions().isinteractive==0 && wait()

Mux entry in manifest

[[Mux]]                                                                                                                              
deps = ["AssetRegistry", "Base64", "HTTP", "Hiccup", "Lazy", "Pkg", "Sockets", "WebSockets"]                                         
git-tree-sha1 = "3621676e7f711aca14d783d1bff9ac379d9df6b7"
uuid = "a975b10e-0019-58db-a62f-e48ff68538c9"
version = "0.7.1"

curl -v

curl -v localhost:9000                                                                         
* Rebuilt URL to: localhost:9000/
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9000 (#0)
> GET / HTTP/1.1
> Host: localhost:9000
> User-Agent: curl/7.52.1
> Accept: */*
>
* Recv failure: Connection reset by peer
* Curl_http_done: called premature == 1
* stopped the pause stream!
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer

Any suggestions?

@jimmiebtlr
Copy link
Author

Found it.

My problem was the env being passed in was a string, and was getting used as an ip not a port.

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

1 participant