Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teslamate not running on Synology DS713+ #765

Closed
Benn opened this issue May 28, 2020 · 27 comments
Closed

Teslamate not running on Synology DS713+ #765

Benn opened this issue May 28, 2020 · 27 comments
Labels

Comments

@Benn
Copy link

Benn commented May 28, 2020

Describe the bug

After following the below guide on a DS713+ (with 2GB RAM) :
#113
Grafana on port 3000 is working fine, but Teslamate on port 4000 is not responding.
It works fine on both Raspberry Pis on which i installed it.

Expected behavior

when typing http://MyIP:4000, I should get the page to enter my Tesla credentials

How to reproduce it (as minimally and precisely as possible):

  1. Follow Synology install guide (with current docker-composer.yml)
  2. open http://MyIP:4000

Relevant entries from the logs

Database_1 Logs :

date stream content
2020-05-28 07:45:30 stderr 2020-05-28 07:45:30.732 UTC [1] LOG:  database system is ready to accept connections
2020-05-28 07:45:30 stderr 2020-05-28 07:45:30.709 UTC [63] LOG:  database system was shut down at 2020-05-28 07:45:30 UTC
2020-05-28 07:45:30 stderr 2020-05-28 07:45:30.649 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-05-28 07:45:30 stderr 2020-05-28 07:45:30.641 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2020-05-28 07:45:30 stderr 2020-05-28 07:45:30.641 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2020-05-28 07:45:30 stderr 2020-05-28 07:45:30.640 UTC [1] LOG:  starting PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2020-05-28 07:45:30 stdout  
2020-05-28 07:45:30 stdout PostgreSQL init process complete; ready for start up.
2020-05-28 07:45:30 stdout  
2020-05-28 07:45:30 stdout server stopped
2020-05-28 07:45:30 stdout done
2020-05-28 07:45:30 stdout 2020-05-28 07:45:30.473 UTC [45] LOG:  database system is shut down
2020-05-28 07:45:30 stdout 2020-05-28 07:45:30.369 UTC [47] LOG:  shutting down
2020-05-28 07:45:30 stdout 2020-05-28 07:45:30.368 UTC [45] LOG:  background worker "logical replication launcher" (PID 52) exited with exit code 1
2020-05-28 07:45:30 stdout waiting for server to shut down....2020-05-28 07:45:30.360 UTC [45] LOG:  aborting any active transactions
2020-05-28 07:45:30 stdout 2020-05-28 07:45:30.355 UTC [45] LOG:  received fast shutdown request
2020-05-28 07:45:30 stdout  
2020-05-28 07:45:30 stdout /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
2020-05-28 07:45:30 stdout  
2020-05-28 07:45:30 stdout  
2020-05-28 07:45:30 stdout CREATE DATABASE
2020-05-28 07:45:28 stdout server started
2020-05-28 07:45:28 stdout done
2020-05-28 07:45:28 stdout 2020-05-28 07:45:28.895 UTC [45] LOG:  database system is ready to accept connections
2020-05-28 07:45:28 stdout 2020-05-28 07:45:28.859 UTC [46] LOG:  database system was shut down at 2020-05-28 07:45:26 UTC
2020-05-28 07:45:28 stdout 2020-05-28 07:45:28.600 UTC [45] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-05-28 07:45:28 stdout waiting for server to start....2020-05-28 07:45:28.583 UTC [45] LOG:  starting PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2020-05-28 07:45:28 stderr --auth-local and --auth-host, the next time you run initdb.
2020-05-28 07:45:28 stderr You can change this by editing pg_hba.conf or using the option -A, or
2020-05-28 07:45:28 stderr initdb: warning: enabling "trust" authentication for local connections
2020-05-28 07:45:28 stdout  
2020-05-28 07:45:28 stdout pg_ctl -D /var/lib/postgresql/data -l logfile start
2020-05-28 07:45:28 stdout  
2020-05-28 07:45:28 stdout Success. You can now start the database server using:
2020-05-28 07:45:28 stdout  
2020-05-28 07:45:28 stdout  
2020-05-28 07:45:28 stdout syncing data to disk ... ok
2020-05-28 07:45:26 stdout performing post-bootstrap initialization ... ok
2020-05-28 07:45:21 stdout running bootstrap script ... ok
2020-05-28 07:45:20 stdout creating configuration files ... ok
2020-05-28 07:45:20 stdout selecting default time zone ... Etc/UTC
2020-05-28 07:45:20 stdout selecting default shared_buffers ... 128MB
2020-05-28 07:45:20 stdout selecting default max_connections ... 100
2020-05-28 07:45:19 stdout selecting dynamic shared memory implementation ... posix
2020-05-28 07:45:19 stdout creating subdirectories ... ok
2020-05-28 07:45:19 stdout fixing permissions on existing directory /var/lib/postgresql/data ... ok
2020-05-28 07:45:19 stdout  
2020-05-28 07:45:19 stdout Data page checksums are disabled.
2020-05-28 07:45:19 stdout  
2020-05-28 07:45:19 stdout The default text search configuration will be set to "english".
2020-05-28 07:45:19 stdout The default database encoding has accordingly been set to "UTF8".
2020-05-28 07:45:19 stdout The database cluster will be initialized with locale "en_US.utf8".
2020-05-28 07:45:19 stdout  
2020-05-28 07:45:19 stdout This user must also own the server process.
2020-05-28 07:45:19 stdout The files belonging to this database system will be owned by user "postgres".

Teslamate_1 Logs :

2020-05-28 08:21:25 | stdout | waiting for postgres at database:5432 (1024sec)
2020-05-28 08:10:45 | stdout | waiting for postgres at database:5432 (512sec)
2020-05-28 08:04:22 | stdout | waiting for postgres at database:5432 (256sec)
2020-05-28 08:00:07 | stdout | waiting for postgres at database:5432 (128sec)
2020-05-28 07:56:56 | stdout | waiting for postgres at database:5432 (64sec)
2020-05-28 07:54:16 | stdout | waiting for postgres at database:5432 (32sec)
2020-05-28 07:51:53 | stdout | waiting for postgres at database:5432 (16sec)
2020-05-28 07:49:38 | stdout | waiting for postgres at database:5432 (8sec)
2020-05-28 07:47:27 | stdout | waiting for postgres at database:5432 (4sec)
2020-05-28 07:45:17 | stdout | waiting for postgres at database:5432 (2sec)

Screenshots

Screen recording of the install on a fresh Docker (after having completely deleted and reinstalled the docker package)
https://www.youtube.com/watch?v=sGRL6A-bSZQ

Environment

  • TeslaMate version: 1.19.3 - 2020-05-03
  • Type of installation: Docker
  • OS TeslaMate is installed on: Synology Disk Station on DS713+ with 2MB RAM
  • User OS & Browser: Windows / Chrome
  • Others:
@dyxyl
Copy link
Contributor

dyxyl commented Jun 7, 2020

Which version of Docker do you have?

@Benn
Copy link
Author

Benn commented Jun 8, 2020

Docker version 18.09.8, build bfed4f5

 

@dyxyl
Copy link
Contributor

dyxyl commented Jun 9, 2020

It could be another broken version of the Docker package.

What is the output of the following two commands after starting the containers and waiting a while?

docker-compose exec teslamate nc -vvz -w 5 database 5432

docker-compose config

Even though it is a different problem, you could also try to downgrade Docker (see #108 (comment)).

@bahree
Copy link

bahree commented Jun 9, 2020

I am on the same version on Synology and this is working OK.

From what I could gather from your video the only difference I caught was the explicit IP but it was too quick so I might be wrong. Here is my docker compose file if it helps.

version: '3'
services:
  teslamate:
    image: teslamate/teslamate:latest
    restart: always
    environment:
      - DATABASE_USER=teslamate
      - DATABASE_PASS=retracted
      - DATABASE_NAME=teslamate
      - DATABASE_HOST=database
      - MQTT_HOST=mosquitto
      - VIRTUAL_HOST=192.168.10.2
      - TZ=America/Los_Angeles # (optional) replace to use local time in debug logs. See "Configuration".
    ports:
      - 4000:4000
    cap_drop:
      - all

  database:
    image: postgres:12
    restart: always
    environment:
      - POSTGRES_USER=teslamate
      - POSTGRES_PASSWORD=teslamate
      - POSTGRES_DB=teslamate
    ports:
      - 6432:5432
    volumes:
      - teslamate-db:/var/lib/postgresql/data

  grafana:
    image: teslamate/grafana:latest
    restart: always
    environment:
      - DATABASE_USER=teslamate
      - DATABASE_PASS=teslamate
      - DATABASE_NAME=teslamate
      - DATABASE_HOST=database
    ports:
      - 4001:3000
    volumes:
      - teslamate-grafana-data:/var/lib/grafana

  mosquitto:
    image: eclipse-mosquitto:1.6
    restart: always
    ports:
      - 1883:1883
      - 9001:9001
    volumes:
      - mosquitto-conf:/mosquitto/config
      - mosquitto-data:/mosquitto/data

volumes:
    teslamate-db:
    teslamate-grafana-data:
    mosquitto-conf:
    mosquitto-data:

@Benn
Copy link
Author

Benn commented Jun 9, 2020

Hi @dyxyl ,
The first comment returns

nc: database (172.18.0.4:5432): Operation timed out
sent 0, rcvd 0

The second one

^[[D^[[D^[[Dservices:
  database:
    environment:
      POSTGRES_DB: teslamate
      POSTGRES_PASSWORD: secret
      POSTGRES_USER: teslamate
    image: postgres:12
    restart: always
    volumes:
    - teslamate-db:/var/lib/postgresql/data:rw
  grafana:
    environment:
      DATABASE_HOST: database
      DATABASE_NAME: teslamate
      DATABASE_PASS: secret
      DATABASE_USER: teslamate
    image: teslamate/grafana:latest
    ports:
    - 3000:3000/tcp
    restart: always
    volumes:
    - teslamate-grafana-data:/var/lib/grafana:rw
  mosquitto:
    image: eclipse-mosquitto:1.6
    ports:
    - 1883:1883/tcp
    restart: always
    volumes:
    - mosquitto-conf:/mosquitto/config:rw
    - mosquitto-data:/mosquitto/data:rw
  teslamate:
    cap_drop:
    - all
    environment:
      DATABASE_HOST: database
      DATABASE_NAME: teslamate
      DATABASE_PASS: secret
      DATABASE_USER: teslamate
      MQTT_HOST: mosquitto
    image: teslamate/teslamate:latest
    ports:
    - 4000:4000/tcp
    restart: always
    volumes:
    - /volume1/@docker/import:/opt/app/import:rw
version: '3.0'
volumes:
  mosquitto-conf: {}
  mosquitto-data: {}
  teslamate-db: {}
  teslamate-grafana-data: {}

@Benn
Copy link
Author

Benn commented Jun 9, 2020

I've also tried downgrading the docker version previously, no luck.
I've tried with your yml settings @bahree , no luck :(

@dyxyl
Copy link
Contributor

dyxyl commented Jun 10, 2020

The config looks good, but Operation timed out suggests a firewall problem. Did it take roughly 5 seconds before it returned this error?

Some more commands to try (5433 is not a typo):

docker-compose exec teslamate nc -vvz -w 5 database 5433

docker-compose exec grafana nc -vvz -w 5 database 5432

iptables -L -v

@Benn
Copy link
Author

Benn commented Jun 10, 2020

@dyxyl
Yes, it does take about 5 seconds.
Here are the results :

root@SynoFeB:/volume1/@docker# docker-compose exec teslamate nc -vvz -w 5 databa                                                                                        se 5433
nc: database (172.18.0.3:5433): Operation timed out
sent 0, rcvd 0
 5432SynoFeB:/volume1/@docker# docker-compose exec grafana nc -vvz -w 5 database
nc: database (172.18.0.3:5432): Operation timed out
sent 0, rcvd 0
root@SynoFeB:/volume1/@docker# iptables -L -v
Chain INPUT (policy ACCEPT 143K packets, 41M bytes)
 pkts bytes target     prot opt in     out     source               destination
  22M 6752M DOS_PROTECT  all  --  any    any     anywhere             anywhere
  13M 1398M INPUT_FIREWALL  all  --  any    any     anywhere             anywhere

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
 1420 81456 FORWARD_FIREWALL  all  --  any    any     anywhere             anywhere

Chain OUTPUT (policy ACCEPT 1195K packets, 423M bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain DOCKER (0 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     tcp  --  !docker-ee227685 docker-ee227685  anywhere             172.18.0.2           tcp dpt:9001
    0     0 ACCEPT     tcp  --  !docker-ee227685 docker-ee227685  anywhere             172.18.0.2           tcp dpt:1883
    0     0 ACCEPT     tcp  --  !docker-ee227685 docker-ee227685  anywhere             172.18.0.3           tcp dpt:postgres
    0     0 ACCEPT     tcp  --  !docker-ee227685 docker-ee227685  anywhere             172.18.0.4           tcp dpt:3000
    0     0 ACCEPT     tcp  --  !docker-ee227685 docker-ee227685  anywhere             172.18.0.5           tcp dpt:4000

Chain DOCKER-ISOLATION-STAGE-1 (0 references)
 pkts bytes target     prot opt in     out     source               destination
   11   921 DOCKER-ISOLATION-STAGE-2  all  --  docker-ee227685 !docker-ee227685  anywhere             anywhere
    0     0 DOCKER-ISOLATION-STAGE-2  all  --  docker0 !docker0  anywhere             anywhere
   85 23174 RETURN     all  --  any    any     anywhere             anywhere

Chain DOCKER-ISOLATION-STAGE-2 (2 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  any    docker-ee227685  anywhere             anywhere
    0     0 DROP       all  --  any    docker0  anywhere             anywhere
   11   921 RETURN     all  --  any    any     anywhere             anywhere

Chain DOCKER-USER (0 references)
 pkts bytes target     prot opt in     out     source               destination
   85 23174 RETURN     all  --  any    any     anywhere             anywhere

Chain DOS_PROTECT (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 RETURN     icmp --  eth0   any     anywhere             anywhere             icmp echo-request limit: avg 1/sec burst 5
    0     0 DROP       icmp --  eth0   any     anywhere             anywhere             icmp echo-request
    0     0 RETURN     tcp  --  eth0   any     anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/RST limit: avg 1/sec burst 5
    0     0 DROP       tcp  --  eth0   any     anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/RST
    0     0 RETURN     tcp  --  eth0   any     anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 10000/sec burst 100
    0     0 DROP       tcp  --  eth0   any     anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN

Chain FORWARD_FIREWALL (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             state RELATED,ESTABLISHED
    0     0 RETURN     udp  --  any    any     anywhere             anywhere             multiport sports 19997,netbios-ns,netbios-dgm,65001,5004,rfe
    0     0 RETURN     tcp  --  any    any     anywhere             anywhere             multiport dports http,https,rtsp,netbios-ns,netbios-dgm,netbios-ssn,microsoft-ds
    0     0 RETURN     tcp  --  any    any     anywhere             anywhere             multiport dports 9025:9040,6281,16881,4662,5005,5006,1723
    0     0 RETURN     tcp  --  any    any     anywhere             anywhere             multiport dports telnet,5022,ssh,50002,50001,8083,3307
    0     0 RETURN     tcp  --  any    any     anywhere             anywhere             multiport dports smtp,smtps,submission,pop3,pop3s,imap,imaps
    0     0 RETURN     udp  --  any    any     anywhere             anywhere             multiport dports 19998,19999,ntp,65001,5004,rfe,6881
    0     0 RETURN     udp  --  any    any     anywhere             anywhere             multiport dports 4672,1194,l2tp,4500,isakmp,1900
    0     0 RETURN     47   --  any    any     anywhere             anywhere
    0     0 RETURN     esp  --  any    any     anywhere             anywhere
    0     0 RETURN     ah   --  any    any     anywhere             anywhere
    0     0 RETURN     all  --  any    any     anywhere             anywhere             source IP range 192.168.1.1-192.168.1.255
    0     0 RETURN     all  --  any    any     anywhere             anywhere             Source countries: AU,BE,BS,CA,DE,ES,FR,GB,GF,IE,IT,NL,NO,TH,US
 1420 81456 DROP       all  --  any    any     anywhere             anywhere
    0     0 RETURN     udp  --  eth0   any     anywhere             anywhere             multiport sports 65001,5004,rfe
    0     0 RETURN     tcp  --  eth0   any     anywhere             anywhere             multiport dports http,https,9025:9040
    0     0 RETURN     udp  --  eth0   any     anywhere             anywhere             multiport dports 65001,5004,rfe
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source countries: FR,GF
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: CA
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: US
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: BE
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: DE
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: GB
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: NO
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: ES
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             source IP range 192.168.1.1-192.168.1.255
    0     0 DROP       all  --  eth0   any     anywhere             anywhere
    0     0 RETURN     all  --  eth1   any     anywhere             anywhere             Source countries: BE,BS,CA,CH,CZ,DE,FR,GB,GF,IE,IT,MU,PF,TH,US
    0     0 RETURN     all  --  eth1   any     192.168.1.0/24       anywhere
    0     0 DROP       all  --  eth1   any     anywhere             anywhere
    0     0 RETURN     all  --  eth1   any     anywhere             anywhere

Chain INPUT_FIREWALL (1 references)
 pkts bytes target     prot opt in     out     source               destination
 263K  235M ACCEPT     all  --  lo     any     anywhere             anywhere
  13M 1113M ACCEPT     all  --  any    any     anywhere             anywhere             state RELATED,ESTABLISHED
20761 1811K RETURN     udp  --  any    any     anywhere             anywhere             multiport sports 19997,netbios-ns,netbios-dgm,65001,5004,rfe
 2057  119K RETURN     tcp  --  any    any     anywhere             anywhere             multiport dports http,https,rtsp,netbios-ns,netbios-dgm,netbios-ssn,microsoft-ds
    9   420 RETURN     tcp  --  any    any     anywhere             anywhere             multiport dports 9025:9040,6281,16881,4662,5005,5006,1723
11208  699K RETURN     tcp  --  any    any     anywhere             anywhere             multiport dports telnet,5022,ssh,50002,50001,8083,3307
    0     0 RETURN     tcp  --  any    any     anywhere             anywhere             multiport dports smtp,smtps,submission,pop3,pop3s,imap,imaps
    0     0 RETURN     udp  --  any    any     anywhere             anywhere             multiport dports 19998,19999,ntp,65001,5004,rfe,6881
73789   34M RETURN     udp  --  any    any     anywhere             anywhere             multiport dports 4672,1194,l2tp,4500,isakmp,1900
    0     0 RETURN     47   --  any    any     anywhere             anywhere
    0     0 RETURN     esp  --  any    any     anywhere             anywhere
    0     0 RETURN     ah   --  any    any     anywhere             anywhere
44423   10M RETURN     all  --  any    any     anywhere             anywhere             source IP range 192.168.1.1-192.168.1.255
11444  686K RETURN     all  --  any    any     anywhere             anywhere             Source countries: AU,BE,BS,CA,DE,ES,FR,GB,GF,IE,IT,NL,NO,TH,US
 6496 2117K DROP       all  --  any    any     anywhere             anywhere
    0     0 RETURN     udp  --  eth0   any     anywhere             anywhere             multiport sports 65001,5004,rfe
    0     0 RETURN     tcp  --  eth0   any     anywhere             anywhere             multiport dports http,https,9025:9040
    0     0 RETURN     udp  --  eth0   any     anywhere             anywhere             multiport dports 65001,5004,rfe
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source countries: FR,GF
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: CA
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: US
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: BE
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: DE
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: GB
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: NO
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             Source country: ES
    0     0 RETURN     all  --  eth0   any     anywhere             anywhere             source IP range 192.168.1.1-192.168.1.255
    0     0 DROP       all  --  eth0   any     anywhere             anywhere
    0     0 RETURN     all  --  eth1   any     anywhere             anywhere             Source countries: BE,BS,CA,CH,CZ,DE,FR,GB,GF,IE,IT,MU,PF,TH,US
    0     0 RETURN     all  --  eth1   any     192.168.1.0/24       anywhere
    0     0 DROP       all  --  eth1   any     anywhere             anywhere
    0     0 RETURN     all  --  eth1   any     anywhere             anywhere

@dyxyl
Copy link
Contributor

dyxyl commented Jun 11, 2020

FWIW, the 5 second delay is caused by the -w 5 argument so that is expected.

The timeout for port 5433 strongly suggests a firewall problem that is blocking all communication between docker containers (it should have given "Connection refused").

The firewall is controlled by the iptables rules but none of the docker-specific rules are referenced in the FORWARD rule, so that would explain why it doesn't work. Interestingly, the packet count for some of the docker-specific rules is non-zero, so it looks like they were referenced for a short time in the past.

Is this the standard firewall config? Can you turn off the firewall temporarily (if that is safe) to see if that fixes it?

@Benn
Copy link
Author

Benn commented Jun 14, 2020

Hi, @dyxyl
Thanks for your time !
I tried disabling the firewall and get the same results.

@Benn
Copy link
Author

Benn commented Jun 14, 2020

I tried uninstalling the docker package and starting over and now get different logs for Teslamate :


date | stream | content
-- | -- | --
2020-06-14 23:06:46 | stderr | Crash dump is being written to: erl_crash.dump...done
2020-06-14 23:06:46 | stderr |  
2020-06-14 23:06:46 | stderr | Kernel pid terminated (application_controller) ({application_start_failure,teslamate,{{shutdown,{failed_to_start_child,'Elixir.TeslaMate.Api',{#{'__exception__' => true,'__struct__' => 'Elixir.DBConne
2020-06-14 23:06:46 | stdout | {"Kernel pid terminated",application_controller,"{application_start_failure,teslamate,{{shutdown,{failed_to_start_child,'Elixir.TeslaMate.Api',{#{'__exception__' => true,'__struct__' => 'Elixir.DBConnection.ConnectionError',message => <<\"connection not available and request was dropped from queue after 2999ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\n\n  1. By tracking down slow queries and making sure they are running fast enough\n  2. Increasing the pool_size (albeit it increases resource consumption)\n  3. Allow requests to wait longer by increasing :queue_target and :queue_interval\n\nSee DBConnection.start_link/2 for more information\n\">>,severity => error},[{'Elixir.Ecto.Adapters.SQL',raise_sql_call_error,1,[{file,\"lib/ecto/adapters/sql.ex\"},{line,593}]},{'Elixir.Ecto.Adapters.SQL',execute,5,[{file,\"lib/ecto/adapters/sql.ex\"},{line,526}]},{'Elixir.Ecto.Repo.Queryable',execute,4,[{file,\"lib/ecto/repo/queryable.ex\"},{line,192}]},{'Elixir.Ecto.Repo.Queryable',all,3,[{file,\"lib/ecto/repo/queryable.ex\"},{line,17}]},{'Elixir.TeslaMate.Auth',get_tokens,0,[{file,\"lib/teslamate/auth.ex\"},{line,22}]},{'Elixir.TeslaMate.Api',init,1,[{file,\"lib/teslamate/api.ex\"},{line,85}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,374}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,342}]}]}}},{'Elixir.TeslaMate.Application',start,[normal,[]]}}}"}
2020-06-14 23:06:44 | stdout | (stdlib 3.12.1) gen_server.erl:342: :gen_server.init_it/6
2020-06-14 23:06:44 | stdout | (stdlib 3.12.1) gen_server.erl:374: :gen_server.init_it/2
2020-06-14 23:06:44 | stdout | (teslamate 1.19.4) lib/teslamate/api.ex:85: TeslaMate.Api.init/1
2020-06-14 23:06:44 | stdout | (teslamate 1.19.4) lib/teslamate/auth.ex:22: TeslaMate.Auth.get_tokens/0
2020-06-14 23:06:44 | stdout | (ecto 3.4.3) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
2020-06-14 23:06:44 | stdout | (ecto 3.4.3) lib/ecto/repo/queryable.ex:192: Ecto.Repo.Queryable.execute/4
2020-06-14 23:06:44 | stdout | (ecto_sql 3.4.3) lib/ecto/adapters/sql.ex:526: Ecto.Adapters.SQL.execute/5
2020-06-14 23:06:44 | stdout | (ecto_sql 3.4.3) lib/ecto/adapters/sql.ex:593: Ecto.Adapters.SQL.raise_sql_call_error/1
2020-06-14 23:06:44 | stdout |  
2020-06-14 23:06:44 | stdout | See DBConnection.start_link/2 for more information
2020-06-14 23:06:44 | stdout |  
2020-06-14 23:06:44 | stdout | 3. Allow requests to wait longer by increasing :queue_target and :queue_interval
2020-06-14 23:06:44 | stdout | 2. Increasing the pool_size (albeit it increases resource consumption)
2020-06-14 23:06:44 | stdout | 1. By tracking down slow queries and making sure they are running fast enough
2020-06-14 23:06:44 | stdout |  
2020-06-14 23:06:44 | stdout | ** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2999ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:
2020-06-14 23:06:44 | stdout | ** (EXIT) an exception was raised:
2020-06-14 23:06:44 | stdout | 23:06:44.658 [info] Application teslamate exited: TeslaMate.Application.start(:normal, []) returned an error: shutdown: failed to start child: TeslaMate.Api
2020-06-14 23:06:41 | stdout | 23:06:41.640 [info] Version: 1.19.4
2020-06-14 23:06:06 | stdout | 23:06:06.146 [info] Already up
2020-06-14 23:05:48 | stderr | Crash dump is being written to: erl_crash.dump...done
2020-06-14 23:05:48 | stderr |  
2020-06-14 23:05:48 | stderr | Kernel pid terminated (application_controller) ({application_start_failure,teslamate,{{shutdown,{failed_to_start_child,'Elixir.TeslaMate.Api',{#{'__exception__' => true,'__struct__' => 'Elixir.DBConne
2020-06-14 23:05:48 | stdout | {"Kernel pid terminated",application_controller,"{application_start_failure,teslamate,{{shutdown,{failed_to_start_child,'Elixir.TeslaMate.Api',{#{'__exception__' => true,'__struct__' => 'Elixir.DBConnection.ConnectionError',message => <<\"connection not available and request was dropped from queue after 2999ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\n\n  1. By tracking down slow queries and making sure they are running fast enough\n  2. Increasing the pool_size (albeit it increases resource consumption)\n  3. Allow requests to wait longer by increasing :queue_target and :queue_interval\n\nSee DBConnection.start_link/2 for more information\n\">>,severity => error},[{'Elixir.Ecto.Adapters.SQL',raise_sql_call_error,1,[{file,\"lib/ecto/adapters/sql.ex\"},{line,593}]},{'Elixir.Ecto.Adapters.SQL',execute,5,[{file,\"lib/ecto/adapters/sql.ex\"},{line,526}]},{'Elixir.Ecto.Repo.Queryable',execute,4,[{file,\"lib/ecto/repo/queryable.ex\"},{line,192}]},{'Elixir.Ecto.Repo.Queryable',all,3,[{file,\"lib/ecto/repo/queryable.ex\"},{line,17}]},{'Elixir.TeslaMate.Auth',get_tokens,0,[{file,\"lib/teslamate/auth.ex\"},{line,22}]},{'Elixir.TeslaMate.Api',init,1,[{file,\"lib/teslamate/api.ex\"},{line,85}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,374}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,342}]}]}}},{'Elixir.TeslaMate.Application',start,[normal,[]]}}}"}
2020-06-14 23:05:46 | stdout | (stdlib 3.12.1) gen_server.erl:342: :gen_server.init_it/6
2020-06-14 23:05:46 | stdout | (stdlib 3.12.1) gen_server.erl:374: :gen_server.init_it/2
2020-06-14 23:05:46 | stdout | (teslamate 1.19.4) lib/teslamate/api.ex:85: TeslaMate.Api.init/1
2020-06-14 23:05:46 | stdout | (teslamate 1.19.4) lib/teslamate/auth.ex:22: TeslaMate.Auth.get_tokens/0
2020-06-14 23:05:46 | stdout | (ecto 3.4.3) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
2020-06-14 23:05:46 | stdout | (ecto 3.4.3) lib/ecto/repo/queryable.ex:192: Ecto.Repo.Queryable.execute/4
2020-06-14 23:05:46 | stdout | (ecto_sql 3.4.3) lib/ecto/adapters/sql.ex:526: Ecto.Adapters.SQL.execute/5
2020-06-14 23:05:46 | stdout | (ecto_sql 3.4.3) lib/ecto/adapters/sql.ex:593: Ecto.Adapters.SQL.raise_sql_call_error/1
2020-06-14 23:05:46 | stdout |  
2020-06-14 23:05:46 | stdout | See DBConnection.start_link/2 for more information
2020-06-14 23:05:46 | stdout |  
2020-06-14 23:05:46 | stdout | 3. Allow requests to wait longer by increasing :queue_target and :queue_interval
2020-06-14 23:05:46 | stdout | 2. Increasing the pool_size (albeit it increases resource consumption)
2020-06-14 23:05:46 | stdout | 1. By tracking down slow queries and making sure they are running fast enough
2020-06-14 23:05:46 | stdout |  
2020-06-14 23:05:46 | stdout | ** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2999ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:
2020-06-14 23:05:46 | stdout | ** (EXIT) an exception was raised:
2020-06-14 23:05:46 | stdout | 23:05:46.987 [info] Application teslamate exited: TeslaMate.Application.start(:normal, []) returned an error: shutdown: failed to start child: TeslaMate.Api
2020-06-14 23:05:43 | stdout | 23:05:43.976 [info] Version: 1.19.4
2020-06-14 23:05:08 | stdout | 23:05:08.895 [info] == Migrated 20200502140646 in 0.0s
2020-06-14 23:05:08 | stdout | 23:05:08.893 [info] drop index if exists addresses_ll_to_earth_latitude__longitude_index
2020-06-14 23:05:08 | stdout | 23:05:08.890 [info] drop index if exists positions_ll_to_earth_latitude__longitude_index
2020-06-14 23:05:08 | stdout | 23:05:08.889 [info] == Running 20200502140646 TeslaMate.Repo.Migrations.DropUnusedIndexes.change/0 forward
2020-06-14 23:05:08 | stdout | 23:05:08.866 [info] == Migrated 20200410112005 in 0.6s
2020-06-14 23:05:08 | stdout | 23:05:08.830 [info] alter table updates
2020-06-14 23:05:08 | stdout | 23:05:08.796 [info] alter table tokens
2020-06-14 23:05:08 | stdout | 23:05:08.745 [info] alter table states
2020-06-14 23:05:08 | stdout | 23:05:08.675 [info] alter table charges
2020-06-14 23:05:08 | stdout | 23:05:08.588 [info] alter table positions
2020-06-14 23:05:08 | stdout | 23:05:08.550 [info] alter table geofences
2020-06-14 23:05:08 | stdout | 23:05:08.401 [info] alter table drives
2020-06-14 23:05:08 | stdout | 23:05:08.313 [info] alter table charging_processes
2020-06-14 23:05:08 | stdout | 23:05:08.268 [info] alter table addresses
2020-06-14 23:05:08 | stdout | 23:05:08.208 [info] alter table cars
2020-06-14 23:05:08 | stdout | 23:05:08.204 [info] == Running 20200410112005 TeslaMate.Repo.Migrations.DatabaseEfficiencyImprovements.change/0 forward
2020-06-14 23:05:08 | stdout | 23:05:08.196 [info] == Migrated 20200401171923 in 0.0s
2020-06-14 23:05:08 | stdout | 23:05:08.184 [info] == Running 20200401171923 TeslaMate.Repo.Migrations.EnableStreaming.up/0 forward
2020-06-14 23:05:08 | stdout | 23:05:08.082 [info] == Migrated 20200401171402 in 0.0s
2020-06-14 23:05:08 | stdout | 23:05:08.078 [info] alter table car_settings
2020-06-14 23:05:08 | stdout | 23:05:08.078 [info] == Running 20200401171402 TeslaMate.Repo.Migrations.RemoveSleepModeRequirements.change/0 forward
2020-06-14 23:05:08 | stdout | 23:05:08.067 [info] == Migrated 20200401170940 in 0.0s
2020-06-14 23:05:08 | stdout | 23:05:08.061 [info] drop table geofence_sleep_mode_blacklist
2020-06-14 23:05:08 | stdout | 23:05:08.055 [info] drop table geofence_sleep_mode_whitelist
2020-06-14 23:05:08 | stdout | 23:05:08.052 [info] alter table car_settings
2020-06-14 23:05:08 | stdout | 23:05:08.051 [info] == Running 20200401170940 TeslaMate.Repo.Migrations.RemoveSleepModeToggles.up/0 forward
2020-06-14 23:05:08 | stdout | 23:05:08.041 [info] == Migrated 20200320140020 in 0.0s
2020-06-14 23:05:08 | stdout | 23:05:08.039 [info] alter table drives
2020-06-14 23:05:08 | stdout | 23:05:08.038 [info] == Running 20200320140020 TeslaMate.Repo.Migrations.DropPowerAvg.change/0 forward
2020-06-14 23:05:08 | stdout | 23:05:08.015 [info] == Migrated 20200318164021 in 0.0s
2020-06-14 23:05:08 | stdout | 23:05:08.012 [info] alter table car_settings
2020-06-14 23:05:08 | stdout | 23:05:08.012 [info] == Running 20200318164021 TeslaMate.Repo.Migrations.UseStreamingApi.change/0 forward
2020-06-14 23:05:08 | stdout | 23:05:08.000 [info] == Migrated 20200306133847 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.998 [info] alter table geofences
2020-06-14 23:05:07 | stdout | 23:05:07.997 [info] == Running 20200306133847 TeslaMate.Repo.Migrations.AddFlatFee.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.974 [info] == Migrated 20200306130218 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.970 [info] execute "UPDATE addresses a\nSET city = (\n  SELECT trim(BOTH '\"' FROM COALESCE(\n    raw -> 'address' -> 'city',\n    raw -> 'address' -> 'town',\n    raw -> 'address' -> 'municipality',\n    raw -> 'address' -> 'village',\n    raw -> 'address' -> 'hamlet',\n    raw -> 'address' -> 'locality',\n    raw -> 'address' -> 'croft'\n  )::text)\n  FROM addresses\n  WHERE a.id = id\n) WHERE\n  raw -> 'address' -> 'village' IS NOT NULL OR\n  raw -> 'address' -> 'hamlet' IS NOT NULL OR\n  raw -> 'address' -> 'locality' IS NOT NULL OR\n  raw -> 'address' -> 'croft' IS NOT NULL;\n"
2020-06-14 23:05:07 | stdout | 23:05:07.969 [info] == Running 20200306130218 TeslaMate.Repo.Migrations.UpdateCities.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.960 [info] == Migrated 20200302100654 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.957 [info] alter table cars
2020-06-14 23:05:07 | stdout | 23:05:07.957 [info] == Running 20200302100654 TeslaMate.Repo.Migrations.AddVehicleConfigAttrbitues.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.948 [info] == Migrated 20200216121330 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.944 [info] alter table settings
2020-06-14 23:05:07 | stdout | 23:05:07.943 [info] == Running 20200216121330 TeslaMate.Repo.Migrations.UseRatedAsDefaultPreferredRange.up/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.933 [info] == Migrated 20200212001245 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.924 [info] alter table geofences
2020-06-14 23:05:07 | stdout | 23:05:07.924 [info] == Running 20200212001245 TeslaMate.Repo.Migrations.LocationBasedChargeCostIncreaseScale.up/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.916 [info] == Migrated 20200203180529 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.912 [info] alter table car_settings
2020-06-14 23:05:07 | stdout | 23:05:07.910 [info] alter table geofences
2020-06-14 23:05:07 | stdout | 23:05:07.910 [info] == Running 20200203180529 TeslaMate.Repo.Migrations.LocationBasedChargeCost.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.899 [info] == Migrated 20200203120311 in 0.1s
2020-06-14 23:05:07 | stdout | 23:05:07.891 [info] alter table updates
2020-06-14 23:05:07 | stdout | 23:05:07.887 [info] drop constraint updates_car_id_fkey from table updates
2020-06-14 23:05:07 | stdout | 23:05:07.861 [info] alter table states
2020-06-14 23:05:07 | stdout | 23:05:07.857 [info] drop constraint states_car_id_fkey from table states
2020-06-14 23:05:07 | stdout | 23:05:07.843 [info] alter table positions
2020-06-14 23:05:07 | stdout | 23:05:07.839 [info] drop constraint positions_drive_id_fkey from table positions
2020-06-14 23:05:07 | stdout | 23:05:07.835 [info] drop constraint positions_car_id_fkey from table positions
2020-06-14 23:05:07 | stdout | 23:05:07.792 [info] alter table drives
2020-06-14 23:05:07 | stdout | 23:05:07.787 [info] drop constraint drives_end_geofence_id_fkey from table drives
2020-06-14 23:05:07 | stdout | 23:05:07.783 [info] drop constraint drives_start_geofence_id_fkey from table drives
2020-06-14 23:05:07 | stdout | 23:05:07.783 [info] constraint "drives_end_address_id_fkey" of relation "drives" does not exist, skipping
2020-06-14 23:05:07 | stdout | 23:05:07.782 [info] drop constraint if exists drives_end_address_id_fkey from table drives
2020-06-14 23:05:07 | stdout | 23:05:07.781 [info] constraint "drives_start_address_id_fkey" of relation "drives" does not exist, skipping
2020-06-14 23:05:07 | stdout | 23:05:07.780 [info] drop constraint if exists drives_start_address_id_fkey from table drives
2020-06-14 23:05:07 | stdout | 23:05:07.775 [info] drop constraint if exists trips_end_address_id_fkey from table drives
2020-06-14 23:05:07 | stdout | 23:05:07.772 [info] drop constraint if exists trips_start_address_id_fkey from table drives
2020-06-14 23:05:07 | stdout | 23:05:07.768 [info] drop constraint drives_end_position_id_fkey from table drives
2020-06-14 23:05:07 | stdout | 23:05:07.764 [info] drop constraint drives_start_position_id_fkey from table drives
2020-06-14 23:05:07 | stdout | 23:05:07.764 [info] constraint "drives_car_id_fkey" of relation "drives" does not exist, skipping
2020-06-14 23:05:07 | stdout | 23:05:07.762 [info] drop constraint if exists drives_car_id_fkey from table drives
2020-06-14 23:05:07 | stdout | 23:05:07.758 [info] drop constraint if exists trips_car_id_fkey from table drives
2020-06-14 23:05:07 | stdout | 23:05:07.742 [info] alter table charging_processes
2020-06-14 23:05:07 | stdout | 23:05:07.738 [info] drop constraint charging_processes_geofence_id_fkey from table charging_processes
2020-06-14 23:05:07 | stdout | 23:05:07.734 [info] drop constraint charging_processes_address_id_fkey from table charging_processes
2020-06-14 23:05:07 | stdout | 23:05:07.730 [info] drop constraint charging_processes_car_id_fkey from table charging_processes
2020-06-14 23:05:07 | stdout | 23:05:07.722 [info] alter table charges
2020-06-14 23:05:07 | stdout | 23:05:07.718 [info] drop constraint charges_charging_process_id_fkey from table charges
2020-06-14 23:05:07 | stdout | 23:05:07.711 [info] alter table cars
2020-06-14 23:05:07 | stdout | 23:05:07.706 [info] drop constraint cars_settings_id_fkey from table cars
2020-06-14 23:05:07 | stdout | 23:05:07.706 [info] == Running 20200203120311 TeslaMate.Repo.Migrations.CascadeDelete.up/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.697 [info] == Migrated 20200120142602 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.694 [info] execute "ALTER SEQUENCE addresses_id_seq RESTART;"
2020-06-14 23:05:07 | stdout | 23:05:07.692 [info] execute "DELETE FROM addresses;"
2020-06-14 23:05:07 | stdout | 23:05:07.690 [info] execute "UPDATE charging_processes SET address_id = NULL;"
2020-06-14 23:05:07 | stdout | 23:05:07.687 [info] execute "UPDATE drives SET start_address_id = NULL, end_address_id = NULL;"
2020-06-14 23:05:07 | stdout | 23:05:07.682 [info] create index addresses_osm_id_osm_type_index
2020-06-14 23:05:07 | stdout | 23:05:07.679 [info] alter table addresses
2020-06-14 23:05:07 | stdout | 23:05:07.677 [info] drop index addresses_place_id_index
2020-06-14 23:05:07 | stdout | 23:05:07.675 [info] == Running 20200120142602 TeslaMate.Repo.Migrations.ReplacePlaceIdWithOsmid.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.664 [info] == Migrated 20200120130125 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.661 [info] alter table settings
2020-06-14 23:05:07 | stdout | 23:05:07.660 [info] == Running 20200120130125 TeslaMate.Repo.Migrations.AddLanguage.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.651 [info] == Migrated 20200116190926 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.648 [info] alter table charges
2020-06-14 23:05:07 | stdout | 23:05:07.648 [info] == Running 20200116190926 TeslaMate.Repo.Migrations.ChargesAddUsableBatteryLevel.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.619 [info] == Migrated 20200103073606 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.616 [info] alter table positions
2020-06-14 23:05:07 | stdout | 23:05:07.616 [info] == Running 20200103073606 TeslaMate.Repo.Migrations.AddUsableBatteryLevel.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.608 [info] == Migrated 20191212230527 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.605 [info] == Running 20191212230527 TeslaMate.Repo.Migrations.RecalcEnergyUsed.up/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.596 [info] == Migrated 20191212215130 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.594 [info] alter table geofences
2020-06-14 23:05:07 | stdout | 23:05:07.593 [info] == Running 20191212215130 TeslaMate.Repo.Migrations.RemovePhaseCorrection.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.579 [info] == Migrated 20191119162847 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.569 [info] create table geofence_sleep_mode_blacklist
2020-06-14 23:05:07 | stdout | 23:05:07.558 [info] create table geofence_sleep_mode_whitelist
2020-06-14 23:05:07 | stdout | 23:05:07.556 [info] alter table car_settings
2020-06-14 23:05:07 | stdout | 23:05:07.555 [info] == Running 20191119162847 TeslaMate.Repo.Migrations.GeofenceSleep.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.546 [info] == Migrated 20191117171307 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.540 [info] alter table settings
2020-06-14 23:05:07 | stdout | 23:05:07.535 [info] create index cars_settings_id_index
2020-06-14 23:05:07 | stdout | 23:05:07.530 [info] alter table cars
2020-06-14 23:05:07 | stdout | 23:05:07.526 [info] drop constraint cars_settings_id_fkey from table cars
2020-06-14 23:05:07 | stdout | 23:05:07.516 [info] alter table cars
2020-06-14 23:05:07 | stdout | 23:05:07.505 [info] create table car_settings
2020-06-14 23:05:07 | stdout | 23:05:07.504 [info] == Running 20191117171307 TeslaMate.Repo.Migrations.CarSettings.up/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.492 [info] == Migrated 20191117143038 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.485 [info] alter table settings
2020-06-14 23:05:07 | stdout | 23:05:07.484 [info] == Running 20191117143038 TeslaMate.Repo.Migrations.AddGrafanaUrl.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.466 [info] == Migrated 20191117042320 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.463 [info] alter table charging_processes
2020-06-14 23:05:07 | stdout | 23:05:07.462 [info] == Running 20191117042320 TeslaMate.Repo.Migrations.AddCostFieldToCharges.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.451 [info] == Migrated 20191026185642 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.447 [info] == Running 20191026185642 TeslaMate.Repo.Migrations.CalculateChargeEnergyUsed.up/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.412 [info] == Migrated 20191026145925 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.410 [info] alter table geofences
2020-06-14 23:05:07 | stdout | 23:05:07.409 [info] == Running 20191026145925 TeslaMate.Repo.Migrations.PhaseCorrection.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.400 [info] == Migrated 20191026144449 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.397 [info] alter table charging_processes
2020-06-14 23:05:07 | stdout | 23:05:07.397 [info] == Running 20191026144449 TeslaMate.Repo.Migrations.DropCpConfidenceAndInterval.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.387 [info] == Migrated 20191020130234 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.383 [info] alter table positions
2020-06-14 23:05:07 | stdout | 23:05:07.378 [info] alter table charges
2020-06-14 23:05:07 | stdout | 23:05:07.374 [info] alter table updates
2020-06-14 23:05:07 | stdout | 23:05:07.366 [info] alter table states
2020-06-14 23:05:07 | stdout | 23:05:07.363 [info] alter table drives
2020-06-14 23:05:07 | stdout | 23:05:07.360 [info] alter table charging_processes
2020-06-14 23:05:07 | stdout | 23:05:07.359 [info] == Running 20191020130234 TeslaMate.Repo.Migrations.IncreaseDatetimePrecision.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.342 [info] == Migrated 20191017003836 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.339 [info] alter table charging_processes
2020-06-14 23:05:07 | stdout | 23:05:07.338 [info] == Running 20191017003836 TeslaMate.Repo.Migrations.AddEstTotalChargeEnergy.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.330 [info] == Migrated 20191008191431 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.328 [info] execute "CREATE OR REPLACE FUNCTION public.ll_to_earth(float8, float8)\nRETURNS public.earth\nLANGUAGE SQL\nIMMUTABLE STRICT\nPARALLEL SAFE\nAS 'SELECT public.cube(public.cube(public.cube(public.earth()*cos(radians($1))*cos(radians($2))),public.earth()*cos(radians($1))*sin(radians($2))),public.earth()*sin(radians($1)))::public.earth';\n"
2020-06-14 23:05:07 | stdout | 23:05:07.327 [info] == Running 20191008191431 TeslaMate.Repo.Migrations.FixLlToEarth.up/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.317 [info] == Migrated 20191007105010 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.313 [info] create index addresses_ll_to_earth_latitude__longitude_index
2020-06-14 23:05:07 | stdout | 23:05:07.309 [info] create index positions_ll_to_earth_latitude__longitude_index
2020-06-14 23:05:07 | stdout | 23:05:07.306 [info] drop index geofences__earth_box_ll_to_earth_latitude__longitude___radius_index
2020-06-14 23:05:07 | stdout | 23:05:07.304 [info] drop index addresses_ll_to_earth_latitude__longitude_index
2020-06-14 23:05:07 | stdout | 23:05:07.301 [info] drop index positions_ll_to_earth_latitude__longitude_index
2020-06-14 23:05:07 | stdout | 23:05:07.297 [info] create index drives_end_geofence_id_index
2020-06-14 23:05:07 | stdout | 23:05:07.293 [info] create index drives_start_geofence_id_index
2020-06-14 23:05:07 | stdout | 23:05:07.288 [info] create index drives_end_position_id_index
2020-06-14 23:05:07 | stdout | 23:05:07.231 [info] create index drives_start_position_id_index
2020-06-14 23:05:07 | stdout | 23:05:07.228 [info] == Running 20191007105010 TeslaMate.Repo.Migrations.AddNewFkeyIndexes.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.215 [info] == Migrated 20191003132415 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.209 [info] == Running 20191003132415 TeslaMate.Repo.Migrations.AddPositionIdsAndApplyGeofences.up/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.200 [info] == Migrated 20191003130650 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.195 [info] create index positions_ll_to_earth_latitude__longitude_index
2020-06-14 23:05:07 | stdout | 23:05:07.191 [info] alter table addresses
2020-06-14 23:05:07 | stdout | 23:05:07.186 [info] alter table charging_processes
2020-06-14 23:05:07 | stdout | 23:05:07.175 [info] alter table drives
2020-06-14 23:05:07 | stdout | 23:05:07.173 [info] == Running 20191003130650 TeslaMate.Repo.Migrations.AddStartAndEndPositionToDrives.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.165 [info] == Migrated 20190928155641 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.163 [info] alter table settings
2020-06-14 23:05:07 | stdout | 23:05:07.162 [info] == Running 20190928155641 TeslaMate.Repo.Migrations.AddBaseUrlSetting.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.146 [info] == Migrated 20190925182253 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.137 [info] create index addresses_geofence_id_index
2020-06-14 23:05:07 | stdout | 23:05:07.133 [info] alter table geofences
2020-06-14 23:05:07 | stdout | 23:05:07.127 [info] alter table addresses
2020-06-14 23:05:07 | stdout | 23:05:07.125 [info] == Running 20190925182253 TeslaMate.Repo.Migrations.AddGeofenceIdToAddresses.up/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.117 [info] == Migrated 20190925161034 in 0.0s
2020-06-14 23:05:07 | stdout | 23:05:07.111 [info] create index addresses_ll_to_earth_latitude__longitude_index
2020-06-14 23:05:07 | stdout | 23:05:07.110 [info] == Running 20190925161034 TeslaMate.Repo.Migrations.CreateIndexOnAddressPositions.change/0 forward
2020-06-14 23:05:07 | stdout | 23:05:07.098 [info] == Migrated 20190925152807 in 0.1s
2020-06-14 23:05:07 | stdout | 23:05:07.090 [info] create index geofences__earth_box_ll_to_earth_latitude__longitude___radius_index
2020-06-14 23:05:07 | stdout | 23:05:07.051 [info] execute "CREATE EXTENSION IF NOT EXISTS earthdistance"
2020-06-14 23:05:06 | stdout | 23:05:06.914 [info] execute "CREATE EXTENSION IF NOT EXISTS cube"
2020-06-14 23:05:06 | stdout | 23:05:06.913 [info] == Running 20190925152807 TeslaMate.Repo.Migrations.CreateGeoExtensions.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.905 [info] == Migrated 20190913175543 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.846 [info] == Running 20190913175543 TeslaMate.Repo.Migrations.SetStartAndEndRatedRangeKm.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.818 [info] == Migrated 20190913175011 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.815 [info] alter table charging_processes
2020-06-14 23:05:06 | stdout | 23:05:06.813 [info] rename column end_range_km to end_ideal_range_km on table charging_processes
2020-06-14 23:05:06 | stdout | 23:05:06.811 [info] rename column start_range_km to start_ideal_range_km on table charging_processes
2020-06-14 23:05:06 | stdout | 23:05:06.809 [info] alter table charges
2020-06-14 23:05:06 | stdout | 23:05:06.806 [info] alter table drives
2020-06-14 23:05:06 | stdout | 23:05:06.804 [info] rename column end_range_km to end_ideal_range_km on table drives
2020-06-14 23:05:06 | stdout | 23:05:06.802 [info] rename column start_range_km to start_ideal_range_km on table drives
2020-06-14 23:05:06 | stdout | 23:05:06.800 [info] rename column battery_range_km to rated_battery_range_km on table positions
2020-06-14 23:05:06 | stdout | 23:05:06.799 [info] == Running 20190913175011 TeslaMate.Repo.Migrations.AddRatedRangeToDrives.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.791 [info] == Migrated 20190913165850 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.788 [info] alter table settings
2020-06-14 23:05:06 | stdout | 23:05:06.786 [info] execute "CREATE TYPE public.range AS ENUM ('ideal', 'rated')"
2020-06-14 23:05:06 | stdout | 23:05:06.785 [info] == Running 20190913165850 TeslaMate.Repo.Migrations.AddRangeEnum.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.776 [info] == Migrated 20190903151524 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.770 [info] create index cars_vin_index
2020-06-14 23:05:06 | stdout | 23:05:06.769 [info] == Running 20190903151524 TeslaMate.Repo.Migrations.AddUniqueIndexOnVins.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.753 [info] == Migrated 20190828150058 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.751 [info] rename column version to trim_badging on table cars
2020-06-14 23:05:06 | stdout | 23:05:06.748 [info] alter table cars
2020-06-14 23:05:06 | stdout | 23:05:06.747 [info] == Running 20190828150058 TeslaMate.Repo.Migrations.DoNotRequireEfficiency.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.739 [info] == Migrated 20190828122529 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.737 [info] execute "CREATE FUNCTION convert_m(n double precision, unit text)\nRETURNS double precision\nAS $$\n  SELECT\n    CASE WHEN $2 = 'm' THEN $1\n         WHEN $2 = 'ft' THEN $1 * 3.28084\n    END;\n$$\nLANGUAGE SQL\nIMMUTABLE\nRETURNS NULL ON NULL INPUT;\n"
2020-06-14 23:05:06 | stdout | 23:05:06.736 [info] == Running 20190828122529 TeslaMate.Repo.Migrations.AddMToFtConversionHelper.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.728 [info] == Migrated 20190828104902 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.726 [info] rename column altitude to elevation on table positions
2020-06-14 23:05:06 | stdout | 23:05:06.725 [info] == Running 20190828104902 TeslaMate.Repo.Migrations.AddElevation.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.716 [info] == Migrated 20190828094708 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.713 [info] alter table positions
2020-06-14 23:05:06 | stdout | 23:05:06.713 [info] == Running 20190828094708 TeslaMate.Repo.Migrations.AddBatteryRange.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.690 [info] == Migrated 20190826142828 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.689 [info] == Running 20190826142828 TeslaMate.Repo.Migrations.FixIncompleteChargingProcessesV3.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.681 [info] == Migrated 20190823173437 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.677 [info] alter table settings
2020-06-14 23:05:06 | stdout | 23:05:06.676 [info] == Running 20190823173437 TeslaMate.Repo.Migrations.AddSleepRequirements.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.651 [info] == Migrated 20190821155748 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.648 [info] alter table drives
2020-06-14 23:05:06 | stdout | 23:05:06.647 [info] == Running 20190821155748 TeslaMate.Repo.Migrations.DropConsumptionColumns.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.640 [info] == Migrated 20190821143938 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.637 [info] create check constraint positive_duration on table updates
2020-06-14 23:05:06 | stdout | 23:05:06.634 [info] create check constraint positive_duration on table states
2020-06-14 23:05:06 | stdout | 23:05:06.629 [info] create index states_car_id__end_date_IS_NULL_index
2020-06-14 23:05:06 | stdout | 23:05:06.628 [info] == Running 20190821143938 TeslaMate.Repo.Migrations.AddConstraints.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.620 [info] == Migrated 20190816200723 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.618 [info] alter table positions
2020-06-14 23:05:06 | stdout | 23:05:06.618 [info] == Running 20190816200723 TeslaMate.Repo.Migrations.AddEstBatteryRangeKm.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.610 [info] == Migrated 20190816165713 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.603 [info] alter table cars
2020-06-14 23:05:06 | stdout | 23:05:06.602 [info] == Running 20190816165713 TeslaMate.Repo.Migrations.ExtendCarTable.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.571 [info] == Migrated 20190814152810 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.565 [info] alter table settings
2020-06-14 23:05:06 | stdout | 23:05:06.564 [info] == Running 20190814152810 TeslaMate.Repo.Migrations.IncreaseSuspendMin.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.556 [info] == Migrated 20190813184320 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.556 [info] == Running 20190813184320 TeslaMate.Repo.Migrations.FixIncompleteChargingProcessesV2.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.548 [info] == Migrated 20190812191616 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.546 [info] execute "ALTER TABLE positions RENAME CONSTRAINT positions_trip_id_fkey TO positions_drive_id_fkey"
2020-06-14 23:05:06 | stdout | 23:05:06.544 [info] execute "ALTER INDEX positions_trip_id_index RENAME TO positions_drive_id_index;"
2020-06-14 23:05:06 | stdout | 23:05:06.542 [info] rename column trip_id to drive_id on table positions
2020-06-14 23:05:06 | stdout | 23:05:06.540 [info] rename table trips to drives
2020-06-14 23:05:06 | stdout | 23:05:06.539 [info] == Running 20190812191616 TeslaMate.Repo.Migrations.RenameTripsToDrives.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.531 [info] == Migrated 20190810151901 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.527 [info] create index geofences_address_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.513 [info] create table geofences
2020-06-14 23:05:06 | stdout | 23:05:06.512 [info] == Running 20190810151901 TeslaMate.Repo.Migrations.CreateGeofences.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.487 [info] == Migrated 20190810131321 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.484 [info] alter table settings
2020-06-14 23:05:06 | stdout | 23:05:06.483 [info] == Running 20190810131321 TeslaMate.Repo.Migrations.PersistSuspendSettings.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.475 [info] == Migrated 20190810105216 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.438 [info] alter table settings
2020-06-14 23:05:06 | stdout | 23:05:06.436 [info] execute "CREATE TYPE public.temperature AS ENUM ('C', 'F')"
2020-06-14 23:05:06 | stdout | 23:05:06.434 [info] execute "CREATE TYPE public.length AS ENUM ('km', 'mi')"
2020-06-14 23:05:06 | stdout | 23:05:06.431 [info] == Running 20190810105216 TeslaMate.Repo.Migrations.UnitOfLegnthAndTemperature.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.423 [info] == Migrated 20190805092941 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.423 [info] == Running 20190805092941 TeslaMate.Repo.Migrations.FixIncompleteChargingProcesses.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.415 [info] == Migrated 20190731154452 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.396 [info] create table settings
2020-06-14 23:05:06 | stdout | 23:05:06.395 [info] == Running 20190731154452 TeslaMate.Repo.Migrations.CreateSettings.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.386 [info] == Migrated 20190730101523 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.357 [info] create table tokens
2020-06-14 23:05:06 | stdout | 23:05:06.356 [info] == Running 20190730101523 TeslaMate.Repo.Migrations.CreateTokens.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.336 [info] == Migrated 20190729181314 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.332 [info] == Running 20190729181314 TeslaMate.Repo.Migrations.FixTripEfficiency.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.317 [info] == Migrated 20190729142656 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.315 [info] execute "CREATE FUNCTION convert_km(n double precision, unit text)\nRETURNS double precision\nAS $$\n  SELECT\n    CASE WHEN $2 = 'km' THEN $1\n         WHEN $2 = 'mi' THEN $1 / 1.60934\n    END;\n$$\nLANGUAGE SQL\nIMMUTABLE\nRETURNS NULL ON NULL INPUT;\n"
2020-06-14 23:05:06 | stdout | 23:05:06.309 [info] execute "CREATE FUNCTION convert_celsius(n double precision, unit text)\nRETURNS double precision\nAS $$\n  SELECT\n    CASE WHEN $2 = 'C' THEN $1\n         WHEN $2 = 'F' THEN ($1 * 9 / 5) + 32\n    END;\n$$\nLANGUAGE SQL\nIMMUTABLE\nRETURNS NULL ON NULL INPUT;\n"
2020-06-14 23:05:06 | stdout | 23:05:06.308 [info] == Running 20190729142656 TeslaMate.Repo.Migrations.AddConversionFunctions.up/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.296 [info] == Migrated 20190717184003 in 0.1s
2020-06-14 23:05:06 | stdout | 23:05:06.283 [info] create index updates_car_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.271 [info] create index trips_end_address_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.265 [info] create index trips_start_address_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.261 [info] create index trips_car_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.189 [info] create index states_car_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.177 [info] create index positions_trip_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.173 [info] create index positions_car_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.164 [info] create index charging_processes_address_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.153 [info] create index charging_processes_position_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.148 [info] create index charging_processes_car_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.144 [info] create index charges_charging_process_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.141 [info] == Running 20190717184003 TeslaMate.Repo.Migrations.AddFkeyIndexes.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.134 [info] == Migrated 20190525125700 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.132 [info] rename column end_soc to end_range_km on table charging_processes
2020-06-14 23:05:06 | stdout | 23:05:06.130 [info] rename column start_soc to start_range_km on table charging_processes
2020-06-14 23:05:06 | stdout | 23:05:06.129 [info] == Running 20190525125700 TeslaMate.Repo.Migrations.RenameSocFields.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.121 [info] == Migrated 20190416125429 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.117 [info] create index charges_date_index
2020-06-14 23:05:06 | stdout | 23:05:06.111 [info] create index positions_date_index
2020-06-14 23:05:06 | stdout | 23:05:06.111 [info] == Running 20190416125429 TeslaMate.Repo.Migrations.AddIndexesOnDates.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.103 [info] == Migrated 20190415192200 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.098 [info] alter table charging_processes
2020-06-14 23:05:06 | stdout | 23:05:06.098 [info] == Running 20190415192200 TeslaMate.Repo.Migrations.AddAddressToChargingProcess.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.090 [info] == Migrated 20190415130705 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.081 [info] alter table trips
2020-06-14 23:05:06 | stdout | 23:05:06.081 [info] == Running 20190415130705 TeslaMate.Repo.Migrations.AddAddressesToTrips.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.072 [info] == Migrated 20190415130006 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.067 [info] create index addresses_place_id_index
2020-06-14 23:05:06 | stdout | 23:05:06.049 [info] create table addresses
2020-06-14 23:05:06 | stdout | 23:05:06.047 [info] == Running 20190415130006 TeslaMate.Repo.Migrations.CreateAddresses.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.039 [info] == Migrated 20190415115227 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.036 [info] alter table charges
2020-06-14 23:05:06 | stdout | 23:05:06.033 [info] alter table positions
2020-06-14 23:05:06 | stdout | 23:05:06.032 [info] == Running 20190415115227 TeslaMate.Repo.Migrations.AddBatteryHeaterFields.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.022 [info] == Migrated 20190415103933 in 0.0s
2020-06-14 23:05:06 | stdout | 23:05:06.019 [info] alter table trips
2020-06-14 23:05:06 | stdout | 23:05:06.015 [info] alter table positions
2020-06-14 23:05:06 | stdout | 23:05:06.014 [info] == Running 20190415103933 TeslaMate.Repo.Migrations.AddInsideTemp.change/0 forward
2020-06-14 23:05:06 | stdout | 23:05:06.003 [info] == Migrated 20190408203117 in 0.0s
2020-06-14 23:05:05 | stdout | 23:05:05.987 [info] create table updates
2020-06-14 23:05:05 | stdout | 23:05:05.986 [info] == Running 20190408203117 TeslaMate.Repo.Migrations.CreateUpdates.change/0 forward
2020-06-14 23:05:05 | stdout | 23:05:05.975 [info] == Migrated 20190330200000 in 0.0s
2020-06-14 23:05:05 | stdout | 23:05:05.953 [info] create table charges
2020-06-14 23:05:05 | stdout | 23:05:05.952 [info] == Running 20190330200000 TeslaMate.Repo.Migrations.CreateCharges.change/0 forward
2020-06-14 23:05:05 | stdout | 23:05:05.944 [info] == Migrated 20190330190000 in 0.0s
2020-06-14 23:05:05 | stdout | 23:05:05.930 [info] create table charging_processes
2020-06-14 23:05:05 | stdout | 23:05:05.929 [info] == Running 20190330190000 TeslaMate.Repo.Migrations.CreateChargingProcesses.change/0 forward
2020-06-14 23:05:05 | stdout | 23:05:05.921 [info] == Migrated 20190330180000 in 0.0s
2020-06-14 23:05:05 | stdout | 23:05:05.910 [info] create table states
2020-06-14 23:05:05 | stdout | 23:05:05.906 [info] execute "CREATE TYPE public.states_status AS ENUM ('online', 'offline', 'asleep')"
2020-06-14 23:05:05 | stdout | 23:05:05.901 [info] == Running 20190330180000 TeslaMate.Repo.Migrations.CreateStates.up/0 forward
2020-06-14 23:05:05 | stdout | 23:05:05.890 [info] == Migrated 20190330170000 in 0.0s
2020-06-14 23:05:05 | stdout | 23:05:05.874 [info] create table positions
2020-06-14 23:05:05 | stdout | 23:05:05.873 [info] == Running 20190330170000 TeslaMate.Repo.Migrations.CreatePositions.change/0 forward
2020-06-14 23:05:05 | stdout | 23:05:05.864 [info] == Migrated 20190330160000 in 0.0s
2020-06-14 23:05:05 | stdout | 23:05:05.844 [info] create table trips
2020-06-14 23:05:05 | stdout | 23:05:05.843 [info] == Running 20190330160000 TeslaMate.Repo.Migrations.CreateTrips.change/0 forward
2020-06-14 23:05:05 | stdout | 23:05:05.723 [info] == Migrated 20190330150000 in 0.0s
2020-06-14 23:05:05 | stdout | 23:05:05.707 [info] create index cars_vid_index
2020-06-14 23:05:05 | stdout | 23:05:05.702 [info] create index cars_eid_index
2020-06-14 23:05:05 | stdout | 23:05:05.646 [info] create table cars
2020-06-14 23:05:05 | stdout | 23:05:05.638 [info] == Running 20190330150000 TeslaMate.Repo.Migrations.CreateCar.change/0 forward
2020-06-14 23:04:40 | stdout | waiting for postgres at database:5432 (4sec)
2020-06-14 23:02:31 | stdout | waiting for postgres at database:5432 (2sec)

I looks like it did manage to connect to the database and run some queries (or am I misreading this ?)
Anyway, still the same results after that, with or without firewall.

@dyxyl
Copy link
Contributor

dyxyl commented Jun 18, 2020

Yes, it apparently did manage to run the initial migrations, but initialization of teslamate itself failed. You could try setting DATABASE_POOL_SIZE: 20 in environment section of the teslamate containing in docker-compose.yml (where MQTT_HOST is set) but I don't know if that will help.

@Benn
Copy link
Author

Benn commented Jun 25, 2020

Hi Dyxyl,
Thanks again for your time.
I tried adding DATABASE_POOL_SIZE=20, but still not luck.
Cheers

@dyxyl
Copy link
Contributor

dyxyl commented Jul 8, 2020

Sorry, I'm running out of ideas. The only thing I can think of is to check the output of iptables -L -v again after it fails, but it seems unlikely to be a firewall problem when the initial migrations have worked.

@Benn
Copy link
Author

Benn commented Jul 31, 2020

I'll just have to keep a raspberry pi running until I replace my Synology I guess... :)
Thanks again !

@stale
Copy link

stale bot commented Sep 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Sep 29, 2020
@stale stale bot closed this as completed Oct 6, 2020
@edouardGT
Copy link

edouardGT commented Sep 12, 2021

Not sure if this will be helpful for anyone but I had some issues installing Teslamate on the Synology NAS. It finally worked after:

  • Set the VIRTUAL_HOST variable in the Teslamate container
  • Renamed the DATABASE_HOST from database to db (not sure if this was necessary)
  • Moved the docker-compose.yml file to the hidden @docker folder instead of the visible docker folder and run docker-compose up from this location
  • Changed the firewall settings in DSM 7.0
    Got it to run on the latest Docker version 20.10.3-1233 on a Synology NAS ds1019 and DSM 7.0.1-42214

I did use the API access token and refresh token to login - Did not work with my Tesla credentials due to recent changes in the authentication services from Tesla.

@wow400
Copy link

wow400 commented Oct 21, 2021

Not sure if this will be helpful for anyone but I had some issues installing Teslamate on the Synology NAS. It finally worked after:

* Set the VIRTUAL_HOST variable in the Teslamate container

* Renamed the DATABASE_HOST from database to db (not sure if this was necessary)

* Moved the docker-compose.yml file to the hidden @docker folder instead of the visible docker folder and run docker-compose up from this location

* Changed the firewall settings in DSM 7.0
  Got it to run on the latest Docker version 20.10.3-1233 on a Synology NAS ds1019 and DSM 7.0.1-42214

I did use the API access token and refresh token to login - Did not work with my Tesla credentials due to recent changes in the authentication services from Tesla.

Hi, I'm new to this party & am struggling to get it working with my Synology DS 216+.
I've copied bahree's compose file (updated for NAS IP), I've updated docker to latest version (20.10.3-1239) and I can't downgrade. I've turned off the NAS firewall but it makes no difference.
I'm a complete noob when it comes to Linux so am having to feel my way.

Any chance you can be explicit on how you moved the yml file to the hidden docker folder as that is the only thing I cannot replicate!

Many thanks,

@wow400
Copy link

wow400 commented Nov 6, 2021

Anyone?

@uncle03
Copy link

uncle03 commented Jan 16, 2022

Same here

@Airosus
Copy link

Airosus commented Apr 3, 2022

Same issue here, but trying to set up on a TS-230 QNAP

@edouardGT
Copy link

edouardGT commented Apr 3, 2022

The only issue I had whas, if I remember correctly, process id already used thingy. I then moved the docker compose file to the hidden @docker file, then after "docker compose -up" I was able to login and use the application. If anybody needs me to check something on my current setup, I will be happy to help. Running on a Synology NAS since august 2021 and logged 13k km so far without any issues.

@Airosus
Copy link

Airosus commented Apr 3, 2022

The only issue I had whas, if I remember correctly, process id already used thingy. I then moved the docker compose file to the hidden @docker file, then after "docker compose -up" I was able to login and use the application. If anybody needs me to check something on my current setup, I will be happy to help. Running on a Synology NAS since august 2021 and logged 13k km so far without any issues.

Can you describe to a novice how to "move the docker compose file to the hidden @docker file"? Where do you execute the docker compose -up command within the Synology user interface (or in my case, the QNAP user interface within the ContainerStation app)?

@edouardGT
Copy link

As a novice myself, just ls -a to find all folders and then move the yml file to the hidden folder. Learn how to move files here: https://opensource.com/article/19/8/moving-files-linux-depth

@GitHub-erNik
Copy link

I have the same issue. It appeared after rebooting my Synology NAS. No idea how to solve it unless i set up the whole TeslaMate again.

@GitHub-erNik
Copy link

Seems the firewall on the Synology NAS is causing the issues. I'm investigating the details.

I disabled it and everything was working fine again. Then I enabled it - without doing any changes on my firewall-settings - and it keeps being functional. So weird.

@sjayanna01
Copy link

sjayanna01 commented Jul 17, 2023

The only issue I had whas, if I remember correctly, process id already used thingy. I then moved the docker compose file to the hidden @docker file, then after "docker compose -up" I was able to login and use the application. If anybody needs me to check something on my current setup, I will be happy to help. Running on a Synology NAS since august 2021 and logged 13k km so far without any issues.

@edouardGT I am facing same issue and posted here, do you mind helping with it? TIA!

#3285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants