Replies: 1 comment
-
Did you see the instructions here? https://docs.teslamate.org/docs/maintenance/upgrading_postgres As stated you have to start the database first before you can restore it.
But don't forget step 3 either. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Update to postgreSQL:17 destroyed database. Cannot get a service back
Last login: Thu Oct 31 20:12:20 on console
john@Johns-Mac-mini ~ % ssh [email protected]
[email protected]'s password:
[p2ejb0@NAS153E3M ~]$ cd /share/Container/container-station-data/application/teslamate
[p2ejb0@NAS153E3M teslamate]$ ls -l
total 608951
-rw-r--r-- 1 admin administrators 411 2023-07-30 04:24 docker-compose.resource.yml
-rwxrwxrwx 1 admin administrators 1255 2022-10-17 17:18 docker-compose.yml*
drwxrwxrwx 2 admin administrators 3 2022-10-17 17:01 import/
-rwxrwxrwx 1 admin administrators 61 2022-10-17 17:18 qnap.json*
-rw-r--r-- 1 p2ejb0 everyone 623255594 2024-07-12 09:24 teslamate.bck
[p2ejb0@NAS153E3M teslamate]$ cat docker-compose.yml
version: "3"
services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:
- ENCRYPTION_KEY=NMp-X3w-POR-9st
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
ports:
- 4000:4000
volumes:
- ./import:/opt/app/import
cap_drop:
- all
database:
image: postgres:13
restart: always
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=teslamate
volumes:
- teslamate-db:/var/lib/postgresql/data
grafana:
image: teslamate/grafana:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
ports:
- 3000:3000
volumes:
- teslamate-grafana-data:/var/lib/grafana
mosquitto:
image: eclipse-mosquitto:2
restart: always
command: mosquitto -c /mosquitto-no-auth.conf
ports:
- 1883:1883
volumes:
- mosquitto-conf:/mosquitto/config
- mosquitto-data:/mosquitto/data
volumes:
teslamate-db:
teslamate-grafana-data:
mosquitto-conf:
mosquitto-data:
[p2ejb0@NAS153E3M teslamate]$ docker compose pull
WARN[0000] /share/Container/container-station-data/application/teslamate/docker-compose.yml: the attribute
version
is obsolete, it will be ignored, please remove it to avoid potential confusion[+] Pulling 43/43
✔ database Pulled 49.7s
✔ ca9f94f36076 Pull complete 11.1s
✔ d510032d6c39 Pull complete 14.2s
✔ 7e7daeb645a3 Pull complete 16.2s
✔ f38fca5434ca Pull complete 19.5s
✔ 4bc1c02e3299 Pull complete 24.3s
✔ d2b7c76e60d8 Pull complete 26.9s
✔ bb6d20b11faa Pull complete 28.4s
✔ 3dcf55f689bf Pull complete 40.6s
✔ 3ee3aebba5b4 Pull complete 42.3s
✔ d5278d8d7d46 Pull complete 43.8s
✔ ddccbe9a8e74 Pull complete 45.0s
✔ 8d0667368586 Pull complete 45.7s
✔ 53989aa24808 Pull complete 46.2s
✔ teslamate Pulled 18.7s
✔ a480a496ba95 Pull complete 5.6s
✔ c3294d518b9c Pull complete 6.5s
✔ 619648e86dbe Pull complete 7.4s
✔ 597dd7e6a886 Pull complete 8.0s
✔ 414c6627772f Pull complete 11.9s
✔ b75507ffa1f6 Pull complete 15.1s
✔ grafana Pulled 48.0s
✔ 925040e3dd87 Pull complete 5.0s
✔ e3481c878e70 Pull complete 6.5s
✔ 01f8f52f8f7e Pull complete 7.5s
✔ 82e750d08e6c Pull complete 8.0s
✔ 2ad22ff74ebc Pull complete 8.4s
✔ e57c45c0af73 Pull complete 13.2s
✔ 5c3c59353983 Pull complete 24.0s
✔ e78b6403cb63 Pull complete 26.5s
✔ 8ca29a00e127 Pull complete 28.8s
✔ 6da502210584 Pull complete 30.3s
✔ 984850b7db43 Pull complete 31.2s
✔ 5d1859acc325 Pull complete 33.9s
✔ d6af05936510 Pull complete 36.5s
✔ e71e58402462 Pull complete 39.9s
✔ 101d85f2f476 Pull complete 41.9s
✔ 1b0d02f690f8 Pull complete 43.2s
✔ fe1464af0d27 Pull complete 44.4s
✔ mosquitto Pulled 9.2s
✔ 43c4264eed91 Pull complete 4.1s
✔ 27224c9c4017 Pull complete 5.0s
✔ 53c81a28d92a Pull complete 5.6s
[p2ejb0@NAS153E3M teslamate]$ docker compose exec -T database pg_dump -U teslamate teslamate > ./teslamate.bck
WARN[0000] /share/Container/container-station-data/application/teslamate/docker-compose.yml: the attribute
version
is obsolete, it will be ignored, please remove it to avoid potential confusion[p2ejb0@NAS153E3M teslamate]$ ls -l
total 631615
-rw-r--r-- 1 admin administrators 411 2023-07-30 04:24 docker-compose.resource.yml
-rwxrwxrwx 1 admin administrators 1255 2022-10-17 17:18 docker-compose.yml*
drwxrwxrwx 2 admin administrators 3 2022-10-17 17:01 import/
-rwxrwxrwx 1 admin administrators 61 2022-10-17 17:18 qnap.json*
-rw-r--r-- 1 p2ejb0 everyone 646508041 2024-10-31 22:30 teslamate.bck
-rw-r--r-- 1 p2ejb0 everyone 102 2024-10-31 22:26 testvi.txt
[p2ejb0@NAS153E3M teslamate]$ docker compose up -d
WARN[0000] /share/Container/container-station-data/application/teslamate/docker-compose.yml: the attribute
version
is obsolete, it will be ignored, please remove it to avoid potential confusion[+] Running 4/4
✔ Container teslamate-grafana-1 Started 8.7s
✔ Container teslamate-teslamate-1 Started 8.7s
✔ Container teslamate-database-1 Started 8.7s
✔ Container teslamate-mosquitto-1 Started 10.8s
[p2ejb0@NAS153E3M teslamate]$ docker compose exec -T database pg_dump -U teslamate teslamate > ./teslamate.bck
WARN[0000] /share/Container/container-station-data/application/teslamate/docker-compose.yml: the attribute
version
is obsolete, it will be ignored, please remove it to avoid potential confusion[p2ejb0@NAS153E3M teslamate]$ # Stop the teslamate container to avoid write conflicts
[p2ejb0@NAS153E3M teslamate]$ docker compose stop teslamate
WARN[0000] /share/Container/container-station-data/application/teslamate/docker-compose.yml: the attribute
version
is obsolete, it will be ignored, please remove it to avoid potential confusion[+] Stopping 1/1
✔ Container teslamate-teslamate-1 Stopped 3.0s
[p2ejb0@NAS153E3M teslamate]$
[p2ejb0@NAS153E3M teslamate]$ # Drop existing data and reinitialize (Don't forget to replace first teslamate if using different TM_DB_USER)
[p2ejb0@NAS153E3M teslamate]$ docker compose exec -T database psql -U teslamate teslamate << .
(1 row)
SET
SET
SET
SET
CREATE EXTENSION
COMMENT
CREATE EXTENSION
COMMENT
CREATE TYPE
ALTER TYPE
CREATE TYPE
ALTER TYPE
CREATE TYPE
ALTER TYPE
CREATE TYPE
ALTER TYPE
CREATE TYPE
ALTER TYPE
CREATE TYPE
ALTER TYPE
CREATE FUNCTION
ALTER FUNCTION
CREATE FUNCTION
ALTER FUNCTION
CREATE FUNCTION
ALTER FUNCTION
CREATE FUNCTION
ALTER FUNCTION
SET
SET
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
COPY 1179
COPY 2
COPY 2
COPY 284777
COPY 1145
COPY 4520
COPY 20
COPY 4249220
COPY 94
COPY 1
COPY 9577
COPY 1
COPY 237
setval
1179
(1 row)
setval
(1 row)
setval
(1 row)
setval
284802
(1 row)
setval
1145
(1 row)
setval
(1 row)
setval
4249286
(1 row)
setval
(1 row)
setval
19523
(1 row)
setval
(1 row)
setval
4805
(1 row)
setval
(1 row)
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
[p2ejb0@NAS153E3M teslamate]$
[p2ejb0@NAS153E3M teslamate]$ # Restart the teslamate container
[p2ejb0@NAS153E3M teslamate]$ docker compose start teslamate
WARN[0000] /share/Container/container-station-data/application/teslamate/docker-compose.yml: the attribute
version
is obsolete, it will be ignored, please remove it to avoid potential confusion[+] Running 1/1
✔ Container teslamate-teslamate-1 Started 0.8s
[p2ejb0@NAS153E3M teslamate]$ ls -l
total 631615
-rw-r--r-- 1 admin administrators 411 2023-07-30 04:24 docker-compose.resource.yml
-rwxrwxrwx 1 admin administrators 1255 2022-10-17 17:18 docker-compose.yml*
drwxrwxrwx 2 admin administrators 3 2022-10-17 17:01 import/
-rwxrwxrwx 1 admin administrators 61 2022-10-17 17:18 qnap.json*
-rw-r--r-- 1 p2ejb0 everyone 646508450 2024-10-31 22:36 teslamate.bck
-rw-r--r-- 1 p2ejb0 everyone 102 2024-10-31 22:26 testvi.txt
[p2ejb0@NAS153E3M teslamate]$ vi docker-compose.yml
version: "3"
services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:
- ENCRYPTION_KEY=NMp-X3w-POR-9st
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
ports:
- 4000:4000
volumes:
- ./import:/opt/app/import
cap_drop:
- all
database:
image: postgres:13
restart: always
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=teslamate
volumes:
- teslamate-db:/var/lib/postgresql/data
grafana:
image: teslamate/grafana:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
ports:
- 3000:3000
volumes:
- teslamate-grafana-data:/var/lib/grafana
mosquitto:
image: eclipse-mosquitto:2
restart: always
command: mosquitto -c /mosquitto-no-auth.conf
ports:
- 1883:1883
volumes:
- mosquitto-conf:/mosquitto/config
- mosquitto-data:/mosquitto/data
volumes:
teslamate-db:
teslamate-grafana-data:
mosquitto-conf:
mosquitto-data:
~
~
~
~
docker-compose.yml [3%] 2,00-01
[p2ejb0@NAS153E3M teslamate]$ ls -l
total 631615
-rw-r--r-- 1 admin administrators 411 2023-07-30 04:24 docker-compose.resource.yml
-rwxrwxrwx 1 admin administrators 1255 2022-10-17 17:18 docker-compose.yml*
drwxrwxrwx 2 admin administrators 3 2022-10-17 17:01 import/
-rwxrwxrwx 1 admin administrators 61 2022-10-17 17:18 qnap.json*
-rw-r--r-- 1 p2ejb0 everyone 646508450 2024-10-31 22:36 teslamate.bck
-rw-r--r-- 1 p2ejb0 everyone 102 2024-10-31 22:26 testvi.txt
[p2ejb0@NAS153E3M teslamate]$ cat docker-compose.yml
version: "3"
services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:
- ENCRYPTION_KEY=NMp-X3w-POR-9st
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
ports:
- 4000:4000
volumes:
- ./import:/opt/app/import
cap_drop:
- all
database:
image: postgres:13
restart: always
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=teslamate
volumes:
- teslamate-db:/var/lib/postgresql/data
grafana:
image: teslamate/grafana:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
ports:
- 3000:3000
volumes:
- teslamate-grafana-data:/var/lib/grafana
mosquitto:
image: eclipse-mosquitto:2
restart: always
command: mosquitto -c /mosquitto-no-auth.conf
ports:
- 1883:1883
volumes:
- mosquitto-conf:/mosquitto/config
- mosquitto-data:/mosquitto/data
volumes:
teslamate-db:
teslamate-grafana-data:
mosquitto-conf:
mosquitto-data:
[p2ejb0@NAS153E3M teslamate]$ ls -l
total 631615
-rw-r--r-- 1 admin administrators 411 2023-07-30 04:24 docker-compose.resource.yml
-rwxrwxrwx 1 admin administrators 1255 2022-10-17 17:18 docker-compose.yml*
drwxrwxrwx 2 admin administrators 3 2022-10-17 17:01 import/
-rwxrwxrwx 1 admin administrators 61 2022-10-17 17:18 qnap.json*
-rw-r--r-- 1 p2ejb0 everyone 646508450 2024-10-31 22:36 teslamate.bck
-rw-r--r-- 1 p2ejb0 everyone 102 2024-10-31 22:26 testvi.txt
[p2ejb0@NAS153E3M teslamate]$ vi docker-compose.yml
version: "3"
services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:
- ENCRYPTION_KEY=NMp-X3w-POR-9st
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
ports:
- 4000:4000
volumes:
- ./import:/opt/app/import
cap_drop:
- all
database:
image: postgres:17
restart: always
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=teslamate
volumes:
- teslamate-db:/var/lib/postgresql/data
grafana:
image: teslamate/grafana:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
ports:
- 3000:3000
volumes:
- teslamate-grafana-data:/var/lib/grafana
mosquitto:
image: eclipse-mosquitto:2
restart: always
command: mosquitto -c /mosquitto-no-auth.conf
ports:
- 1883:1883
volumes:
- mosquitto-conf:/mosquitto/config
- mosquitto-data:/mosquitto/data
volumes:
teslamate-db:
teslamate-grafana-data:
mosquitto-conf:
mosquitto-data:
~
~
~
~
~
~
docker-compose.yml [35%] 20,22
[p2ejb0@NAS153E3M teslamate]$ cat docker-compose.yml
services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:
- ENCRYPTION_KEY=NMp-X3w-POR-9st
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
ports:
- 4000:4000
volumes:
- ./import:/opt/app/import
cap_drop:
- all
database:
image: postgres:17
restart: always
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=teslamate
volumes:
- teslamate-db:/var/lib/postgresql/data
grafana:
image: teslamate/grafana:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
ports:
- 3000:3000
volumes:
- teslamate-grafana-data:/var/lib/grafana
mosquitto:
image: eclipse-mosquitto:2
restart: always
command: mosquitto -c /mosquitto-no-auth.conf
ports:
- 1883:1883
volumes:
- mosquitto-conf:/mosquitto/config
- mosquitto-data:/mosquitto/data
volumes:
teslamate-db:
teslamate-grafana-data:
mosquitto-conf:
mosquitto-data:
[p2ejb0@NAS153E3M teslamate]$ docker compose down
[+] Running 5/5
✔ Container teslamate-grafana-1 Removed 3.8s
✔ Container teslamate-mosquitto-1 Removed 3.0s
✔ Container teslamate-database-1 Removed 7.7s
✔ Container teslamate-teslamate-1 Removed 4.4s
✔ Network teslamate_default Removed 2.7s
[p2ejb0@NAS153E3M teslamate]$ docker volume rm "$(basename "$PWD")_teslamate-db"
teslamate_teslamate-db
[p2ejb0@NAS153E3M teslamate]$ docker compose up -d database
[+] Running 15/15
✔ database Pulled 37.9s
✔ a480a496ba95 Already exists 0.0s
✔ f5ece9c40e2b Pull complete 3.9s
✔ 241e5725184f Pull complete 8.2s
✔ 6832ae83547e Pull complete 10.0s
✔ 4db87ef10d0d Pull complete 13.3s
✔ 979fa3114f7b Pull complete 15.1s
✔ f2bc6009bf64 Pull complete 15.9s
✔ c9097748b1df Pull complete 16.4s
✔ 9d5c934890a8 Pull complete 29.0s
✔ d14a7815879e Pull complete 31.6s
✔ 442a42d0b75a Pull complete 32.3s
✔ 82020414c082 Pull complete 32.7s
✔ b6ce4c941ce7 Pull complete 33.2s
✔ 42e63a35cca7 Pull complete 33.9s
[+] Running 1/1
✘ Network teslamate_default Error 18.6s
failed to create network teslamate_default: Error response from daemon: execute qnetwork-tool [vswitch create --name br-a44ff12f6bc6 --gateway 172.29.3.254/22 --ip 172.29.0.1] failed: inserted: [br-a44ff12f6bc6]
inserted: [br-a44ff12f6bc6] additional_flag=
inserted: [br-a44ff12f6bc6] autoipd=/etc/avahi/if_avahi_autoipd.action
inserted: [br-a44ff12f6bc6] autoneg=1
inserted: [br-a44ff12f6bc6] bonding_name=
inserted: [br-a44ff12f6bc6] dedicate=
inserted: [br-a44ff12f6bc6] default_display_name=
inserted: [br-a44ff12f6bc6] default_gateway=
inserted: [br-a44ff12f6bc6] device_type=vswitch
inserted: [br-a44ff12f6bc6] dhcpd_service=0
inserted: [br-a44ff12f6bc6] display_name=
inserted: [br-a44ff12f6bc6] domain_name_server_1=
inserted: [br-a44ff12f6bc6] domain_name_server_2=
inserted: [br-a44ff12f6bc6] domain_name_server_type=0
inserted: [br-a44ff12f6bc6] duplex=1
inserted: [br-a44ff12f6bc6] iface_reservation={"shared":1,"app_infos": []}
inserted: [br-a44ff12f6bc6] ifname=
inserted: [br-a44ff12f6bc6] ip=
inserted: [br-a44ff12f6bc6] ip4_type=DHCP
inserted: [br-a44ff12f6bc6] ip6=
inserted: [br-a44ff12f6bc6] ip6_default_gateway=
inserted: [br-a44ff12f6bc6] ip6_prefix=
inserted: [br-a44ff12f6bc6] ip6_type=SLAAC
inserted: [br-a44ff12f6bc6] iptables_forward=0
inserted: [br-a44ff12f6bc6] mac_ifname=
inserted: [br-a44ff12f6bc6] mark_id=0
inserted: [br-a44ff12f6bc6] max_mtu=
inserted: [br-a44ff12f6bc6] mtu=1500
inserted: [br-a44ff12f6bc6] physical_nic=
inserted: [br-a44ff12f6bc6] slave_if=
inserted: [br-a44ff12f6bc6] speed=0
inserted: [br-a44ff12f6bc6] stp=0
inserted: [br-a44ff12f6bc6] subnet_mask=255.255.0.0
inserted: [br-a44ff12f6bc6] virtual_nic=
inserted: [br-a44ff12f6bc6] vlan_name=
inserted: [br-a44ff12f6bc6] vswitch_mode=switch
inserted: [br-a44ff12f6bc6] vswitch_name=
updated: [br-a44ff12f6bc6] ifname=br-a44ff12f6bc6
updated: [br-a44ff12f6bc6] vswitch_name=br-a44ff12f6bc6
updated: [br-a44ff12f6bc6] mark_id=5
updated: [br-a44ff12f6bc6] display_name=Virtual Switch 4
updated: [br-a44ff12f6bc6] default_display_name=Virtual Switch 4
updated: [br-a44ff12f6bc6] display_name=Container Network (br-a44ff12f6bc6)
updated: [br-a44ff12f6bc6] dhcpd_service=0
updated: [br-a44ff12f6bc6] iptables_forward=1
updated: [br-a44ff12f6bc6] ip4_type=STATIC
updated: [br-a44ff12f6bc6] ip=172.29.0.1
updated: [br-a44ff12f6bc6] subnet_mask=255.255.252.0
updated: [br-a44ff12f6bc6] default_gateway=172.29.3.254
updated: [br-a44ff12f6bc6] domain_name_server_type=1
updated: [br-a44ff12f6bc6] domain_name_server_1=
updated: [br-a44ff12f6bc6] domain_name_server_2=
updated: [br-a44ff12f6bc6] ip6_type=DISABLED
updated: [br-a44ff12f6bc6] ip6=
updated: [br-a44ff12f6bc6] ip6_prefix=0
updated: [br-a44ff12f6bc6] ip6_default_gateway=
updated: [br-a44ff12f6bc6] speed=0
updated: [br-a44ff12f6bc6] duplex=1
updated: [br-a44ff12f6bc6] autoneg=1
updated: [br-a44ff12f6bc6] mtu=1500
updated: [br-a44ff12f6bc6] dedicate=
updated: [br-a44ff12f6bc6] stp=0
updated: [br-a44ff12f6bc6] mac_ifname=
updated: [br-a44ff12f6bc6] physical_nic=
updated: [br-a44ff12f6bc6] virtual_nic=
updated: [br-a44ff12f6bc6] slave_if=
iprule_operation_by_source: Doing rtnl rule operation for ip based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for interface based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for interface based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for ip based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for interface based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for interface based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for ip based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for interface based failed: Object not found
deleted: [br-a44ff12f6bc6]
inserted: [br-a44ff12f6bc6]
inserted: [br-a44ff12f6bc6] additional_flag=
inserted: [br-a44ff12f6bc6] autoipd=/etc/avahi/if_avahi_autoipd.action
inserted: [br-a44ff12f6bc6] autoneg=1
inserted: [br-a44ff12f6bc6] bonding_name=
inserted: [br-a44ff12f6bc6] dedicate=
inserted: [br-a44ff12f6bc6] default_display_name=Virtual Switch 4
inserted: [br-a44ff12f6bc6] default_gateway=172.29.3.254
inserted: [br-a44ff12f6bc6] device_type=vswitch
inserted: [br-a44ff12f6bc6] dhcpd_service=0
inserted: [br-a44ff12f6bc6] display_name=Container Network (br-a44ff12f6bc6)
inserted: [br-a44ff12f6bc6] domain_name_server_1=
inserted: [br-a44ff12f6bc6] domain_name_server_2=
inserted: [br-a44ff12f6bc6] domain_name_server_type=1
inserted: [br-a44ff12f6bc6] duplex=1
inserted: [br-a44ff12f6bc6] iface_reservation={"shared":1,"app_infos": []}
inserted: [br-a44ff12f6bc6] ifname=br-a44ff12f6bc6
inserted: [br-a44ff12f6bc6] ip=172.29.0.1
inserted: [br-a44ff12f6bc6] ip4_type=STATIC
inserted: [br-a44ff12f6bc6] ip6=
inserted: [br-a44ff12f6bc6] ip6_default_gateway=
inserted: [br-a44ff12f6bc6] ip6_prefix=0
inserted: [br-a44ff12f6bc6] ip6_type=DISABLED
inserted: [br-a44ff12f6bc6] iptables_forward=1
inserted: [br-a44ff12f6bc6] mac_ifname=
inserted: [br-a44ff12f6bc6] mark_id=5
inserted: [br-a44ff12f6bc6] max_mtu=
inserted: [br-a44ff12f6bc6] mtu=1500
inserted: [br-a44ff12f6bc6] physical_nic=
inserted: [br-a44ff12f6bc6] slave_if=
inserted: [br-a44ff12f6bc6] speed=0
inserted: [br-a44ff12f6bc6] stp=0
inserted: [br-a44ff12f6bc6] subnet_mask=255.255.252.0
inserted: [br-a44ff12f6bc6] virtual_nic=
inserted: [br-a44ff12f6bc6] vlan_name=
inserted: [br-a44ff12f6bc6] vswitch_mode=switch
inserted: [br-a44ff12f6bc6] vswitch_name=br-a44ff12f6bc6
Error: execute /etc/init.d/Qthttpd.sh [reload_apache] failed:
[p2ejb0@NAS153E3M teslamate]$ # Stop the teslamate container to avoid write conflicts
[p2ejb0@NAS153E3M teslamate]$ docker compose stop teslamate
[p2ejb0@NAS153E3M teslamate]$
[p2ejb0@NAS153E3M teslamate]$ # Drop existing data and reinitialize (Don't forget to replace first teslamate if using different TM_DB_USER)
[p2ejb0@NAS153E3M teslamate]$ docker compose exec -T database psql -U teslamate teslamate << .
services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:
- ENCRYPTION_KEY=NMp-X3w-POR-9st
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
ports:
- 4000:4000
volumes:
- ./import:/opt/app/import
cap_drop:
- all
database:
image: postgres:13
restart: always
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=teslamate
volumes:
- teslamate-db:/var/lib/postgresql/data
grafana:
image: teslamate/grafana:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
ports:
- 3000:3000
volumes:
- teslamate-grafana-data:/var/lib/grafana
mosquitto:
image: eclipse-mosquitto:2
restart: always
command: mosquitto -c /mosquitto-no-auth.conf
ports:
- 1883:1883
volumes:
- mosquitto-conf:/mosquitto/config
- mosquitto-data:/mosquitto/data
volumes:
teslamate-db:
teslamate-grafana-data:
mosquitto-conf:
mosquitto-data:
~
~
~
~
~
~
docker-compose.yml [35%] 20,22
[p2ejb0@NAS153E3M teslamate]$ ls -l
total 631615
-rw-r--r-- 1 admin administrators 411 2023-07-30 04:24 docker-compose.resource.yml
-rwxrwxrwx 1 admin administrators 1241 2024-10-31 22:55 docker-compose.yml*
drwxrwxrwx 2 admin administrators 3 2022-10-17 17:01 import/
-rwxrwxrwx 1 admin administrators 61 2022-10-17 17:18 qnap.json*
-rw-r--r-- 1 p2ejb0 everyone 646508450 2024-10-31 22:36 teslamate.bck
-rw-r--r-- 1 p2ejb0 everyone 102 2024-10-31 22:26 testvi.txt
[p2ejb0@NAS153E3M teslamate]$ docker compose down
[p2ejb0@NAS153E3M teslamate]$ docker volume rm "$(basename "$PWD")_teslamate-db"
Error response from daemon: get teslamate_teslamate-db: no such volume
[p2ejb0@NAS153E3M teslamate]$ docker compose up -d
[+] Running 1/1
✘ Network teslamate_default Error 11.5s
failed to create network teslamate_default: Error response from daemon: execute qnetwork-tool [vswitch create --name br-267303ce3b34 --gateway 172.29.7.254/22 --ip 172.29.4.1] failed: inserted: [br-267303ce3b34]
inserted: [br-267303ce3b34] additional_flag=
inserted: [br-267303ce3b34] autoipd=/etc/avahi/if_avahi_autoipd.action
inserted: [br-267303ce3b34] autoneg=1
inserted: [br-267303ce3b34] bonding_name=
inserted: [br-267303ce3b34] dedicate=
inserted: [br-267303ce3b34] default_display_name=
inserted: [br-267303ce3b34] default_gateway=
inserted: [br-267303ce3b34] device_type=vswitch
inserted: [br-267303ce3b34] dhcpd_service=0
inserted: [br-267303ce3b34] display_name=
inserted: [br-267303ce3b34] domain_name_server_1=
inserted: [br-267303ce3b34] domain_name_server_2=
inserted: [br-267303ce3b34] domain_name_server_type=0
inserted: [br-267303ce3b34] duplex=1
inserted: [br-267303ce3b34] iface_reservation={"shared":1,"app_infos": []}
inserted: [br-267303ce3b34] ifname=
inserted: [br-267303ce3b34] ip=
inserted: [br-267303ce3b34] ip4_type=DHCP
inserted: [br-267303ce3b34] ip6=
inserted: [br-267303ce3b34] ip6_default_gateway=
inserted: [br-267303ce3b34] ip6_prefix=
inserted: [br-267303ce3b34] ip6_type=SLAAC
inserted: [br-267303ce3b34] iptables_forward=0
inserted: [br-267303ce3b34] mac_ifname=
inserted: [br-267303ce3b34] mark_id=0
inserted: [br-267303ce3b34] max_mtu=
inserted: [br-267303ce3b34] mtu=1500
inserted: [br-267303ce3b34] physical_nic=
inserted: [br-267303ce3b34] slave_if=
inserted: [br-267303ce3b34] speed=0
inserted: [br-267303ce3b34] stp=0
inserted: [br-267303ce3b34] subnet_mask=255.255.0.0
inserted: [br-267303ce3b34] virtual_nic=
inserted: [br-267303ce3b34] vlan_name=
inserted: [br-267303ce3b34] vswitch_mode=switch
inserted: [br-267303ce3b34] vswitch_name=
updated: [br-267303ce3b34] ifname=br-267303ce3b34
updated: [br-267303ce3b34] vswitch_name=br-267303ce3b34
updated: [br-267303ce3b34] mark_id=9
updated: [br-267303ce3b34] display_name=Virtual Switch 5
updated: [br-267303ce3b34] default_display_name=Virtual Switch 5
updated: [br-267303ce3b34] display_name=Container Network (br-267303ce3b34)
updated: [br-267303ce3b34] dhcpd_service=0
updated: [br-267303ce3b34] iptables_forward=1
updated: [br-267303ce3b34] ip4_type=STATIC
updated: [br-267303ce3b34] ip=172.29.4.1
updated: [br-267303ce3b34] subnet_mask=255.255.252.0
updated: [br-267303ce3b34] default_gateway=172.29.7.254
updated: [br-267303ce3b34] domain_name_server_type=1
updated: [br-267303ce3b34] domain_name_server_1=
updated: [br-267303ce3b34] domain_name_server_2=
updated: [br-267303ce3b34] ip6_type=DISABLED
updated: [br-267303ce3b34] ip6=
updated: [br-267303ce3b34] ip6_prefix=0
updated: [br-267303ce3b34] ip6_default_gateway=
updated: [br-267303ce3b34] speed=0
updated: [br-267303ce3b34] duplex=1
updated: [br-267303ce3b34] autoneg=1
updated: [br-267303ce3b34] mtu=1500
updated: [br-267303ce3b34] dedicate=
updated: [br-267303ce3b34] stp=0
updated: [br-267303ce3b34] mac_ifname=
updated: [br-267303ce3b34] physical_nic=
updated: [br-267303ce3b34] virtual_nic=
updated: [br-267303ce3b34] slave_if=
iprule_operation_by_source: Doing rtnl rule operation for ip based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for interface based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for interface based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for ip based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for interface based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for interface based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for ip based failed: Object not found
iprule_operation_by_source: Doing rtnl rule operation for interface based failed: Object not found
deleted: [br-267303ce3b34]
inserted: [br-267303ce3b34]
inserted: [br-267303ce3b34] additional_flag=
inserted: [br-267303ce3b34] autoipd=/etc/avahi/if_avahi_autoipd.action
inserted: [br-267303ce3b34] autoneg=1
inserted: [br-267303ce3b34] bonding_name=
inserted: [br-267303ce3b34] dedicate=
inserted: [br-267303ce3b34] default_display_name=Virtual Switch 5
inserted: [br-267303ce3b34] default_gateway=172.29.7.254
inserted: [br-267303ce3b34] device_type=vswitch
inserted: [br-267303ce3b34] dhcpd_service=0
inserted: [br-267303ce3b34] display_name=Container Network (br-267303ce3b34)
inserted: [br-267303ce3b34] domain_name_server_1=
inserted: [br-267303ce3b34] domain_name_server_2=
inserted: [br-267303ce3b34] domain_name_server_type=1
inserted: [br-267303ce3b34] duplex=1
inserted: [br-267303ce3b34] iface_reservation={"shared":1,"app_infos": []}
inserted: [br-267303ce3b34] ifname=br-267303ce3b34
inserted: [br-267303ce3b34] ip=172.29.4.1
inserted: [br-267303ce3b34] ip4_type=STATIC
inserted: [br-267303ce3b34] ip6=
inserted: [br-267303ce3b34] ip6_default_gateway=
inserted: [br-267303ce3b34] ip6_prefix=0
inserted: [br-267303ce3b34] ip6_type=DISABLED
inserted: [br-267303ce3b34] iptables_forward=1
inserted: [br-267303ce3b34] mac_ifname=
inserted: [br-267303ce3b34] mark_id=9
inserted: [br-267303ce3b34] max_mtu=
inserted: [br-267303ce3b34] mtu=1500
inserted: [br-267303ce3b34] physical_nic=
inserted: [br-267303ce3b34] slave_if=
inserted: [br-267303ce3b34] speed=0
inserted: [br-267303ce3b34] stp=0
inserted: [br-267303ce3b34] subnet_mask=255.255.252.0
inserted: [br-267303ce3b34] virtual_nic=
inserted: [br-267303ce3b34] vlan_name=
inserted: [br-267303ce3b34] vswitch_mode=switch
inserted: [br-267303ce3b34] vswitch_name=br-267303ce3b34
Error: execute /etc/init.d/Qthttpd.sh [reload_apache] failed:
[p2ejb0@NAS153E3M teslamate]$ # Stop the teslamate container to avoid write conflicts
[p2ejb0@NAS153E3M teslamate]$ docker compose stop teslamate
[p2ejb0@NAS153E3M teslamate]$
[p2ejb0@NAS153E3M teslamate]$ # Drop existing data and reinitialize (Don't forget to replace first teslamate if using different TM_DB_USER)
[p2ejb0@NAS153E3M teslamate]$ docker compose exec -T database psql -U teslamate teslamate << .
Beta Was this translation helpful? Give feedback.
All reactions