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

Deployed on Fly.io, 2.6.0 needs to set HOSTNAME #2239

Closed
aaro-n opened this issue Aug 30, 2023 · 8 comments
Closed

Deployed on Fly.io, 2.6.0 needs to set HOSTNAME #2239

aaro-n opened this issue Aug 30, 2023 · 8 comments
Labels
troubleshooting Troubleshooting request

Comments

@aaro-n
Copy link

aaro-n commented Aug 30, 2023

Describe the Bug

2.6.0 needs to set HOSTNAME to 0.0.0.0, the previous version does not need to set HOSTNAME=0.0.0.0 to work normally.

Database

PostgreSQL

Relevant log output

2023-08-30T05:45:01.494 app[4d89440be57587] nrt [info] - ready started server on [::1]:8080, url: http://[::1]:8080

2023-08-30T05:45:28.810 proxy[4d89440be57587] nrt [error] instance refused connection. is your app listening on 0.0.0.0:8080? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)

2023-08-30T05:45:39.257 proxy[4d89440be57587] nrt [error] instance refused connection. is your app listening on 0.0.0.0:8080? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)

Which browser are you using? (if relevant)

Chrome

How are you deploying your application? (if relevant)

Fly.io,Docker

@franciscao633
Copy link
Collaborator

This seems oddly similar to #2245 for a different provider. We currently don't have Fly.io docs, but goods heads up.

@paulrudy
Copy link

paulrudy commented Aug 30, 2023

Can I ask how you are applying the HOSTNAME? Like this in fly.toml?

[build.args]
DATABASE_TYPE = "postgresql"
HOSTNAME = "0.0.0.0"

I'm having what might be a different issue (#2248) on fly.io, and not yet sure if this issue is related.

@mikecao mikecao added the troubleshooting Troubleshooting request label Aug 31, 2023
@benscobie
Copy link

Most likely related to this and tagged issues: vercel/next.js#54926

@pstadler
Copy link

You can fix this with an environment variable in fly.toml:

[env]
  HOSTNAME = "0.0.0.0"

@paulrudy
Copy link

@pstadler Thanks! If v2.6.x is working for you on Fly, I'd be grateful if you have a moment to look at my issue #2248. I haven't been able to get my instance running with v2.6.x, although it was working fine on v.2.5.x, and this HOSTNAME issue doesn't seem to be related.

@pstadler
Copy link

No problem for me using this image: https://github.com/umami-software/umami/pkgs/container/umami/123905077?tag=postgresql-latest

@paulrudy
Copy link

paulrudy commented Sep 18, 2023

No problem for me using this image: https://github.com/umami-software/umami/pkgs/container/umami/123905077?tag=postgresql-latest

Thanks, I really appreciate it. I was deploying by pulling and merging from the Umami source, with a couple of minor changes to the source Dockerfile, plus a fly.toml. Deploying from the container is simpler, and now everything works again (after adding HOSTNAME 🥳

@aaro-n
Copy link
Author

aaro-n commented Sep 27, 2023

Problem solved, issue closed. .

@aaro-n aaro-n closed this as completed Sep 27, 2023
otsuneko added a commit to otsuneko/golang-todo-app that referenced this issue Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
troubleshooting Troubleshooting request
Projects
None yet
Development

No branches or pull requests

6 participants