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: warning always received about multiple bind addresses #1408

Closed
Cherry opened this issue Sep 13, 2023 · 8 comments · Fixed by #1487
Closed

🐛 BUG: warning always received about multiple bind addresses #1408

Cherry opened this issue Sep 13, 2023 · 8 comments · Fixed by #1487
Labels
bug Something isn't working

Comments

@Cherry
Copy link
Contributor

Cherry commented Sep 13, 2023

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

3.8.0

What version of Node are you using?

18.17.1

What operating system are you using?

Windows 10

Describe the Bug

Every time that you start wrangler dev, you get a large red error like so (from workerd it would seem):

kj/async-io-win32.c++:982: warning: Bind address resolved to multiple addresses.  Only the first address will be used.  If this is incorrect, specify the address numerically.  This may be fixed in the future.; addrs[0].toString() = 127.0.0.1:59208

It's possible that this only occurs in Windows, or when a machine has multiple network adapters. Hitting b still works fine, and opening up http://127.0.0.1:8787/ is fine too, so perhaps the error should just be hidden?

Reproduction steps

  • npm create cloudflare@latest
  • use all defaults
  • cd into worker dir and run npm start
@Cherry Cherry added the bug Something isn't working label Sep 13, 2023
@Cherry Cherry changed the title 🐛 BUG: warning always received about multiple interfaces 🐛 BUG: warning always received about multiple bind addresses Sep 13, 2023
@edge-rps
Copy link

edge-rps commented Sep 15, 2023

I was installing PartyKit.io that uses cf and got the same error.

Windows 10

image

@goktugcy
Copy link

Same error

Windows 11

Ekran görüntüsü 2023-09-17 235454

@william0bra
Copy link

william0bra commented Sep 26, 2023

Same here.

image
Windows 10

Multiple ips provided, but no one seems to be working.

[EDIT]
When I tried Astro's guide, the error appeared, and no URL was working.
https://docs.astro.build/en/guides/integrations-guide/cloudflare

Starting it with 'npm create cloudflare@latest' made that work despite the errors, but not loading env vars to Astro.locals.runtime.
https://developers.cloudflare.com/workers/get-started/guide/

@Cherry
Copy link
Contributor Author

Cherry commented Sep 27, 2023

This also appears every single time the server reloads too.

@genesem
Copy link

genesem commented Oct 12, 2023

Found a quick fix of the above for win10.

Use wrangler with parameter: --ip=127.0.0.1 to specify exact ip to bind.

@ghost
Copy link

ghost commented Oct 17, 2023

Found a quick fix of the above for win10.

Use wrangler with parameter: --ip=127.0.0.1 to specify exact ip to bind.

I still get the error, but its acting like there is only one address, so rebuilds work now. Thanks 👍

@kentonv
Copy link
Member

kentonv commented Nov 13, 2023

I suspect this is because localhost maps to two addresses -- one ipv4 (127.0.0.1) and one ipv6 (::1). workerd is telling you that it doesn't know how to listen on both addresses at once, so it chose to listen only to the ipv4 address.

This isn't a big deal in practice because everything trying to connect to "localhost" will almost certainly use the first address first, which is the one workerd bound to, so things will just work fine.

That said, it turns out I actually fixed this on the Unix side a while ago: capnproto/capnproto@f812158

But I didn't update async-io-win32.c++. If someone makes the same change to async-io-win32.c++ as was made to async-io-unix.c++ in that commit, it should allow workerd to bind to both IPs at once.

@1000hz
Copy link
Contributor

1000hz commented Dec 9, 2023

This should be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants