buanet / ioBroker.docker

Official Docker Image for ioBroker
https://www.iobroker.net
MIT License
194 stars 70 forks source link

Backup of influxdb running in different docker is not working #444

Closed Marty56 closed 6 months ago

Marty56 commented 6 months ago

Description / Beschreibung

This is my docker compose file

version: '2'
services:
  iobroker:
    restart: always
    image: buanet/iobroker:latest
    container_name: iobroker
    hostname: dell
    network_mode: "host"
    devices:
      - /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_16062b40fd19ec1191ed74e5f01c6278-if00-port0:/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_16062b40fd19ec1191ed74e5f01c6278-if00-port0
    environment:

      - IOB_BACKITUP_EXTDB=true
      - INFLUXDB_ADMIN_USER=admin
      - USBDEVICES=/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_16062b40fd19ec1191ed74e5f01c6278-if00-port0
      - TZ=Europe/Berlin
      - PACKAGES=influxdb
    ports:
      - "8081:8081"
    volumes:
      - /mnt/appdata/iobroker/data:/opt/iobroker

This is my docker startup

-----                          System Information                          -----
-----                    arch:                x86_64                       -----
-----                    hostname:            dell                         -----
-----                                                                      -----
-----                          Version Information                         -----
-----                    image:               v9.1.1                       -----
-----                    build:               2024-02-21T23:44:47+00:00    -----
-----                    node:                v18.19.1                     -----
-----                    npm:                 10.2.4  

Backup is working. Protocol see below.

Image version

v9.1.1

Docker logs / Docker Protokoll

backitup.0
2024-03-04 06:44:16.670 error   [iobroker/clean] Backup files not deleted from /opt/iobroker/backups because some errors.

backitup.0
2024-03-04 06:44:09.609 error   [iobroker/googledrive] Google Drive: File "/opt/iobroker/backups/influxDB_2024_03_04-06_39_55_influxDB-1_backupiobroker.tar.gz" not found

backitup.0
2024-03-04 06:44:09.456 error   [iobroker/googledrive] Google Drive: File "/opt/iobroker/backups/influxDB_2024_03_04-06_35_59_influxDB-0_backupiobroker.tar.gz" not found

backitup.0
2024-03-04 06:43:53.715 error   [iobroker/ftp] File "/opt/iobroker/backups/influxDB_2024_03_04-06_39_55_influxDB-1_backupiobroker.tar.gz" not found

backitup.0
2024-03-04 06:43:53.712 error   [iobroker/ftp] File "/opt/iobroker/backups/influxDB_2024_03_04-06_35_59_influxDB-0_backupiobroker.tar.gz" not found

backitup.0
2024-03-04 06:43:50.277 error   [iobroker] Error: Command failed: influxd backup -portable -database endless -host :8088 "/opt/iobroker/backups/influxDB_2024_03_04-06_39_55_influxDB-1_backupiobroker"2024/03/04 06:39:55 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (0)...2024/03/04 06:39:57 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (1)...2024/03/04 06:39:59 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (2)...2024/03/04 06:40:01 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (3)...2024/03/04 06:40:03 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (4)...2024/03/04 06:40:05 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (5)...2024/03/04 06:40:07 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 3.01s and retrying (6)...2024/03/04 06:40:10 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 11.441s and retrying (7)...2024/03/04 06:40:21 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 43.477s and retrying (8)...2024/03/04 06:41:05 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2m45.216s and retrying (9)...backup: dial tcp :8088: connect: connection refused

backitup.0
2024-03-04 06:43:50.277 error   [iobroker/influxDB] backup: dial tcp :8088: connect: connection refused

backitup.0
2024-03-04 06:43:50.277 error   [iobroker/influxDB] 2024/03/04 06:41:05 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2m45.216s and retrying (9)...

backitup.0
2024-03-04 06:43:50.277 error   [iobroker/influxDB] 2024/03/04 06:40:21 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 43.477s and retrying (8)...

backitup.0
2024-03-04 06:43:50.277 error   [iobroker/influxDB] 2024/03/04 06:40:10 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 11.441s and retrying (7)...

backitup.0
2024-03-04 06:43:50.276 error   [iobroker/influxDB] 2024/03/04 06:40:07 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 3.01s and retrying (6)...

backitup.0
2024-03-04 06:43:50.276 error   [iobroker/influxDB] 2024/03/04 06:40:05 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (5)...

backitup.0
2024-03-04 06:43:50.276 error   [iobroker/influxDB] 2024/03/04 06:40:03 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (4)...

backitup.0
2024-03-04 06:43:50.276 error   [iobroker/influxDB] 2024/03/04 06:40:01 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (3)...

backitup.0
2024-03-04 06:43:50.276 error   [iobroker/influxDB] 2024/03/04 06:39:59 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (2)...

backitup.0
2024-03-04 06:43:50.275 error   [iobroker/influxDB] 2024/03/04 06:39:57 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (1)...

backitup.0
2024-03-04 06:43:50.275 error   [iobroker/influxDB] 2024/03/04 06:39:55 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (0)...

backitup.0
2024-03-04 06:43:50.275 error   [iobroker/influxDB] Error: Command failed: influxd backup -portable -database endless -host :8088 "/opt/iobroker/backups/influxDB_2024_03_04-06_39_55_influxDB-1_backupiobroker"

backitup.0
2024-03-04 06:39:55.078 error   [iobroker/influxDB] backup: dial tcp :8088: connect: connection refused2024/03/04 06:35:59 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (0)...2024/03/04 06:36:01 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (1)...2024/03/04 06:36:03 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (2)...2024/03/04 06:36:05 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (3)...2024/03/04 06:36:07 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (4)...2024/03/04 06:36:09 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (5)...2024/03/04 06:36:11 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 3.01s and retrying (6)...2024/03/04 06:36:14 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 11.441s and retrying (7)...2024/03/04 06:36:26 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 43.477s and retrying (8)...2024/03/04 06:37:09 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2m45.216s and retrying (9)...backup: dial tcp :8088: connect: connection refused

backitup.0
2024-03-04 06:39:55.077 error   [iobroker/influxDB] 2024/03/04 06:37:09 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2m45.216s and retrying (9)...

backitup.0
2024-03-04 06:39:55.077 error   [iobroker/influxDB] 2024/03/04 06:36:14 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 11.441s and retrying (7)...

backitup.0
2024-03-04 06:39:55.078 error   [iobroker] Error: Command failed: influxd backup -portable -database iobroker -host :8088 "/opt/iobroker/backups/influxDB_2024_03_04-06_35_59_influxDB-0_backupiobroker"

backitup.0
2024-03-04 06:39:55.076 error   [iobroker/influxDB] 2024/03/04 06:36:11 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 3.01s and retrying (6)...

backitup.0
2024-03-04 06:39:55.077 error   [iobroker/influxDB] 2024/03/04 06:36:26 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 43.477s and retrying (8)...

backitup.0
2024-03-04 06:39:55.076 error   [iobroker/influxDB] 2024/03/04 06:36:09 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (5)...

backitup.0
2024-03-04 06:39:55.075 error   [iobroker/influxDB] 2024/03/04 06:36:05 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (3)...

backitup.0
2024-03-04 06:39:55.075 error   [iobroker/influxDB] 2024/03/04 06:36:01 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (1)...

backitup.0
2024-03-04 06:39:55.074 error   [iobroker/influxDB] 2024/03/04 06:35:59 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (0)...

backitup.0
2024-03-04 06:39:55.075 error   [iobroker/influxDB] 2024/03/04 06:36:03 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (2)...

backitup.0
2024-03-04 06:39:55.075 error   [iobroker/influxDB] 2024/03/04 06:36:07 Download shard 0 failed dial tcp :8088: connect: connection refused. Waiting 2s and retrying (4)...

backitup.0
2024-03-04 06:39:55.074 error   [iobroker/influxDB] Error: Command failed: influxd backup -portable -database iobroker -host :8088 "/opt/iobroker/backups/influxDB_2024_03_04-06_35_59_influxDB-0_backupiobroker"
Marc-Berg commented 6 months ago

Obviously you have not set the hostname in the backitup configuration.

influxd backup -portable -database iobroker -host :8088

Marty56 commented 6 months ago

Thanks for the help. I have fixed this issue. Still not luck. I have also tried the IP. Same result

    2024-03-04 08:17:56.470 error   [iobroker] Error: Command failed: influxd backup -portable -database iobroker -host dell:8088 "/opt/iobroker/backups/influxDB_2024_03_04-08_14_01_influxDB-0_backupiobroker"2024/03/04 08:14:01 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41404->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (0)...2024/03/04 08:14:03 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41418->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (1)...2024/03/04 08:14:05 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41430->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (2)...2024/03/04 08:14:07 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41440->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (3)...2024/03/04 08:14:09 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41446->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (4)...2024/03/04 08:14:11 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41216->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (5)...2024/03/04 08:14:13 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41218->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 3.01s and retrying (6)...2024/03/04 08:14:16 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41234->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 11.441s and retrying (7)...2024/03/04 08:14:27 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:42946->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 43.477s and retrying (8)...2024/03/04 08:15:11 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:52376->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2m45.216s and retrying (9)...backup: copy backup to file: err=read tcp 127.0.0.1:52376->127.0.1.1:8088: read: connection reset by peer, n=0

backitup.0
2024-03-04 08:17:56.469 error   [iobroker/influxDB] backup: copy backup to file: err=read tcp 127.0.0.1:52376->127.0.1.1:8088: read: connection reset by peer, n=0

backitup.0
2024-03-04 08:17:56.469 error   [iobroker/influxDB] 2024/03/04 08:15:11 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:52376->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2m45.216s and retrying (9)...

backitup.0
2024-03-04 08:17:56.468 error   [iobroker/influxDB] 2024/03/04 08:14:27 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:42946->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 43.477s and retrying (8)...

backitup.0
2024-03-04 08:17:56.468 error   [iobroker/influxDB] 2024/03/04 08:14:16 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41234->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 11.441s and retrying (7)...

backitup.0
2024-03-04 08:17:56.467 error   [iobroker/influxDB] 2024/03/04 08:14:13 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41218->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 3.01s and retrying (6)...

backitup.0
2024-03-04 08:17:56.467 error   [iobroker/influxDB] 2024/03/04 08:14:11 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41216->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (5)...

backitup.0
2024-03-04 08:17:56.466 error   [iobroker/influxDB] 2024/03/04 08:14:09 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41446->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (4)...

backitup.0
2024-03-04 08:17:56.466 error   [iobroker/influxDB] 2024/03/04 08:14:07 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41440->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (3)...

backitup.0
2024-03-04 08:17:56.466 error   [iobroker/influxDB] 2024/03/04 08:14:05 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41430->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (2)...

backitup.0
2024-03-04 08:17:56.465 error   [iobroker/influxDB] 2024/03/04 08:14:03 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41418->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (1)...

backitup.0
2024-03-04 08:17:56.465 error   [iobroker/influxDB] 2024/03/04 08:14:01 Download shard 0 failed copy backup to file: err=read tcp 127.0.0.1:41404->127.0.1.1:8088: read: connection reset by peer, n=0. Waiting 2s and retrying (0)...

backitup.0
2024-03-04 08:17:56.464 error   [iobroker/influxDB] Error: Command failed: influxd backup -portable -database iobroker -host dell:8088 "/opt/iobroker/backups/influxDB_2024_03_04-08_14_01_influxDB-0_backupiobroker"

Maybe it is related to the docker instance of influxdb.

version: '3.6'
services:
  influxdb:
      image: influxdb:1.8-alpine
      container_name: influxdb
      restart: always
      environment:
        - INFLUXDB_DB=influx
        - INFLUXDB_ADMIN_USER=admin
        - INFLUXDB_ADMIN_PASSWORD=admin
      ports:
        - '8086:8086'
        - '8088:8088'
      volumes:
        - /mnt/appdata/influxdb:/var/lib/influxdb
        - /mnt/appdata/influxdb_conf:/etc/influxdb
Marc-Berg commented 6 months ago

Have you set bind-address = ":8088" in influxdb.conf?

Marty56 commented 6 months ago

Sorry for my stupidy. Where do I set the influxdb.conf?

Marc-Berg commented 6 months ago

In the InfluxDB container (path: /etc/influxdb/influxdb.conf)

Marty56 commented 6 months ago

No, I did not. I will figure out the syntax and give it another go.

Marty56 commented 6 months ago

This influxdb.conf is not working

[meta]
  dir = "/var/lib/influxdb/meta"

[data]
  dir = "/var/lib/influxdb/data"
  engine = "tsm1"
  wal-dir = "/var/lib/influxdb/wal"
[http]
  # Determines whether HTTP endpoint is enabled.
enabled = true

  # Determines whether the Flux query endpoint is enabled.
flux-enabled=true

  # Determines whether the Flux query logging is enabled.
flux-log-enabled = false
bind-address = ":8088"

I have also tried

bind-address = "127.0.0.1:8088" and and bind-address = "192.168.10.132:8088"

buanet commented 6 months ago

I see no issue with the ioBroker docker image. Looks like a configuration issue. I'll convert this to an discussion.

BTW: Your ioBroker uses Host network, your influx uses bridge. Not sure if the communication there is possible. Your log says err=read tcp 127.0.0.1:41430->127.0.1.1:8088. I think localhost ip is the problem...

Regards, André