Closed ID-Ant closed 1 year ago
What says the database log? docker-compse -l database
bash: docker-compse: command not found
seemingly I've not installed something correctly? created the docker-composer.yaml file and ran docker.
Try docker compose -l database
unknown shorthand flag: 'l' in -l
Not sure, how it goes with docker compose
. Perhaps you can install docker-compose
?
docker compose version
Docker Compose version v2.20.2
So seemingly installed, correctly or not is a different story i guess? not sure how to verify the postgres DB is running correctly. I can see it when running docker ps
- 023d442aac83 postgres:15 "docker-entrypoint.s…" 3 hours ago Up 3 hours 5432/tcp docker-database-1
https://docs.docker.com/engine/reference/commandline/logs might help...
docker logs --follow <container id of database>
thanks for that! nothing obvious to me in this thought :(
`The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
waiting for server to start....2023-08-31 12:24:22.493 UTC [48] LOG: starting PostgreSQL 15.4 (Debian 15.4-1.pgdg120+1) on arm-unknown-linux-gnueabihf, compiled by gcc (Debian 12.2.0-14) 12.2.0, 32-bit
2023-08-31 12:24:22.507 UTC [48] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-08-31 12:24:22.544 UTC [51] LOG: database system was shut down at 2023-08-31 12:24:17 UTC
2023-08-31 12:24:22.567 UTC [48] LOG: database system is ready to accept connections
done
server started
CREATE DATABASE
/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
2023-08-31 12:24:23.725 UTC [48] LOG: received fast shutdown request
waiting for server to shut down....2023-08-31 12:24:23.837 UTC [48] LOG: aborting any active transactions
2023-08-31 12:24:23.844 UTC [48] LOG: background worker "logical replication launcher" (PID 54) exited with exit code 1
2023-08-31 12:24:23.845 UTC [49] LOG: shutting down
2023-08-31 12:24:23.851 UTC [49] LOG: checkpoint starting: shutdown immediate
2023-08-31 12:24:24.273 UTC [49] LOG: checkpoint complete: wrote 918 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.119 s, sync=0.270 s, total=0.428 s; sync files=301, longest=0.263 s, average=0.001 s; distance=4223 kB, estimate=4223 kB
2023-08-31 12:24:24.297 UTC [48] LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
2023-08-31 12:24:24.447 UTC [1] LOG: starting PostgreSQL 15.4 (Debian 15.4-1.pgdg120+1) on arm-unknown-linux-gnueabihf, compiled by gcc (Debian 12.2.0-14) 12.2.0, 32-bit
2023-08-31 12:24:24.449 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-08-31 12:24:24.450 UTC [1] LOG: listening on IPv6 address "::", port 5432
2023-08-31 12:24:24.460 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-08-31 12:24:24.483 UTC [64] LOG: database system was shut down at 2023-08-31 12:24:24 UTC
2023-08-31 12:24:24.506 UTC [1] LOG: database system is ready to accept connections
2023-08-31 12:29:24.580 UTC [62] LOG: checkpoint starting: time
2023-08-31 12:30:00.637 UTC [62] LOG: checkpoint complete: wrote 360 buffers (2.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=35.953 s, sync=0.019 s, total=36.057 s; sync files=276, longest=0.012 s, average=0.001 s; distance=2368 kB, estimate=2368 kB
2023-08-31 12:49:25.011 UTC [62] LOG: checkpoint starting: time
2023-08-31 12:49:25.460 UTC [62] LOG: checkpoint complete: wrote 5 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.409 s, sync=0.011 s, total=0.450 s; sync files=5, longest=0.008 s, average=0.003 s; distance=1 kB, estimate=2131 kB
2023-08-31 12:54:25.559 UTC [62] LOG: checkpoint starting: time
2023-08-31 12:54:32.693 UTC [62] LOG: checkpoint complete: wrote 71 buffers (0.4%); 0 WAL file(s) added, 0 removed, 0 recycled; write=7.044 s, sync=0.042 s, total=7.134 s; sync files=40, longest=0.026 s, average=0.002 s; distance=117 kB, estimate=1930 kB
2023-08-31 12:59:25.794 UTC [62] LOG: checkpoint starting: time
2023-08-31 12:59:36.061 UTC [62] LOG: checkpoint complete: wrote 93 buffers (0.6%); 1 WAL file(s) added, 0 removed, 0 recycled; write=9.233 s, sync=0.032 s, total=10.268 s; sync files=15, longest=0.019 s, average=0.003 s; distance=576 kB, estimate=1795 kB
2023-08-31 13:04:25.081 UTC [62] LOG: checkpoint starting: time
2023-08-31 13:04:34.156 UTC [62] LOG: checkpoint complete: wrote 92 buffers (0.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=9.030 s, sync=0.026 s, total=9.076 s; sync files=14, longest=0.024 s, average=0.002 s; distance=382 kB, estimate=1653 kB
2023-08-31 13:09:25.257 UTC [62] LOG: checkpoint starting: time
2023-08-31 13:09:29.822 UTC [62] LOG: checkpoint complete: wrote 46 buffers (0.3%); 0 WAL file(s) added, 0 removed, 0 recycled; write=4.523 s, sync=0.021 s, total=4.566 s; sync files=12, longest=0.019 s, average=0.002 s; distance=294 kB, estimate=1517 kB
2023-08-31 13:14:25.870 UTC [62] LOG: checkpoint starting: time
2023-08-31 13:14:34.167 UTC [62] LOG: checkpoint complete: wrote 83 buffers (0.5%); 0 WAL file(s) added, 0 removed, 0 recycled; write=8.235 s, sync=0.040 s, total=8.298 s; sync files=31, longest=0.039 s, average=0.002 s; distance=537 kB, estimate=1419 kB
2023-08-31 13:19:25.190 UTC [62] LOG: checkpoint starting: time
2023-08-31 13:19:25.941 UTC [62] LOG: checkpoint complete: wrote 8 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.709 s, sync=0.021 s, total=0.752 s; sync files=8, longest=0.019 s, average=0.003 s; distance=23 kB, estimate=1280 kB
2023-08-31 13:24:26.020 UTC [62] LOG: checkpoint starting: time
2023-08-31 13:24:31.990 UTC [62] LOG: checkpoint complete: wrote 60 buffers (0.4%); 0 WAL file(s) added, 0 removed, 0 recycled; write=5.924 s, sync=0.026 s, total=5.970 s; sync files=24, longest=0.025 s, average=0.002 s; distance=330 kB, estimate=1185 kB
2023-08-31 13:29:27.034 UTC [62] LOG: checkpoint starting: time
2023-08-31 13:29:27.886 UTC [62] LOG: checkpoint complete: wrote 9 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.809 s, sync=0.019 s, total=0.853 s; sync files=9, longest=0.015 s, average=0.003 s; distance=20 kB, estimate=1068 kB
2023-08-31 13:49:28.233 UTC [62] LOG: checkpoint starting: time
2023-08-31 13:49:28.894 UTC [62] LOG: checkpoint complete: wrote 7 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.609 s, sync=0.013 s, total=0.661 s; sync files=7, longest=0.011 s, average=0.002 s; distance=1 kB, estimate=962 kB
2023-08-31 13:59:29.095 UTC [62] LOG: checkpoint starting: time
2023-08-31 13:59:30.344 UTC [62] LOG: checkpoint complete: wrote 13 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=1.208 s, sync=0.021 s, total=1.250 s; sync files=13, longest=0.020 s, average=0.002 s; distance=20 kB, estimate=867 kB
2023-08-31 14:04:29.346 UTC [62] LOG: checkpoint starting: time
2023-08-31 14:04:30.175 UTC [62] LOG: checkpoint complete: wrote 8 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.727 s, sync=0.039 s, total=0.830 s; sync files=8, longest=0.037 s, average=0.005 s; distance=19 kB, estimate=783 kB
2023-08-31 14:19:29.395 UTC [62] LOG: checkpoint starting: time
2023-08-31 14:19:30.076 UTC [62] LOG: checkpoint complete: wrote 7 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.614 s, sync=0.015 s, total=0.682 s; sync files=7, longest=0.013 s, average=0.003 s; distance=2 kB, estimate=704 kB
2023-08-31 14:59:29.663 UTC [62] LOG: checkpoint starting: time
2023-08-31 14:59:30.637 UTC [62] LOG: checkpoint complete: wrote 7 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.635 s, sync=0.035 s, total=1.060 s; sync files=5, longest=0.027 s, average=0.007 s; distance=4 kB, estimate=634 kB
`
https://github.com/adriankumpf/teslamate/discussions/2773 for future references - the trailing space in the docker-compose.yml breaks things
Is there an existing issue for this?
What happened?
Installed successfully via Docker - how ever on the dashboards i am getting a Query Data Error on all the dashboards:
Grafana Query Data Error:
Docker is showing the following error messages:
docker-grafana-1 | logger=tsdb.postgres t=2023-08-31T14:04:33.35+0000 lvl=eror msg="Failed connecting to Postgres" err="invalid option: \"9KJj0jRoQr'\""
docker-grafana-1 | logger=context traceID=00000000000000000000000000000000 userId=1 orgId=1 uname=admin t=2023-08-31T14:03:03.8+0000 lvl=eror msg="Request Completed" method=POST path=/api/ds/query status=500 remote_addr=192.168.1.210 time_ms=68 duration=68.775142ms size=75 referer="http://192.168.1.210:3000/d/kOuP_Fggz/overview?orgId=1&refresh=30s" traceID=00000000000000000000000000000000
Not sure why 500 error is being returned? I have driven the car as well to ensure something would be loaded into the DB but seemingly not?
Expected Behavior
Data should be shown?
Steps To Reproduce
go to http://192.168.1.210:3000/d/_7WkNSyWk/drive-stats?orgId=1 for example tables showing error
Relevant log output
Screenshots
Additional data
No response
Type of installation
Docker
Version
v1.27.3