I am running 0.63.3 in a Docker container, with InfluxDb in another container. I updated Home-assistant and I started getting a lot of these messages in the log (log-level is set to debug). Other clients writing to the influxdb do not experience issues (I think :p).
2018-02-18 22:34:30 ERROR (InfluxDB) [homeassistant.components.influxdb] Resumed writing to InfluxDB
2018-02-18 22:35:03 ERROR (InfluxDB) [homeassistant.components.influxdb] Error writing to InfluxDB
2018-02-18 22:35:08 ERROR (InfluxDB) [homeassistant.components.influxdb] Resumed writing to InfluxDB
2018-02-18 22:35:12 WARNING (InfluxDB) [homeassistant.components.influxdb] Dropping old events to catch up
2018-02-18 22:35:17 WARNING (InfluxDB) [homeassistant.components.influxdb] Dropping old events to catch up
2018-02-18 22:36:31 ERROR (InfluxDB) [homeassistant.components.influxdb] Error writing to InfluxDB
2018-02-18 22:36:41 WARNING (InfluxDB) [homeassistant.components.influxdb] Dropping old events to catch up
2018-02-18 22:37:30 ERROR (InfluxDB) [homeassistant.components.influxdb] Resumed writing to InfluxDB
I started seeing these errors when I upgraded to 0.63.3, I think. I’ll see if I can downgrade and try again. I am running home-assistant and influxdb in docker containers. A problem with my setup is that I use the local IP-adress of the Raspberry instead of the internal Docker IP-address, but I haven’t changed that since it last worked.
This is odd, but I think it is a local problem with your setup since nobody else has reported any issue. I updated my work-in-progress so if you can copy the same file to custom_components, it will log even more information. You can PM me the log and I will have a look.
I just setup influxdb and grafana today and I have encountered the same issue. I see the data getting written but every 2-3 minutes the logs get the same error. I have influxdb installed locally on ubuntu server
@amelchio let me know if you need more information.
Thanks @amelchio for all your help! I don’t see in the logs how many retransmissions are needed, and can’t tell why (apparantly) more were needed, but at least it seems to work.
The errors I am getting are requests.exceptions.ReadTimeout: HTTPConnectionPool(host='influxdb', port=8086): Read timed out. (read timeout=5) (longer printout in pm). Changing max_retries to 3, still works. The errors come back if I remove max_retries.
What a fix ever discovered? I’ve been having this ever since I installed InfluxDB. I recently added a custom alarm panel and it forgets my alarm settings once in a while when I restart, so it has become a priority for me to fix. Whenever I restart the Home Assistant docker container I see errors like this in the log:
2018-05-08 14:17:11 ERROR (InfluxDB) [custom_components.influxdb] Resumed, lost 13 events
2018-05-08 14:17:11 DEBUG (InfluxDB) [custom_components.influxdb] Wrote 19 events
OK, so after removing the old component version… I now only get the error when the PVOutput.sensor is enabled. I will do some tests and verify that is the only time this error occurs.
2018-05-08 22:32:51 ERROR (InfluxDB) [homeassistant.components.influxdb] Write error
Traceback (most recent call last):
File "/usr/src/app/homeassistant/components/influxdb.py", line 312, in write_to_influxdb
self.influx.write_points(json)
File "/usr/local/lib/python3.6/site-packages/influxdb/client.py", line 468, in write_points
tags=tags, protocol=protocol)
File "/usr/local/lib/python3.6/site-packages/influxdb/client.py", line 532, in _write_points
protocol=protocol
File "/usr/local/lib/python3.6/site-packages/influxdb/client.py", line 312, in write
headers=headers
File "/usr/local/lib/python3.6/site-packages/influxdb/client.py", line 271, in request
raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 400: {"error":"partial write: unable to parse 'state,domain=sensor,entity_id=pvoutput custom_ui_state_card_str=\"state-card-custom-ui\",efficiency=0.709,energy_consumption=nan,energy_generation=24917.0,friendly_name_str=\"PVOutput\",power_consumption=nan,power_generation=4076.0,show_last_changed=1.0,state_card_mode_str=\"badges\",temperature=nan,value=24917.0,voltage=nan 1525818770111304960': invalid number dropped=0"}
If disabling the PVOutput component is all I need to make the database write reliably, then I have other ways to get that data.