Closed nitobuendia closed 2 weeks ago
Having same issue when trying to run it in K8S. More debug info would be really nice! Is there a switch to increase verbosity?
My setup:
My config so far:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dawarich
namespace: dawarich
labels:
app: dawarich
spec:
selector:
matchLabels:
app: dawarich
template:
metadata:
labels:
app: dawarich
spec:
containers:
- name: dawarich
env:
- name: TIME_ZONE
value: "Europe/Prague"
- name: RAILS_ENV
value: development
- name: REDIS_URL
value: redis://:<secret>@redis-master.redis.svc.cluster.local:6379/10
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-password
key: redis-password
- name: DATABASE_HOST
value: postgres-postgresql.db.svc.cluster.local
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_USERNAME
value: postgres
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-password
key: password
- name: DATABASE_NAME
value: dawarich_development
- name: MIN_MINUTES_SPENT_IN_CITY
value: "60"
- name: APPLICATION_HOST
value: localhost
- name: APPLICATION_HOSTS
value: localhost
- name: APPLICATION_PROTOCOL
value: http
- name: DISTANCE_UNIT
value: km
- name: PHOTON_API_HOST
value: photon.komoot.io
- name: PHOTON_API_USE_HTTPS
value: "true"
image: freikin/dawarich:latest
imagePullPolicy: Always
volumeMounts:
- mountPath: /usr/local/bundle/gems_app
name: gem-cache
- mountPath: /var/app/public
name: public
- mountPath: /var/app/tmp/imports/watched
name: watched
command:
- "dev-entrypoint.sh"
args:
- "bin/dev"
resources:
limits:
memory: "3Gi"
cpu: "1500m"
ports:
- containerPort: 3000
- name: dawarich-sidekiq
env:
- name: RAILS_ENV
value: development
- name: REDIS_URL
value: redis://:<secret>@redis-master.redis.svc.cluster.local:6379/10
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-password
key: redis-password
- name: DATABASE_HOST
value: postgres-postgresql.db.svc.cluster.local
- name: DATABASE_PORT
value: "5432"
- name: DATABASE_USERNAME
value: postgres
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-password
key: password
- name: DATABASE_NAME
value: dawarich_development
- name: BACKGROUND_PROCESSING_CONCURRENCY
value: "10"
- name: APPLICATION_HOST
value: localhost
- name: APPLICATION_HOSTS
value: localhost
- name: APPLICATION_PROTOCOL
value: http
- name: DISTANCE_UNIT
value: km
- name: PHOTON_API_HOST
value: photon.komoot.io
- name: PHOTON_API_USE_HTTPS
value: "true"
image: freikin/dawarich:latest
imagePullPolicy: Always
volumeMounts:
- mountPath: /usr/local/bundle/gems_sidekiq
name: gem-sidekiq
- mountPath: /var/app/public
name: public
- mountPath: /var/app/tmp/imports/watched
name: watched
command:
- "dev-entrypoint.sh"
args:
- "sidekiq"
resources:
limits:
memory: "3Gi"
cpu: "1500m"
volumes:
- name: gem-cache
persistentVolumeClaim:
claimName: gem-cache
- name: gem-sidekiq
persistentVolumeClaim:
claimName: gem-sidekiq
- name: public
persistentVolumeClaim:
claimName: public
- name: watched
persistentVolumeClaim:
claimName: watched
My log:
Environment: development
postgres-postgresql.db.svc.cluster.local (10.43.219.108:5432) open
Successfully installed rubygems-update-3.5.7
Installing RubyGems 3.5.7
Successfully built RubyGem
Name: bundler
Version: 2.5.7
File: bundler-2.5.7.gem
Bundler 2.5.7 installed
RubyGems 3.5.7 installed
Regenerating binstubs
Regenerating plugins
------------------------------------------------------------------------------
RubyGems installed the following executables:
/usr/local/bin/gem
/usr/local/bin/bundle
/usr/local/bin/bundler
RubyGems system software updated
Successfully installed bundler-2.5.9
1 gem installed
Database dawarich_development already exists, skipping creation...
PostgreSQL is ready. Running database migrations...
[dotenv] Loaded .env.development
D, [2024-11-08T16:06:44.356351 #36] DEBUG -- : ActiveRecord::SchemaMigration Load (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
D, [2024-11-08T16:06:44.433081 #36] DEBUG -- : ActiveRecord::SchemaMigration Load (2.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
Running DATA migrations...
[dotenv] Loaded .env.development
D, [2024-11-08T16:06:48.304497 #59] DEBUG -- : (0.5ms) SELECT pg_try_advisory_lock(1212213197400985920)
D, [2024-11-08T16:06:48.308679 #59] DEBUG -- : DataMigrate::DataSchemaMigration Load (2.7ms) SELECT "data_migrations"."version" FROM "data_migrations" ORDER BY "data_migrations"."version" ASC
D, [2024-11-08T16:06:48.316065 #59] DEBUG -- : ActiveRecord::InternalMetadata Load (2.8ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 [[nil, "environment"]]
D, [2024-11-08T16:06:48.318029 #59] DEBUG -- : (0.6ms) SELECT pg_advisory_unlock(1212213197400985920)
D, [2024-11-08T16:06:48.323404 #59] DEBUG -- : DataMigrate::DataSchemaMigration Load (0.6ms) SELECT "data_migrations"."version" FROM "data_migrations" ORDER BY "data_migrations"."version" ASC
Running seeds...
[dotenv] Loaded .env.development
D, [2024-11-08T16:06:52.321105 #72] DEBUG -- : ActiveRecord::SchemaMigration Load (2.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
D, [2024-11-08T16:06:52.400013 #72] DEBUG -- : User Exists? (4.2ms) SELECT 1 AS one FROM "users" LIMIT $1 [["LIMIT", 1]]
16:06:54 web.1 | started with pid 90
16:06:54 css.1 | started with pid 91
16:06:58 css.1 | [dotenv] Loaded .env.development
16:06:59 web.1 | => Booting Puma
16:06:59 web.1 | => Rails 7.2.2 application starting in development
16:06:59 web.1 | => Run `bin/rails server --help` for more startup options
16:06:59 web.1 | [dotenv] Loaded .env.development
16:07:00 web.1 | Puma starting in single mode...
16:07:00 web.1 | * Puma version: 6.4.3 (ruby 3.3.4-p94) ("The Eagle of Durango")
16:07:00 web.1 | * Min threads: 5
16:07:00 web.1 | * Max threads: 5
16:07:00 web.1 | * Environment: development
16:07:00 web.1 | * PID: 90
WORKAROUND:
Run "bin/rails server -p 3000 -b 0.0.0.0" instead of "bin/dev" in 'args'.
It worked for me too. Thank you so much, @shaman007
@shaman007 thanks for the fix, the problem was fixed in 0.16.4, so you can either return bin/dev
in your config, or continue using your version
Describe the bug
When I ran
docker-compose up
, dawarich no longer starts.Fails with
css.1 | exited with code 0
. Is there a way for me to troubleshoot this?There's no other logs or errors that I can find. I would be happy to troubleshoot further or provide additional details.
Version
Docker:
image: freikin/dawarich:latest
which I think it would be0.15.13
.[freikin/dawarich@sha256:8ef6ac0bd2ebe4b50ceab6e1f6a3fd10cd270e9b92a75a069e5dc3d5f251f790]
To Reproduce
docker-compose up -d
.(Not on the first run, but subsequent runs).
Expected behavior
Dawarich starts (as it used to).
Other info
Not sure if related - but just before this broke, I added additional sidekiq containers. Then this issue started happening, but it could just have been because I had to stop the container and it never restarted (with or without the new sidekiq). Later, I removed the additional sidekiqs, but it still doesn't start with the same error. I don't see any logs files where I can troubleshoot a bit further beyond what's below. I may have done other changes, but I can't track those downs.
The only action I took was importing a very large Google Takeout, which was running when the container stopped.
Questions
Is there a place where I can find further logs to understand and/or troubleshoot the error? Happy to report back or look for root cause.
Logs
First (failing) start:
Additional context
docker-compose.yaml
secrets.env (anything with
<var>
has been redacted for obvious reasons: