Thanks to visit codestin.com
Credit goes to github.com

Skip to content

server.py fails to run when system hostname is not 'localhost' #9

@lumberjackgames

Description

@lumberjackgames

I'm on Ubuntu server lts with a unique hostname. When I ran server.py, I got the following error:

=====================================
Starting relay. Press Ctrl-C to exit.
=====================================
Traceback (most recent call last):
  File "server.py", line 216, in <module>
    loop.run_until_complete(futures)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "server.py", line 206, in runServer
    await site.start()
  File "/home/minetest/.local/lib/python3.8/site-packages/aiohttp/web_runner.py", line 121, in start
    self._server = await loop.create_server(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1463, in create_server
    raise OSError(err.errno, 'error while attempting '
OSError: [Errno 99] error while attempting to bind on address ('::1', 8080, 0, 0): cannot assign requested address

I was able to work around this by changing 'localhost' to '127.0.0.1' on this line

I can make a PR if wanted, but just dropping this here for now in case anyone runs into this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions