-
🐞 Describe the bug
But if you open this exact URL, both Firefox and Edge browsers will say "Connection attempt failed". 💡 To Reproduce
from aiohttp import web
app = web.Application()
web.run_app(app) 💡 Expected behavior 📋 Your version of the Python 📋 Your version of the aiohttp/yarl/multidict distributions |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Using What aiohttp log outputs is the ephemeral bind-all address that it listens to. But it needs to be accessed by the concrete address your network interfaces have. That may be either the localhost loopback interface (127.0.0.1) or some other address your computer got assigned in your LAN. Remember: the loopback only works for connections from within the same host (operating system to be precise) while other addresses may be accessible from the LAN given that they are routable. Ref: |
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
-
ufw allow 8080 |
Beta Was this translation helpful? Give feedback.
0.0.0.0
is a catch-all wildcard for binding to all the interfaces available on the machine as opposed to listening to only one specific address. Strictly speaking, it does not have any semantical meaning in terms of routing traffic to a specific location. So when the client says "I want to send some bytes to 0.0.0.0", technically this doesn't mean anything. While saying "send the traffic to 127.0.0.1" (or "localhost" for that matter) should work because the networking subsystem can look that up in the routing table and will know where to send your queries over the network.Using
0.0.0.0
only makes sense on the server-side in terms of binding to machine-local network interfaces. Some opera…