pyaarlo icon indicating copy to clipboard operation
pyaarlo copied to clipboard

SSL: CERTIFICATE_VERIFY_FAILED

Open vzlgdu opened this issue 1 year ago • 10 comments

Hi,

is there a way to fix this?

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'mqtt-cluster.arloxcld.com'. (_ssl.c:1056)

vzlgdu avatar May 25 '23 08:05 vzlgdu

Arlo broke the back end, you can see here: https://github.com/twrecked/hass-aarlo/issues/741

You need to upgrade to the latest version and then you need to pass one of these arguements to PyArlo to bypass the issue:

mqtt_hostname_check=False to bypass the certificate checking

or

mqtt_host=mqtt-cluster-z1.arloxcld.com to use a fixed host

twrecked avatar May 25 '23 16:05 twrecked

Thanks. Solved with your suggest.

vzlgdu avatar May 25 '23 19:05 vzlgdu

Hi I't running without problem for a week using this configuration:

arlo = pyaarlo.PyArlo( username='[email protected]',password='yyyy, mqtt_hostname_check=False, tfa_type='email',tfa_source='imap', synchronous_mode=True,save_state=False, tfa_host='imap.gmail.com', tfa_username='xxxxx, tfa_password='zzzz', tfa_nickname='[email protected]')

this morning, after an internet failure, I'm receiving this error:

general-error=gaierror Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/pyaarlo/backend.py", line 519, in _mqtt_main self._event_client.connect(self._arlo.cfg.mqtt_host, port=443, keepalive=60) File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 937, in connect return self.reconnect() File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1071, in reconnect sock = self._create_socket_connection() File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection return socket.create_connection(addr, source_address=source, timeout=self._keepalive) File "/usr/lib/python3.7/socket.py", line 707, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

Please, let me know.

Thanks

vzlgdu avatar Jun 01 '23 12:06 vzlgdu

It's a dns issue. Running the following command and here it looks like they changed their mqtt servers.

dig +short mqtt-cluster.arloxcld.com

You could try changing to the sse back end for now. Or, if you're good with Chrome you could use the developer tools to find out where they changed it to. None of my installations use mqtt so I'm relying on external help for this.

twrecked avatar Jun 01 '23 13:06 twrecked

Hi, thanks for you support, but I don’t understand what should I do when you write this: “You could try changing to the sse back end for now” Please, let me know. Thanks Inviato da Posta per Windows Da: Steve HerrellInviato: giovedì 1 giugno 2023 15:05A: twrecked/pyaarloCc: vzlgdu; AuthorOggetto: Re: [twrecked/pyaarlo] SSL: CERTIFICATE_VERIFY_FAILED (Issue #122) It's a dns issue. Running the following command and here it looks like they changed their mqtt servers.dig +short mqtt-cluster.arloxcld.comYou could try changing to the sse back end for now. Or, if you're good with Chrome you could use the developer tools to find out where they changed it to. None of my installations use mqtt so I'm relying on external help for this.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***> 

vzlgdu avatar Jun 01 '23 14:06 vzlgdu

Add this option to your PyArlo command backend=sse.

Steve

twrecked avatar Jun 01 '23 14:06 twrecked

I receive an error using this:         backend=sse,        mqtt_hostname_check=False,        tfa_type='email',tfa_source='imap',        synchronous_mode=True,save_state=False,        tfa_host='imap.gmail.com',  backend=sse,NameError: name 'sse' is not defined  Inviato da Posta per Windows Da: Steve HerrellInviato: giovedì 1 giugno 2023 16:58A: twrecked/pyaarloCc: vzlgdu; AuthorOggetto: Re: [twrecked/pyaarlo] SSL: CERTIFICATE_VERIFY_FAILED (Issue #122) Add this option to your PyArlo command backend=sse.Steve—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***> 

vzlgdu avatar Jun 01 '23 15:06 vzlgdu

My bad; backend="sse"

twrecked avatar Jun 01 '23 15:06 twrecked

Great! It works again! Thanks Inviato da Posta per Windows Da: Steve HerrellInviato: giovedì 1 giugno 2023 17:12A: twrecked/pyaarloCc: vzlgdu; AuthorOggetto: Re: [twrecked/pyaarlo] SSL: CERTIFICATE_VERIFY_FAILED (Issue #122) My bad; backend="sse"—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***> 

vzlgdu avatar Jun 01 '23 15:06 vzlgdu

Hi, using backend='sse' the login works fine without errors, but in a simple script like this

istuctions for login using backend='sse' base = arlo.base_stations[0] base.mode = 'Giorno' the new mode was set correctly, but the script ends after some minutes generating this errors:

attempt 1: error in response when setting mode= None attempt 2: error in response when setting mode= None

attempt 3: error in response when setting mode= None Failed to set mode. <RequestsCookieJar[Cookie(version=0, name='__cf_bm', value='67v7vxgl0n9En_2UWcIEYuGHqsZ9ZIBE_L0ruHMor3w-1685645690-0-ARx4g/Zegzr5NIB8OZ23NQy6SYEhG9lUcKaWO6CuLYv+tiZrjlLKQjIX8U0scAw1tW45Wqi3ae5oeSp9QPu7ZDg=', port=None, port_specified=False, domain='.myapi.arlo.com', domain_specified=True, domain_initial_dot=True, path='/', path_specified=True, secure=True, expires=1685647490, discard=False, comment=None, comment_url=None, rest={'HttpOnly': None, 'SameSite': 'None'}, rfc2109=False), Cookie(version=0, name='JSESSIONID', value='910082F82BEA4F9DC242B68B25C3D139', port=None, port_specified=False, domain='myapi.arlo.com', domain_specified=False, domain_initial_dot=False, path='/hmsweb', path_specified=True, secure=True, expires=None, discard=True, comment=None, comment_url=None, rest={'HttpOnly': None}, rfc2109=False)]>

What do you think about?

Thanks

vzlgdu avatar Jun 03 '23 09:06 vzlgdu