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

SSL: CERTIFICATE_VERIFY_FAILED #122

Open
vzlgdu opened this issue May 25, 2023 · 10 comments
Open

SSL: CERTIFICATE_VERIFY_FAILED #122

vzlgdu opened this issue May 25, 2023 · 10 comments

Comments

@vzlgdu
Copy link

vzlgdu commented May 25, 2023

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)

@twrecked
Copy link
Owner

Arlo broke the back end, you can see here: twrecked/hass-aarlo#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

@vzlgdu
Copy link
Author

vzlgdu commented May 25, 2023

Thanks. Solved with your suggest.

@vzlgdu
Copy link
Author

vzlgdu commented Jun 1, 2023

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

@twrecked
Copy link
Owner

twrecked commented Jun 1, 2023

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.

@vzlgdu
Copy link
Author

vzlgdu commented Jun 1, 2023 via email

@twrecked
Copy link
Owner

twrecked commented Jun 1, 2023

Add this option to your PyArlo command backend=sse.

Steve

@vzlgdu
Copy link
Author

vzlgdu commented Jun 1, 2023 via email

@twrecked
Copy link
Owner

twrecked commented Jun 1, 2023

My bad; backend="sse"

@vzlgdu
Copy link
Author

vzlgdu commented Jun 1, 2023 via email

@vzlgdu
Copy link
Author

vzlgdu commented Jun 3, 2023

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

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