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

Error 505: The peer address is not reachable #19

Open
matanhaller opened this issue Jan 8, 2018 · 2 comments
Open

Error 505: The peer address is not reachable #19

matanhaller opened this issue Jan 8, 2018 · 2 comments

Comments

@matanhaller
Copy link

I tried running the simple_client.py test that's available in the package and I get the following traceback:

DEBUG:dtls.sslconnection:Initiating handshake...
DEBUG:dtls.openssl:SSL error raised: ssl_error: 5, result: -1, errqueue: [], func_name: SSL_do_handshake
DEBUG:dtls.sslconnection:Freeing SSL: 98835056
DEBUG:dtls.sslconnection:Freeing SSL CTX: 92355984
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\dtls\test\simple_client.py", line 11, in
sock.connect(('localhost', 28000))
File "C:\Python27\lib\ssl.py", line 876, in connect
self._real_connect(addr, False)
File "C:\Python27\lib\site-packages\dtls\patch.py", line 272, in _SSLSocket_real_connect
raise e
ssl.SSLError: 505: The peer address is not reachable(5, [], -1, <CFunctionType object at 0x0000000005F83118>, (<dtls.openssl.SSL object at 0x0000000005F93470>,))

Any explanation?

Thanks in advance!

@rbit
Copy link
Owner

rbit commented Jan 8, 2018 via email

@matanhaller
Copy link
Author

I tried running this server and it worked, but when I try building a server myself I remain with the same mistake. Here's my basic server logic:

from dtls import do_patch

do_patch()

ADDR = ('0.0.0.0', 1234)

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(ADDR)
ssl_sock = ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_DTLSv1_2,
server_side=True, certfile='cert.pem',
keyfile='key.pem')

ssl_sock.listen(5)
conn, addr = ssl_sock.accept()

What's the problem with the code?

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

2 participants