Networking issue with custom port & protocol

I’m trying to run an app that uses a custom app-level protocol (https://geminiprotocol.net/ , you can think of it like an ultra-lightweight HTTP). It runs over tcp on port 1965. But when I try to access it using a Gemini client I can’t seem to get it to connect to the app.

Here’s my fly.toml:

app = 'gemini-patient-river-2906'
primary_region = 'atl'

[build]
  dockerfile = 'Dockerfile'

[[vm]]
  memory = '256mb'
  cpu_kind = 'shared'
  cpus = 1

[[services]]
  internal_port = 1965
  protocol = "tcp"

  [[services.ports]]
    port = "1965"

Output from netstat:

netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:1965            0.0.0.0:*               LISTEN      3545/./aerozine
tcp6       0      0 fdaa:9:b800:a7b:2d6::22 :::*                    LISTEN      322/hallpass

FWIW, I don’t see a DNS record for the app’s gemini-patient-river-2906.fly.dev address. When I try to hit the IP (obtained from curl ipinfo.io/ip) it still doesn’t work. Any advice? I’m not even sure what next step will help me troubleshoot at this point.

Hi… Gemini is neat. The typical next step is fly ips list, :thought_balloon:.

(That will show you the public addresses.)

Most likely you just need to allocate a dedicated IPv4 address.

It’s probably worth noting that this was telling you an egress IP, rather than ingress. (Those two are distinct, on Fly, :cactus:.)

Hope this helps!

1 Like

Added proxy

Excellent, thank you! Have it working now!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.