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

Bug: Can't bind to fly-local-6pn:8000 #2360

Closed
2 tasks done
abegehr opened this issue Jul 30, 2023 · 3 comments
Closed
2 tasks done

Bug: Can't bind to fly-local-6pn:8000 #2360

abegehr opened this issue Jul 30, 2023 · 3 comments
Labels
bug Something isn't working triage This issue is new

Comments

@abegehr
Copy link

abegehr commented Jul 30, 2023

Describe the bug

I've deployed surreal to fly.io as described here: https://surrealdb.com/docs/deployment/fly
So far so good! Now I'm trying to access the app service from another app on the same organization by internal host name: db-123.internal (see docs here). Pings to db-123.internal work but I can't reach surreal db at db-123.internal:8000. Researching fly.io docs, it turns out I need to bind to fly-local-6pn instead of 0.0.0.0 for internal routing to work: https://fly.io/docs/getting-started/app-services/#a-note-on-ipv4-and-ipv6-wildcards
When I update the Dockerfile CMD to bind to fly-local-6pn:8080, SurrealDB fails to start:

error: Invalid value "fly-local-6pn:8000" for '--bind <bind>': Provide a valid network bind parameter

Steps to reproduce

Follow the steps here but bind to fly-local-6pn instead of 0.0.0.0:

CMD ["start", "--bind", "fly-local-6pn:8080", "file://data/srdb.db"]

Expected behaviour

I expect SurrealDB to support binding to the host fly-local-6pn as defined in /etc/hosts.

SurrealDB version

1.0.0-beta.9+20230402.5eafebd for linux on aarch64

Contact Details

anton@begehr.me

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@abegehr abegehr added bug Something isn't working triage This issue is new labels Jul 30, 2023
@abegehr
Copy link
Author

abegehr commented Jul 30, 2023

For anyone else running into this, using the IPv6 wildcard [::] seems to work. My hypothesis is that the internal app service only gets an IPv6 and therefore the IPv4 wildcard 0.0.0.0 is not resolved. Still, according to Fly.io, we should bind to fly-local-6pn instead of a wildcard: https://fly.io/docs/getting-started/app-services/#a-note-on-ipv4-and-ipv6-wildcards

@abegehr
Copy link
Author

abegehr commented Jul 30, 2023

I've cross-posted on Fly.io community forums for how to bind to fly-local-6pn: https://community.fly.io/t/bind-to-host-fly-local-6pn/14511?u=abegehr

@abegehr
Copy link
Author

abegehr commented Jul 31, 2023

Binding to [::] is the way to go.

@abegehr abegehr closed this as completed Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue is new
Projects
None yet
Development

No branches or pull requests

1 participant