teslamate-org / teslamate

A self-hosted data logger for your Tesla 🚘
https://docs.teslamate.org
MIT License
5.85k stars 731 forks source link

Cannot start teslamate after 1.27 update #2871

Closed detritu5 closed 1 year ago

detritu5 commented 2 years ago

Is there an existing issue for this?

What happened?

Have and issue since last update. Teslamate cannot start properly Check Log

Postgres DB is already migrated to version 14 and ENCRYPTION_KEY variable is already written. But something wrong with the startup teslamate_error.txt

Expected Behavior

No response

Steps To Reproduce

No response

Relevant log output

teslamate_1  | 2022-08-30 06:38:59.316 [info] Migrations already up
teslamate_1  | 2022-08-30 06:39:02.394 [info] System Info: Erlang/OTP 24 (jit)
teslamate_1  | 2022-08-30 06:39:02.394 [info] Version: 1.27.1
teslamate_1  | 2022-08-30 06:39:02.587 [warning] Could not decrypt API tokens!
teslamate_1  | 2022-08-30 06:39:02.594 [info] Running TeslaMateWeb.Endpoint with cowboy 2.9.0 at :::4000 (http)
teslamate_1  | 2022-08-30 06:39:02.598 [info] Access TeslaMateWeb.Endpoint at http://localhost
teslamate_1  | 2022-08-30 06:39:02.612 [warning] Using fallback vehicles:
teslamate_1  |
teslamate_1  | [
teslamate_1  |   %TeslaApi.Vehicle{
teslamate_1  |     api_version: nil,
teslamate_1  |     backseat_token: nil,
teslamate_1  |     backseat_token_updated_at: nil,
teslamate_1  |     calendar_enabled: nil,
teslamate_1  |     charge_state: nil,
teslamate_1  |     climate_state: nil,
teslamate_1  |     color: nil,
teslamate_1  |     display_name: "FuriusWattio",
teslamate_1  |     drive_state: nil,
teslamate_1  |     gui_settings: nil,
teslamate_1  |     id: 1492931874411647,
teslamate_1  |     in_service: false,
teslamate_1  |     option_codes: [],
teslamate_1  |     state: "unknown",
teslamate_1  |     tokens: [],
teslamate_1  |     vehicle_config: nil,
teslamate_1  |     vehicle_id: 781995902,
teslamate_1  |     vehicle_state: nil,
teslamate_1  |     vin: "5YJ3E7EC4LF580630"
teslamate_1  |   }
teslamate_1  | ]
teslamate_1  | 2022-08-30 06:39:02.612 [info] Starting logger for 'FuriusWattio'
teslamate_1  | 2022-08-30 06:39:02.635 car_id=1 [error] Error / not_signed_in
teslamate_1  | 2022-08-30 06:39:02.645 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3235393"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.664 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3235393"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.671 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3235393"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.681 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3235393"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.686 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3638383"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.706 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3638383"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.712 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3638383"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.717 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3638383"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.739 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3035393"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.744 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3035393"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.764 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3035393"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.784 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3035393"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.791 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3634363"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.806 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3634363"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.844 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3634363"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.869 [error] GenServer {Tortoise.Registry, {Tortoise.Connection, "TESLAMATE_302E3634363"}} terminating
teslamate_1  | ** (stop) {:connection_failed, :not_authorized}
teslamate_1  | Last message: :connect
teslamate_1  | 2022-08-30 06:39:02.872 [info] Postgrex.Protocol (#PID<0.2367.0>) disconnected: ** (DBConnection.ConnectionError) client #PID<0.2507.0> exited
teslamate_1  | 2022-08-30 06:39:02.874 [notice] Application teslamate exited: shutdown
teslamate_1  | Kernel pid terminated (application_controller) ({application_terminated,teslamate,shutdown})
teslamate_1  | {"Kernel pid terminated",application_controller,"{application_terminated,teslamate,shutdown}"}
teslamate_1  |
teslamate_1  | Crash dump is being written to: erl_crash.dump...done
teslamate_1  | 2022-08-30 06:39:10.623 [info] Migrations already up
teslamate_1  | 2022-08-30 06:39:16.403 [info] System Info: Erlang/OTP 24 (jit)
teslamate_1  | 2022-08-30 06:39:16.403 [info] Version: 1.27.1
teslamate_1  | 2022-08-30 06:39:16.473 [error] Postgrex.Protocol (#PID<0.2376.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:16.473 [error] Postgrex.Protocol (#PID<0.2375.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:16.473 [error] Postgrex.Protocol (#PID<0.2374.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:16.473 [error] Postgrex.Protocol (#PID<0.2373.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:16.473 [error] Postgrex.Protocol (#PID<0.2371.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:16.473 [error] Postgrex.Protocol (#PID<0.2370.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:16.473 [error] Postgrex.Protocol (#PID<0.2372.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:16.473 [error] Postgrex.Protocol (#PID<0.2367.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:16.474 [error] Postgrex.Protocol (#PID<0.2377.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:16.474 [error] Postgrex.Protocol (#PID<0.2366.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:17.562 [error] Postgrex.Protocol (#PID<0.2371.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:17.570 [error] Postgrex.Protocol (#PID<0.2377.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:18.006 [error] Postgrex.Protocol (#PID<0.2367.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:18.012 [error] Postgrex.Protocol (#PID<0.2366.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:18.271 [error] Postgrex.Protocol (#PID<0.2376.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:18.525 [error] Postgrex.Protocol (#PID<0.2372.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:18.941 [error] Postgrex.Protocol (#PID<0.2373.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:18.964 [error] Postgrex.Protocol (#PID<0.2370.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:18.986 [error] Postgrex.Protocol (#PID<0.2374.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:19.074 [error] Postgrex.Protocol (#PID<0.2375.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (database:5432): non-existing domain - :nxdomain
teslamate_1  | 2022-08-30 06:39:19.405 [notice] Application teslamate exited: TeslaMate.Application.start(:normal, []) returned an error: shutdown: failed to start child: TeslaMate.Api
teslamate_1  |     ** (EXIT) an exception was raised:
teslamate_1  |         ** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2998ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:
teslamate_1  |
teslamate_1  |   1. Ensuring your database is available and that you can connect to it
teslamate_1  |   2. Tracking down slow queries and making sure they are running fast enough
teslamate_1  |   3. Increasing the pool_size (although this increases resource consumption)
teslamate_1  |   4. Allowing requests to wait longer by increasing :queue_target and :queue_interval
teslamate_1  |
teslamate_1  | See DBConnection.start_link/2 for more information
teslamate_1  |
teslamate_1  |             (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
teslamate_1  |             (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:847: Ecto.Adapters.SQL.execute/6
teslamate_1  |             (ecto 3.8.4) lib/ecto/repo/queryable.ex:221: Ecto.Repo.Queryable.execute/4
teslamate_1  |             (ecto 3.8.4) lib/ecto/repo/queryable.ex:19: Ecto.Repo.Queryable.all/3
teslamate_1  |             (teslamate 1.27.1) lib/teslamate/auth.ex:30: TeslaMate.Auth.get_tokens/0
teslamate_1  |             (teslamate 1.27.1) lib/teslamate/api.ex:111: TeslaMate.Api.init/1
teslamate_1  |             (stdlib 3.17.2) gen_server.erl:423: :gen_server.init_it/2
teslamate_1  |             (stdlib 3.17.2) gen_server.erl:390: :gen_server.init_it/6
teslamate_1  | {"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 2998ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\n\n  1. Ensuring your database is available and that you can connect to it\n  2. Tracking down slow queries and making sure they are running fast enough\n  3. Increasing the pool_size (although this increases resource consumption)\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\n\nSee DBConnection.start_link/2 for more information\n\">>,reason => queue_timeout,severity => error},[{'Elixir.Ecto.Adapters.SQL',raise_sql_call_error,1,[{file,\"lib/ecto/adapters/sql.ex\"},{line,932},{error_info,#{module => 'Elixir.Exception'}}]},{'Elixir.Ecto.Adapters.SQL',execute,6,[{file,\"lib/ecto/adapters/sql.ex\"},{line,847}]},{'Elixir.Ecto.Repo.Queryable',execute,4,[{file,\"lib/ecto/repo/queryable.ex\"},{line,221}]},{'Elixir.Ecto.Repo.Queryable',all,3,[{file,\"lib/ecto/repo/queryable.ex\"},{line,19}]},{'Elixir.TeslaMate.Auth',get_tokens,0,[{file,\"lib/teslamate/auth.ex\"},{line,30}]},{'Elixir.TeslaMate.Api',init,1,[{file,\"lib/teslamate/api.ex\"},{line,111}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,423}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,390}]}]}}},{'Elixir.TeslaMate.Application',start,[normal,[]]}}}"}
teslamate_1  | 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 2998ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\n\n  1. Ensuring your database is available and that you can connect to it\n  2. Tracking down slow queries and making sure they are running fast enough\n  3. Increasing the pool_size (although this increases resource consumption)\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\n\nSee DBConnection.start_link/2 for more information\n">>,reason => queue_timeout,severity => error},[{'Elixir.Ecto.Adapters.SQL',raise_sql_call_error,1,[{file,"lib/ecto/adapters/sql.ex"},{line,932},{error_info,#{module => 'Elixir.Exception'}}]},{'Elixir.Ecto.Adapters.SQL',exec
teslamate_1  |
teslamate_1  | Crash dump is being written to: erl_crash.dump...done

Screenshots

No response

Additional data

No response

Type of installation

Docker

Version

1.27.1

patdemko commented 2 years ago

I was forced to do a reboot on the machine running docker and now I'm seeing a similar error as well and it's stuck in a restart loop. Did you ever figure out the cause of your issue and a way to fix it?