socket.gaierror Name or service not known
GillHD opened this issue · 1 comments
Good afternoon, while trying to start the server, there was a problem.
sudo sstpd -p 443 -c ~/crts/cert.pem -k ~/crts/key.pem
2021-08-16 18:38:12,968 INFO: Cert SHA-1: cfe84a32f3e704fa4759182666c6ab1ccc08b0b0
2021-08-16 18:38:12,968 INFO: Cert SHA-256: 333d033ece684c297b997af6e7ddc24d6c132daa90dceb8aba61c620578d487b
2021-08-16 18:38:12,969 INFO: Running without uvloop
Traceback (most recent call last):
File "/usr/local/bin/sstpd", line 8, in <module> sys.exit(run())
File "/usr/local/lib/python3.8/dist-packages/sstpd/__init__.py", line 9, in run main()
File "/usr/local/lib/python3.8/dist-packages/sstpd/__main__.py", line 168, in main server = loop.run_until_complete(coro)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result()
File "/usr/lib/python3.8/asyncio/base_events.py", line 1429, in create_server infos = await tasks.gather(*fs, loop=self)
File "/usr/lib/python3.8/asyncio/base_events.py", line 1369, in _create_server_getaddrinfo infos = await self._ensure_resolved((host, port), family=family,
File "/usr/lib/python3.8/asyncio/base_events.py", line 1365, in _ensure_resolved return await loop.getaddrinfo(host, port, family=family, type=type,
File "/usr/lib/python3.8/asyncio/base_events.py", line 825, in getaddrinfo return await self.run_in_executor(
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
system: ubuntu server 20.04
preinstalled: pptpd
Found a solution:
The example is missing an argument when starting the server, namely, specifying the address to listen to.
A correct example would be:
sudo sstpd -l 0.0.0.0 -p 443 -c cert.pem -k key.pem --local 10.0.0.1 --remote 10.0.0.0/24