Cannot resolve name

I’m trying to deploy a simple web server that serves some HTML on port 4000. My app deployed successfully with fly launch and fly logs shows my service awaiting requests on post 4000. I’m not using TLS.

Here is the fly.toml file I’m using:

app = 'kpbj-fm'
primary_region = 'lax'

[build]
  image = 'sbothwell/kpbj.fm:0.1.0.2'

[env]
  APP_ENVIRONMENT = 'Development'
  APP_OBSERVABILITY_EXPORTER = 'StdOut'
  APP_OBSERVABILITY_VERBOSITY = 'Quiet'
  APP_WARP_PORT = '4000'
  APP_WARP_SERVERNAME = 'kpbj.fm'
  APP_WARP_TIMEOUT = '100'

[[services]]
  protocol = 'tcp'
  internal_port = 4000

[[services.ports]]
    port = 80
    handlers = ['http', 'proxy_proto']

[[vm]]
  memory = '1gb'
  cpu_kind = 'shared'
  cpus = 1

The dashboard shows the app as live with host kpbj-fm.fly.dev . However I am not able to resolve the host name and fly logs dont give me any information.

➜ curl http://kpbj-fm.fly.dev
curl: (6) Could not resolve host: kpbj-fm.fly.dev

After adding a shared ip and waiting a bit I am now getting dns resolution and requests are hitting my http server. It was not clear that I had to provision an ip address manually.

Unfortunately now I seem to be having a problem with the the fly io proxy, It seems to be breaking the requests and I’m getting 400 errors from my HTTP server. Running the container locally I don’t have this issue.

Hi… Try removing 'proxy_proto' from the handlers list; I don’t think you can combine those two like that.

(I wish flyctl was more strict about these, at deploy time.)

Hope this helps a little!

Thank you that fixed it!

1 Like

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