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

Connecting to TLS Port not working #2

Open
Dominion0815 opened this issue Aug 26, 2020 · 3 comments
Open

Connecting to TLS Port not working #2

Dominion0815 opened this issue Aug 26, 2020 · 3 comments

Comments

@Dominion0815
Copy link

Hi,

I'm using blabber.im account. The server has several SRV records and from time to time BOT can't connect.
Is it possible to ignore TLS port 443 or to set a fix hostname with port 5222 ?

Here is the error message:

Invalid debugflag given: always
Invalid debugflag given: nodebuilder
DEBUG:
DEBUG: Debug created for /usr/lib/python2.7/dist-packages/xmpp/client.py
DEBUG:  flags defined: always,nodebuilder
DEBUG: socket       start Plugging <xmpp.transports.TCPsocket instance at 0x7f47a7d1d5f0> into <xmpp.client.Client instance at 0x7f47a7d1d518>
DEBUG: socket       start Successfully connected to remote host ('erebos.xmpp.blabber.im.', 443)
DEBUG: tls          start Plugging <xmpp.transports.TLS instance at 0x7f47a7d1d638> into <xmpp.client.Client instance at 0x7f47a7d1d518>
Traceback (most recent call last):
  File "bot.py", line 232, in <module>
    cl.connect(proxy=settings.proxy)
  File "/usr/lib/python2.7/dist-packages/xmpp/client.py", line 200, in connect
    if not CommonClient.connect(self,server,proxy,secure,use_srv) or secure<>None and not secure: return self.connected
  File "/usr/lib/python2.7/dist-packages/xmpp/client.py", line 178, in connect
    transports.TLS().PlugIn(self,now=1)
  File "/usr/lib/python2.7/dist-packages/xmpp/transports.py", line 274, in PlugIn
    if now: return self._startSSL()
  File "/usr/lib/python2.7/dist-packages/xmpp/transports.py", line 308, in _startSSL
    tcpsock._sslObj    = ssl.wrap_socket(tcpsock._sock, None, None)
  File "/usr/lib/python2.7/ssl.py", line 931, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/ssl.py", line 599, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/ssl.py", line 828, in do_handshake
    self._sslobj.do_handshake()
socket.error: [Errno 0] Error

Best regards
Dominion

@gjedeer
Copy link
Owner

gjedeer commented Aug 27, 2020

Do you know any Python?

It should be possible to do

cl.Connect(server=('xmpp.blabber.im', 5222), use_srv=False, proxy=settings.proxy)

in bot.py:232, if you succeed with this then a patch to turn it into a setting would be welcome.

@Dominion0815
Copy link
Author

no python knowledge here ;)
It works, thanks!

It would be good if this would be added to the settings.

@gjedeer
Copy link
Owner

gjedeer commented Aug 30, 2020

Hey, I'm glad it worked. Will add to settings when I have more time. Thanks for testing!

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