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

socket.gaierror Name or service not known #45

Open
GillHD opened this issue Aug 16, 2021 · 1 comment
Open

socket.gaierror Name or service not known #45

GillHD opened this issue Aug 16, 2021 · 1 comment

Comments

@GillHD
Copy link

GillHD commented Aug 16, 2021

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

@GillHD
Copy link
Author

GillHD commented Aug 16, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant