Unknown host error met for my Running App

I have checked through the Troubleshooting your Deployment in Docs. It seems to me that the status of the app/service/machine is fine. Can anyone point me the direction where am I setting incorrectly?

❯ fly services list                                                                                                                                                              ─╯
TCP     	80 => 8080 [HTTP]     	True
        	443 => 8080 [TLS,HTTP]	False

❯ fly status --all                                                                                                                                                               ─╯
  Name     = thinkwgpt
  Owner    = personal
  Hostname = thinkwgpt.fly.dev
  Image    = thinkwgpt:deployment-01GWPX7W5
  Platform = machines

1781913a956589	app    	7      	hkg   	started	1 total, 1 passing	2023-03-29T14:47:05Z

It’s a Python Flask App and the logs is showing to listen to 8080 already.

2023-03-29T14:47:05.377 app[1781913a956589] hkg [info] 2023/03/29 14:47:05 listening on [fdaa:1:be23:a7b:7f47:f984:58b9:2]:22 (DNS: [fdaa::3]:53)
2023-03-29T14:47:06.642 app[1781913a956589] hkg [info] [2023-03-29 14:47:06 +0000] [522] [INFO] Starting gunicorn 20.1.0
2023-03-29T14:47:06.642 app[1781913a956589] hkg [info] [2023-03-29 14:47:06 +0000] [522] [INFO] Listening at: (522)

Is that I must allocate fixed ip and add certificate to it?

Hey @ThinkingInCrowd, where are you getting the “unknown host error” message from? Are you trying to access thinkwgpt.fly.dev in your browser?

It sounds like you’re on the right track here, and you’re right, everything you posted about your app status and logs looks fine!

I did notice that thinkwgpt.fly.dev doesn’t resolve to any IP addresses, though (I checked with dig), so I think you might be right about allocating an IP address for your app. fly ips list should tell you whether you have any allocated IPs yet.

Hi @MatthewIngwersen , thanks for your reply. fly ips list does not return anything.

Isn’t the allocating IP paid feature? I am just using Free Plan and shouldn’t it work without manually allocating it? The docs does not say anything about allocating IP for App deployment and Trial. That is kind of strange.

Without allocating a public IP address for your app, you won’t be able to reach it. While allocating a dedicated IPv4 address is a paid feature, a shared IPv4 address and an IPv6 address won’t cost you anything extra. You can do that with fly ips allocate-v4 --shared and fly ips allocate-v6.

Out of curiosity, what command(s) did you run to create your app, or what guide (if any) were you following? IP addresses are usually allocated automatically by fly launch, so if you created your app with it, it’s possible there’s a bug somewhere.

Thanks very much. It’s OK now.

I tried the web shell command to directly clone one of my git repo and deploy. The repo is forked and it already contains one fly.toml there. When following the web shell deployment step, I chosen N to not copy the fly.toml. It overwrites the original fly.toml file but failed somehow.

One thing led to another and I cannot provide you the exact steps. The things is that I have a mount drive there and I need to manually create machine/volume and assigns to my app later.

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