question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Secure WebSocket connection error on twisted version

See original GitHub issue

I try to connect to my remote router: https://gist.github.com/spiiin/5f425e2c769e766bb5fb8d4a51b65bbc I have ssl-certificate on router valid for name “example.com”, but looks like this code, try to connect via IP-address, not via server name so I have ssl verification error (I think, i see any logs, but only forever connection attempt)

I check code with Python 2.7 & Python 3.6 on windows and ubuntu, using version of autobahn installed via pip, nothing works.

If I change first line of code to: from autobahn.asyncio.wamp import ApplicationRunner connection established as expected, so, possible, bug in twisted library. I normally connects to remote router via domain name, but not via ip (as expected - certificate valid for domain name only).

I also check this idea with autobahn-js - default router page https://example.com:8080/frontend.html connects as expected, but http://1.2.3.4:8080/frontend.html (where 1.2.3.4 - ip of my example server) shows me “SSL_ERROR_BAD_CERT_DOMAIN - certificate valid only for name: example.com”

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
meejahcommented, Dec 13, 2017

Can you try installing with pip install autobahn[encryption] (that is, include the “encryption” extra)?

0reactions
oberstetcommented, Mar 23, 2018

cannot reproduce

Read more comments on GitHub >

github_iconTop Results From Across the Web

wss tornado connection issues - websocket - Stack Overflow
The tornado error message means that an http request is being sent to an https port. I was loading the javascript from an...
Read more >
Can't run any websocket example on binance-connector ...
This is a known issue with pyOpenSSL package on windows. The bug is that twisted does not includes a trust root sets of...
Read more >
Getting Connected with Endpoints - the Twisted documentation!
If you receive such an error, it means that your application is not actually listening, and will not receive any incoming connections.
Read more >
Source code for autobahn.twisted.websocket
isSecure: # create default client SSL context factory when none given from twisted.internet import ssl context_factory = ssl.
Read more >
How to use the autobahn.twisted.websocket ... - Snyk
def start(self): "Connect protocol to remote server" try: from twisted.internet import ssl except ImportError: log_err("To use Grapevine, The PyOpenSSL module ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found