Why does a request to a proxied port hang?

I’m trying to setup an IPFS node, that runs an internal API at port 5001.

I’d like to talk to it on my laptop, so I tried to proxy it:

fly proxy 5001 -a rebase-ipfs

However, when I try to curl it locally, the request never completes:

curl localhost:5001
# ..... never finishes

IPFS is running at 5001

If I ssh into the VM:

fly ssh console -a rebase-ipfs

I can use telnet to run a simple request on port 5001:

# telnet
Connected to
POST /api/v0/id HTTP/1.0

HTTP/1.0 200 OK
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Content-Type: application/json
Server: go-ipfs/0.12.1
Trailer: X-Stream-Error
Vary: Origin
Date: Fri, 01 Apr 2022 18:48:57 GMT

# ... the body of the request


app = "rebase-ipfs"

kill_signal = "SIGINT"
kill_timeout = 5
processes = []




  internal_port = 4001
  protocol = "tcp"
    port = "4001"

  internal_port = 8080
  protocol = "tcp"
    port = "80"

    handlers = ["tls", "http"]
    port = "443"

What can I do to debug this further?

This happens when the process isn’t listening on IPv6. The fly proxy command connects over the private IPv6 address. I don’t know the exact config options for IPFS, but you might be able to make it listen on :: (all IPv6 and IPv4 addresses).

1 Like

Yup that was the correct answer. For future folks reading this, you can ssh into your fly instance:

fly ssh console --app your-app

And then change the config to listen on ipv6:

ipfs config Addresses.API --json "[\"/ip4/\", \"/ip6/::/tcp/5001\"]"
1 Like

I put up GitHub - ipfs-shipyard/go-ipfs-docker-examples as there is now an official way to inject config to go-ipfs when run in containers

1 Like