jbonet / tvhstats

An elixir based web application for monitoring and analytics for tvheadend.
GNU General Public License v3.0
10 stars 0 forks source link

Startup error #1

Closed Saentist closed 1 year ago

Saentist commented 1 year ago
Starting tvhstats_db_1 ... done
Starting tvhstats_tvhstats_1 ... done
Attaching to tvhstats_db_1, tvhstats_tvhstats_1
db_1        |
db_1        | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1        |
db_1        | 2022-10-19 18:21:41.072 UTC [1] LOG:  starting PostgreSQL 15.0 (Debian 15.0-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
db_1        | 2022-10-19 18:21:41.075 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1        | 2022-10-19 18:21:41.075 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1        | 2022-10-19 18:21:41.078 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1        | 2022-10-19 18:21:41.084 UTC [26] LOG:  database system was shut down at 2022-10-19 18:21:21 UTC
db_1        | 2022-10-19 18:21:41.091 UTC [1] LOG:  database system is ready to accept connections
tvhstats_1  | Resolving Hex dependencies...
tvhstats_1  | Dependency resolution completed:
tvhstats_1  | Unchanged:
tvhstats_1  |   castore 0.1.18
tvhstats_1  |   certifi 2.9.0
tvhstats_1  |   connection 1.1.0
tvhstats_1  |   cowboy 2.9.0
tvhstats_1  |   cowboy_telemetry 0.4.0
tvhstats_1  |   cowlib 2.11.0
tvhstats_1  |   dart_sass 0.5.1
tvhstats_1  |   db_connection 2.4.2
tvhstats_1  |   decimal 2.0.0
tvhstats_1  |   ecto 3.9.0
tvhstats_1  |   ecto_sql 3.9.0
tvhstats_1  |   esbuild 0.5.0
tvhstats_1  |   file_system 0.2.10
tvhstats_1  |   finch 0.13.0
tvhstats_1  |   floki 0.33.1
tvhstats_1  |   gen_stage 1.1.2
tvhstats_1  |   gettext 0.20.0
tvhstats_1  |   hackney 1.18.1
tvhstats_1  |   hpax 0.1.2
tvhstats_1  |   html_entities 0.5.2
tvhstats_1  |   idna 6.1.1
tvhstats_1  |   jason 1.4.0
tvhstats_1  |   metrics 1.0.1
tvhstats_1  |   mime 2.0.3
tvhstats_1  |   mimerl 1.2.0
tvhstats_1  |   mint 1.4.2
tvhstats_1  |   nimble_options 0.4.0
tvhstats_1  |   nimble_pool 0.2.6
tvhstats_1  |   parse_trans 3.3.1
tvhstats_1  |   phoenix 1.6.13
tvhstats_1  |   phoenix_ecto 4.4.0
tvhstats_1  |   phoenix_html 3.2.0
tvhstats_1  |   phoenix_live_dashboard 0.6.5
tvhstats_1  |   phoenix_live_reload 1.3.3
tvhstats_1  |   phoenix_live_view 0.17.12
tvhstats_1  |   phoenix_pubsub 2.1.1
tvhstats_1  |   phoenix_view 1.1.2
tvhstats_1  |   plug 1.13.6
tvhstats_1  |   plug_cowboy 2.5.2
tvhstats_1  |   plug_crypto 1.2.3
tvhstats_1  |   postgrex 0.16.5
tvhstats_1  |   ranch 1.8.0
tvhstats_1  |   sizeable 1.0.2
tvhstats_1  |   ssl_verify_fun 1.1.6
tvhstats_1  |   swoosh 1.8.0
tvhstats_1  |   tailwind 0.1.9
tvhstats_1  |   tarams 1.7.0
tvhstats_1  |   telemetry 1.1.0
tvhstats_1  |   telemetry_metrics 0.6.1
tvhstats_1  |   telemetry_poller 1.0.0
tvhstats_1  |   tzdata 1.1.1
tvhstats_1  |   unicode_util_compat 0.7.0
tvhstats_1  |   uri_query 0.1.2
tvhstats_1  |   valdi 0.3.0
tvhstats_1  | All dependencies are up to date
tvhstats_1  | Compiling 4 files (.ex)
tvhstats_1  |
tvhstats_1  | 18:21:48.117 [info] Migrations already up
tvhstats_1  | [info] [Janitor] Cleaning up records task started.
tvhstats_1  | [info] [CacheWarmer] Task Retrieve icons started.
tvhstats_1  | [info] [CacheWarmer] Saving icons to: /app/priv/static/assets/icons
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [info] [CacheWarmer] Finished warming up icons.
tvhstats_1  | [debug] QUERY OK source="subscriptions" db=0.6ms decode=8.2ms queue=32.1ms idle=0.0ms
tvhstats_1  | SELECT s0."hash", s0."user", s0."channel", s0."ip", s0."client", s0."stream_type", s0."started_at", s0."stopped_at", s0."inserted_at", s0."updated_at" FROM "subscriptions" AS s0 WHERE (s0."stopped_at" IS NULL) []
tvhstats_1  | ↳ TVHStats.Worker.Janitor.cleanup_records/0, at: lib/tvhstats/worker/janitor.ex:18
tvhstats_1  | [info] Running TVHStatsWeb.Endpoint with cowboy 2.9.0 at 0.0.0.0:4000 (http)
tvhstats_1  | [info] Access TVHStatsWeb.Endpoint at http://localhost:4000
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [info] API polling worker started. Poll interval: 1000
tvhstats_1  | Sass is watching for changes. Press Ctrl-C to stop.
tvhstats_1  |
tvhstats_1  | [watch] build finished, watching for changes...
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  |
tvhstats_1  | Rebuilding...
tvhstats_1  | Done in 815ms.
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
tvhstats_1  | [error] There was an error sending the request: econnrefused
^CGracefully stopping... (press Ctrl+C again to force)
Stopping tvhstats_tvhstats_1 ... done
Stopping tvhstats_db_1       ... done

Any idea what ca be problem?

jbonet commented 1 year ago

This looks like it can't connect to the tvheadend server, as in no connectivity to it

Saentist commented 1 year ago

Confirm pc with stat was not in white list.

Is it possible to have more clear error messages in log?

jbonet commented 1 year ago

I can improve the log message and try to make it not crash. But when it crashes the stack trace is big no matter what.