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

Forecast.io SSL errors #3600

Closed
cbulock opened this issue Sep 29, 2016 · 6 comments
Closed

Forecast.io SSL errors #3600

cbulock opened this issue Sep 29, 2016 · 6 comments

Comments

@cbulock
Copy link
Contributor

cbulock commented Sep 29, 2016

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
0.29.3

Python release (python3 --version):
3.4.2

Component/platform:
components/sensor.forecast

Description of problem:
The component appears to still be working fine, I have weather data showing in HASS, however, the logs keep showing these errors. (pasted below)

Expected:
No errors

Problem-relevant configuration.yaml entries and steps to reproduce:

- platform: forecast
  api_key: !secret HA_FORECAST_API
  monitored_conditions:
    - summary
    - precip_probability
    - temperature
    - apparent_temperature
    - wind_speed
    - humidity

Traceback (if applicable):

16-09-29 17:02:31 homeassistant.core: BusHandler:Exception doing job
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 595, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 352, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 831, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 289, in connect
    ssl_version=resolved_ssl_version)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/ssl_.py", line 308, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.4/ssl.py", line 364, in wrap_socket
    _context=self)
  File "/usr/lib/python3.4/ssl.py", line 577, in __init__
    self.do_handshake()
  File "/usr/lib/python3.4/ssl.py", line 804, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 621, in urlopen
    raise SSLError(e)
requests.packages.urllib3.exceptions.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/forecast.py", line 273, in update
    self._api_key, self.latitude, self.longitude, units=self.units)
  File "/home/pi/.homeassistant/deps/forecastio/api.py", line 41, in load_forecast
    return manual(baseURL, callback=callback)
  File "/home/pi/.homeassistant/deps/forecastio/api.py", line 51, in manual
    return get_forecast(requestURL)
  File "/home/pi/.homeassistant/deps/forecastio/api.py", line 59, in get_forecast
    forecastio_reponse = requests.get(requestURL)
  File "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 70, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 497, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/core.py", line 1162, in job_handler
    func(*args)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 229, in _update_entity_states
    entity.update_ha_state(True)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 154, in update_ha_state
    self.update()
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/forecast.py", line 183, in update
    self.forecast_data.update()
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/util/__init__.py", line 296, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/forecast.py", line 275, in update
    raise ValueError("Unable to init Forecast.io. - %s", error)
ValueError: ('Unable to init Forecast.io. - %s', SSLError(SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:600)'),),))
16-09-29 17:10:41 pychromecast.socket_client: Error communicating with socket, resetting connection
16-09-29 17:18:01 homeassistant.core: BusHandler:Exception doing job
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 595, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 352, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 831, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 289, in connect
    ssl_version=resolved_ssl_version)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/ssl_.py", line 308, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.4/ssl.py", line 364, in wrap_socket
    _context=self)
  File "/usr/lib/python3.4/ssl.py", line 577, in __init__
    self.do_handshake()
  File "/usr/lib/python3.4/ssl.py", line 804, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 621, in urlopen
    raise SSLError(e)
requests.packages.urllib3.exceptions.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/forecast.py", line 273, in update
    self._api_key, self.latitude, self.longitude, units=self.units)
  File "/home/pi/.homeassistant/deps/forecastio/api.py", line 41, in load_forecast
    return manual(baseURL, callback=callback)
  File "/home/pi/.homeassistant/deps/forecastio/api.py", line 51, in manual
    return get_forecast(requestURL)
  File "/home/pi/.homeassistant/deps/forecastio/api.py", line 59, in get_forecast
    forecastio_reponse = requests.get(requestURL)
  File "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 70, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 497, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/core.py", line 1162, in job_handler
    func(*args)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 229, in _update_entity_states
    entity.update_ha_state(True)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 154, in update_ha_state
    self.update()
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/forecast.py", line 183, in update
    self.forecast_data.update()
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/util/__init__.py", line 296, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/forecast.py", line 275, in update
    raise ValueError("Unable to init Forecast.io. - %s", error)
ValueError: ('Unable to init Forecast.io. - %s', SSLError(SSLError(SSLError(1, '[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:600)'),),))

Additional info:

@blocke
Copy link

blocke commented Sep 30, 2016

Having the same issue.

The server is exposing a certificate with a primary subject of "CN=darksky.net" with a crapload of subjectAltNames. I'm wondering if the requests module is properly handling that.

@fanaticDavid
Copy link
Contributor

Seeing the same errors in my HASS log, running version 0.28.2.

It seems Forecast.io changing their name to Dark Sky is already causing issues with the component...

@fabaff
Copy link
Member

fabaff commented Sep 30, 2016

My guess is that this could be fixed with #3470 when the dependency is up-to-date.

@brmo
Copy link

brmo commented Sep 30, 2016

Seems like this may of been the cause, at least with all the SSL errors? http://status.darksky.net/2016/09/28/downtime-incident.html

@fanaticDavid
Copy link
Contributor

Ah, indeed. The last SSL error for Forecast.io in my HASS log was almost 8 hours ago.

@cbulock
Copy link
Contributor Author

cbulock commented Sep 30, 2016

I'm going to close this as I'm no longer seeing the error anymore, and based on the message, it does appear to be related to the downtime incident that was reported.

@cbulock cbulock closed this as completed Sep 30, 2016
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants