Freika / dawarich

Self-hosted alternative to Google Location History (Google Maps Timeline)
https://dawarich.app
GNU Affero General Public License v3.0
2.18k stars 50 forks source link

Issue after running docker-compse on install #354

Open millie75 opened 2 weeks ago

millie75 commented 2 weeks ago

Describe the bug Failure for container dawarich_app to start ends with 'dependency failed to start: container dawarich_app is unhealthy'

Version Latest - first time install today

To Reproduce Copied docker-compose.yml from github page and created own file and ran docker compose up

Expected behavior Successful installation

Screenshots If applicable, add screenshots to help explain your problem.

Logs [+] Running 3/0 ✔ Container dawarich_db Running 0.0s ✔ Container dawarich-dawarich_redis-1 Running 0.0s ✔ Container dawarich_app Running 0.0s Attaching to dawarich_redis-1, dawarich_app, dawarich_db, dawarich_sidekiq dawarich_app | [dotenv] Set DATABASE_PORT dawarich_app | [dotenv] Loaded .env.development dawarich_app | D, [2024-10-24T16:30:52.410561 #53] DEBUG -- : (0.2ms) SELECT pg_try_advisory_lock(1212213197400985920) dawarich_app | D, [2024-10-24T16:30:52.413036 #53] DEBUG -- : DataMigrate::DataSchemaMigration Load (1.7ms) SELECT "data_migrations"."version" FROM "data_migrations" ORDER BY "data_migrations"."version" ASC dawarich_app | D, [2024-10-24T16:30:52.416944 #53] DEBUG -- : ActiveRecord::InternalMetadata Load (1.6ms) SELECT FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 [[nil, "environment"]] dawarich_app | I, [2024-10-24T16:30:52.417630 #53] INFO -- : Migrating to RemovePointsWithoutCoordinates (20240610170930) dawarich_app | == 20240610170930 RemovePointsWithoutCoordinates: migrating =================== dawarich_app | D, [2024-10-24T16:30:52.435632 #53] DEBUG -- : TRANSACTION (0.2ms) BEGIN dawarich_app | D, [2024-10-24T16:30:52.448115 #53] DEBUG -- : Point Count (2.7ms) SELECT COUNT() FROM "points" WHERE (longitude = 0.0 OR latitude = 0.0) dawarich_app | I, [2024-10-24T16:30:52.448977 #53] INFO -- : Found 0 points without coordinates... dawarich_app | D, [2024-10-24T16:30:52.449665 #53] DEBUG -- : Point Load (0.4ms) SELECT "points".* FROM "points" WHERE (longitude = 0.0 OR latitude = 0.0) dawarich_app | I, [2024-10-24T16:30:52.450657 #53] INFO -- : Points without coordinates removed. dawarich_app | D, [2024-10-24T16:30:52.451098 #53] DEBUG -- : TRANSACTION (0.3ms) ROLLBACK dawarich_app | D, [2024-10-24T16:30:52.452119 #53] DEBUG -- : (0.2ms) SELECT pg_advisory_unlock(1212213197400985920) dawarich_app | rake aborted! dawarich_app | StandardError: An error has occurred, this and all later migrations canceled: (StandardError) dawarich_app | dawarich_app | uninitialized constant RemovePointsWithoutCoordinates::StatCreatingJob dawarich_app | /var/app/db/data/20240610170930_remove_points_without_coordinates.rb:15:in up' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:997:inpublic_send' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:997:in exec_migration' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:978:inblock (2 levels) in migrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:977:in block in migrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:389:inwith_connection' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:976:in migrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1190:inmigrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1538:in block in execute_migration_in_transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/connection_adapters/abstract/transaction.rb:616:inblock in within_new_transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1.1/lib/active_support/concurrency/null_lock.rb:9:in synchronize' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/connection_adapters/abstract/transaction.rb:613:inwithin_new_transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:361:in transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1589:inddl_transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1537:in execute_migration_in_transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1512:ineach' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1512:in migrate_without_lock' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1457:inblock in migrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1609:in with_advisory_lock' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1457:inmigrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/migration_context.rb:15:in up' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1239:inmigrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/tasks/data_migrate_tasks.rb:26:in migrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/tasks/databases.rake:161:inblock (2 levels) in

' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in <top (required)>' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:58:inload' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:58:in kernel_load' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:23:inrun' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli.rb:451:in exec' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/command.rb:28:inrun' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor.rb:527:indispatch' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli.rb:34:in dispatch' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/base.rb:584:instart' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli.rb:28:in start' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/exe/bundle:28:inblock in <top (required)>' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/friendly_errors.rb:117:in with_friendly_errors' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/exe/bundle:20:in<top (required)>' dawarich_app | /usr/local/bundle/bin/bundle:25:in load' dawarich_app | /usr/local/bundle/bin/bundle:25:in
' dawarich_app | dawarich_app | Caused by: dawarich_app | NameError: uninitialized constant RemovePointsWithoutCoordinates::StatCreatingJob (NameError) dawarich_app | dawarich_app | StatCreatingJob.perform_later(User.pluck(:id)) dawarich_app | ^^^^^^^^^^^^^^^ dawarich_app | /var/app/db/data/20240610170930_remove_points_without_coordinates.rb:15:in up' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:997:inpublic_send' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:997:in exec_migration' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:978:inblock (2 levels) in migrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:977:in block in migrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:389:inwith_connection' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:976:in migrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1190:inmigrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1538:in block in execute_migration_in_transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/connection_adapters/abstract/transaction.rb:616:inblock in within_new_transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.1.1/lib/active_support/concurrency/null_lock.rb:9:in synchronize' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/connection_adapters/abstract/transaction.rb:613:inwithin_new_transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:361:in transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1589:inddl_transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1537:in execute_migration_in_transaction' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1512:ineach' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1512:in migrate_without_lock' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1457:inblock in migrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1609:in with_advisory_lock' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1457:inmigrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/migration_context.rb:15:in up' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.1.1/lib/active_record/migration.rb:1239:inmigrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/lib/data_migrate/tasks/data_migrate_tasks.rb:26:in migrate' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/data_migrate-11.1.0/tasks/databases.rake:161:inblock (2 levels) in
' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in <top (required)>' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:58:inload' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:58:in kernel_load' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:23:inrun' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli.rb:451:in exec' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/command.rb:28:inrun' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor.rb:527:indispatch' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli.rb:34:in dispatch' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/base.rb:584:instart' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/cli.rb:28:in start' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/exe/bundle:28:inblock in <top (required)>' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/lib/bundler/friendly_errors.rb:117:in with_friendly_errors' dawarich_app | /var/app/vendor/bundle/ruby/3.3.0/gems/bundler-2.5.9/exe/bundle:20:in<top (required)>' dawarich_app | /usr/local/bundle/bin/bundle:25:in load' dawarich_app | /usr/local/bundle/bin/bundle:25:in
' dawarich_app | Tasks: TOP => data:migrate dawarich_app | (See full trace by running task with --trace) dependency failed to start: container dawarich_app is unhealthy

No changes were made to the copied docker-compose file - installed on vanilla machine

SimonPrinz commented 2 weeks ago

Got the same error. Apparently 0.15.9 had a name change for a class, but was not changed in the migration (see https://github.com/Freika/dawarich/compare/0.15.8...0.15.9#diff-277ac4e0d411a6243b6c399b41fb7b8b99894b086617d8ec82502a79f5380131R16 ).
I got it running by using 0.15.8 instead of latest. I would create a PR, but sadly I am not familiar with Ruby.

millie75 commented 2 weeks ago

Thanks that worked using 0.15.8

Freika commented 2 weeks ago

Nice catch, will fix it soon

Freika commented 2 weeks ago

Fixed in https://github.com/Freika/dawarich/releases/tag/0.15.10