core: HA InfluxDB integration fails with Read-only file system error following upgrade to Docker 25.0.x

The problem

Following an upgrade from docker-ce 24.0.7 to 25.0.1 the InfluxDB integration fails with the error message,

ERROR (influxdb) [homeassistant.components.influxdb] Cannot connect to InfluxDB due to '[Errno 30] Read-only file system'. Please check that the provided connection details (host, port, etc.) are correct and that your InfluxDB server is running and accessible.

No data is received in InfluxDB from HA after the upgrade from docker-ce 24.0.7 to 25.0.1.

The ‘[Errno 30] Read-only file system’ error message appears to be coming from a influx.write_api call in this code block of the InfluxDB integration.

The error may be caused by a change in mounting behavior introduced in moby v25.0.x that prevents multiprocessing from creating a /dev/shm file, as reported in this moby/issues/47158 issue. The influxdb python client uses multiprocessing.

If the issue is python multiprocessing and docker-ce 25.0.x related, other HA integrations that use multiprocessing may be impacted

Downgrading from docker-ce 25.0.1 to 24.0.7 restores the HA InfluxDB integration functionality, suggesting it is an issue brought about by a change introduced in docker-ce 25.0.x.

What version of Home Assistant Core has the issue?

core-2024.1.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

InfluxDB

Link to integration documentation on our website

https://www.home-assistant.io/integrations/influxdb/

Diagnostics information

No response

Example YAML snippet

# influxdb section from configuration.yaml

influxdb:
  api_version: 2
  host: 192.168.1.2
  port: 8086
  ssl: false
  token: REDACTED
  organization: REDACTED
  bucket: home_assistant
  override_measurement: sensor
  default_measurement: state

Anything in the logs that might be useful for us?

grep -i influxdb /usr/share/hassio/homeassistant/home-assistant.log.*

/usr/share/hassio/homeassistant/home-assistant.log.1:2024-01-24 17:46:44.641 ERROR (influxdb) [homeassistant.components.influxdb] Cannot connect to InfluxDB due to '[Errno 30] Read-only file system'. Please check that the provided connection details (host, port, etc.) are correct and that your InfluxDB server is running and accessible.

Additional information

The commands used to downgrade and upgrade docker-ce on debian 12 bookworm.

Install docker-ce v24.0.7

sudo apt install \
docker-ce=5:24.0.7-1~debian.12~bookworm \
docker-ce-cli=5:24.0.7-1~debian.12~bookworm \
docker-buildx-plugin=0.11.2-1~debian.12~bookworm \
docker-compose-plugin=2.21.0-1~debian.12~bookworm \
docker-ce-rootless-extras=5:24.0.7-1~debian.12~bookworm

Install docker-ce v25.0.1

sudo apt install \
docker-ce=5:25.0.1-1~debian.12~bookworm \
docker-ce-cli=5:25.0.1-1~debian.12~bookworm \
docker-buildx-plugin=0.12.1-1~debian.12~bookworm \
docker-compose-plugin=2.24.2-1~debian.12~bookworm \
docker-ce-rootless-extras=5:25.0.1-1~debian.12~bookworm

InfluxDB host

The InfluxDB instance used during testing is on a separate server to the one that hosts HA. No changes were made to the InfluxDB host environment. The InfluxDB version is v2.7.5

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Reactions: 11
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Ping @mdegat01 !! We need little brain help here then its being some problems with latest docker updates that is braking this integration (ans some other but they looks being fixed now). If you have time throwing one eye what is going on in the code side then we can only debug what we see and is nothing more is not trying communicating with the server and no logs on that side of trying anything from the client.

HA Core 2024.3.3 HA Supervisor 2024.03.0 Docker: 26.0.0 Influx DB: influxdb:2.7.5 and influxdb:2.7.5-alpine

Will this ever by fixed?

Same issue here

Same issue here

Same issue here…

Same issue here, hoping for a fix 😃