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

After restart Papermerge did not save documents #613

Open
deimjons opened this issue Apr 20, 2024 · 2 comments
Open

After restart Papermerge did not save documents #613

deimjons opened this issue Apr 20, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@deimjons
Copy link

deimjons commented Apr 20, 2024

Description
After docker restart of papermerge it does not save documents. Please help to solve this ossue

Info:

  • Papermerge Version [e.g. 3.1]

My docker-compose.yml

 version: '3.9'
services:
  papermerge:
    # image: papermerge/papermerge:3.1
    build: .
    container_name: papermerge
    depends_on:
      - papermerge_redis
      - papermerge_db
    environment:
        PAPERMERGE__SECURITY__SECRET_KEY: 12345
        PAPERMERGE__AUTH__USERNAME: admin
        PAPERMERGE__AUTH__PASSWORD: cfeceerrfeerfr45ff
        PAPERMERGE__DATABASE__URL: postgresql://papermerge:dfghjgklhlhkl@papermerge_db:5432/papermerge
        PAPERMERGE__REDIS__URL: redis://papermerge_redis:6379/0
    labels:
      traefik.enable: true
      traefik.docker.network: traefik

      traefik.http.routers.papermerge-http.rule: Host(`papermerge.example.com`)
      traefik.http.routers.papermerge-http.entrypoints: web
      traefik.http.routers.papermerge-http.middlewares: https-redirect

      traefik.http.routers.papermerge-https.rule: Host(`papermerge.example.com`)
      traefik.http.routers.papermerge-https.entrypoints: websecure
      traefik.http.routers.papermerge-https.tls: true
      traefik.http.routers.papermerge-https.tls.certresolver: prod
    volumes:
      - index_db:/core_app/index_db
      - media:/core_app/media
    networks:
      - papermerge
      - traefik
    ports:
      - 8888:80

  papermerge_worker:
    image: papermerge/papermerge:3.0.3
    container_name: papermerge_worker
    environment:
        PAPERMERGE__SECURITY__SECRET_KEY: 12345
        PAPERMERGE__AUTH__USERNAME: admin
        PAPERMERGE__AUTH__PASSWORD: cfeceerrfeerfr45ff
        PAPERMERGE__DATABASE__URL: postgresql://papermerge:dfghjgklhlhkl@papermerge_db:5432/papermerge
        PAPERMERGE__REDIS__URL: redis://papermerge_redis:6379/0
    command: worker
    volumes:
      - index_db:/core_app/index_db
      - media:/core_app/media
    networks:
      - papermerge

  papermerge_redis:
    image: redis:6
    container_name: papermerge_redis
    networks:
      - papermerge

  papermerge_db:
    image: bitnami/postgresql:16.1.0
    container_name: papermerge_db
    environment:
      POSTGRESQL_USER: papermerge
      POSTGRESQL_PASSWORD: dfghjgklhlhkl
      POSTGRESQL_POSTGRES_PASSWORD: dfghjgklhlhkl
      POSTGRESQL_DATABASE: papermerge
    volumes:
      - postgres_db:/var/lib/postgresql/data/
    networks:
      - papermerge

volumes:
  media:
  index_db:
  postgres_db:

networks:
  traefik:
    external: true
  papermerge:
    name: papermerge
@deimjons deimjons added the bug Something isn't working label Apr 20, 2024
@ciur
Copy link
Owner

ciur commented Apr 21, 2024

@deimjons could you please attach logs? (docker logs )

@deimjons
Copy link
Author

Hello.
Sorry for the long response. Thank you for your answer.

There are logs:

  1. Paparmerge logs:
Installing the current project: auth-server (0.7.0)
User 'admin' already exists.
/usr/lib/python3/dist-packages/supervisor/options.py:474: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  self.warnings.warn(
2024-06-29 14:32:34,412 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2024-06-29 14:32:34,414 INFO supervisord started with pid 1
2024-06-29 14:32:35,417 INFO spawned: 'tivoli' with pid 78
2024-06-29 14:32:35,418 INFO spawned: 'auth_server' with pid 79
2024-06-29 14:32:35,420 INFO spawned: 'core' with pid 80
2024-06-29 14:32:35,422 INFO spawned: 'nginx' with pid 81
2024/06/29 14:32:35 [notice] 81#81: using the "epoll" event method
2024/06/29 14:32:35 [notice] 81#81: nginx/1.22.1
2024/06/29 14:32:35 [notice] 81#81: OS: Linux 6.6.26-linuxkit
2024/06/29 14:32:35 [notice] 81#81: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/06/29 14:32:35 [notice] 81#81: start worker processes
2024/06/29 14:32:35 [notice] 81#81: start worker process 82
2024-06-29 14:32:36,497 INFO success: tivoli entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-06-29 14:32:36,497 INFO success: auth_server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-06-29 14:32:36,497 INFO success: core entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-06-29 14:32:36,497 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO:     Uvicorn running on http://0.0.0.0:8100 (Press CTRL+C to quit)
INFO:     Started parent process [78]
INFO:     Started server process [92]
INFO:     Started server process [91]
INFO:     Waiting for application startup.
INFO:     Started server process [90]
INFO:     Waiting for application startup.
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Application startup complete.
INFO:     Application startup complete.
INFO:     192.168.65.1:0 - "GET /token-validator HTTP/1.0" 401 Unauthorized
10.255.255.1 - - [29/Jun/2024:14:32:44 +0000] "GET / HTTP/1.1" 200 702 "https://papermerge.wqw.pw/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
INFO:     192.168.65.1:0 - "GET /token-validator HTTP/1.0" 401 Unauthorized
10.255.255.1 - - [29/Jun/2024:14:32:44 +0000] "GET /papermerge-runtime-config.js HTTP/1.1" 200 85 "https://papermerge.wqw.pw/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
INFO:     192.168.65.1:0 - "GET /token-validator HTTP/1.0" 401 Unauthorized
INFO 2024-06-29 14:32:46,069 auth Database based authentication for 'admin'
INFO 2024-06-29 14:32:46,137 auth Authentication succeded for 'admin'
10.255.255.1 - - [29/Jun/2024:14:32:46 +0000] "POST /api/token HTTP/1.1" 200 230 "https://papermerge.wqw.pw/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
INFO:     192.168.65.1:0 - "GET /token-validator HTTP/1.0" 200 OK
10.255.255.1 - - [29/Jun/2024:14:32:46 +0000] "GET / HTTP/1.1" 200 680 "https://papermerge.wqw.pw/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
INFO:     192.168.65.1:0 - "GET /token-validator HTTP/1.0" 200 OK
INFO:     192.168.65.1:0 - "GET /token-validator HTTP/1.0" 200 OK
10.255.255.1 - - [29/Jun/2024:14:32:46 +0000] "GET /api/users/me HTTP/1.1" 200 291 "https://papermerge.wqw.pw/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
INFO:     192.168.65.1:0 - "GET /token-validator HTTP/1.0" 200 OK
10.255.255.1 - - [29/Jun/2024:14:32:46 +0000] "GET /api/users/me HTTP/1.1" 200 291 "https://papermerge.wqw.pw/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
INFO:     192.168.65.1:0 - "GET /token-validator HTTP/1.0" 200 OK
INFO:     192.168.65.1:0 - "GET /token-validator HTTP/1.0" 200 OK
10.255.255.1 - - [29/Jun/2024:14:32:46 +0000] "GET /api/folders/e35e36da-6df2-42ec-993a-23af423d1b97 HTTP/1.1" 200 304 "https://papermerge.wqw.pw/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
10.255.255.1 - - [29/Jun/2024:14:32:46 +0000] "GET /api/nodes/e35e36da-6df2-42ec-993a-23af423d1b97?page_number=1&page_size=10&order_by=-title HTTP/1.1" 200 57 "https://papermerge.wqw.pw/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
  1. Redis logs:
1:C 29 Jun 2024 14:32:21.839 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 29 Jun 2024 14:32:21.839 # Redis version=6.2.14, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 29 Jun 2024 14:32:21.839 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 29 Jun 2024 14:32:21.839 * monotonic clock: POSIX clock_gettime
1:M 29 Jun 2024 14:32:21.840 * Running mode=standalone, port=6379.
1:M 29 Jun 2024 14:32:21.840 # Server initialized
1:M 29 Jun 2024 14:32:21.841 * Ready to accept connections
  1. Postgres logs:
postgresql 14:32:21.84 INFO  ==> 
postgresql 14:32:21.85 INFO  ==> Welcome to the Bitnami postgresql container
postgresql 14:32:21.85 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
postgresql 14:32:21.85 INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
postgresql 14:32:21.85 INFO  ==> 
postgresql 14:32:21.86 INFO  ==> ** Starting PostgreSQL setup **
postgresql 14:32:21.87 INFO  ==> Validating settings in POSTGRESQL_* env vars..
postgresql 14:32:21.88 INFO  ==> Loading custom pre-init scripts...
postgresql 14:32:21.88 INFO  ==> Initializing PostgreSQL database...
postgresql 14:32:21.89 INFO  ==> pg_hba.conf file not detected. Generating it...
postgresql 14:32:21.90 INFO  ==> Generating local authentication configuration
postgresql 14:32:22.47 INFO  ==> Starting PostgreSQL in background...
postgresql 14:32:22.66 INFO  ==> Changing password of postgres
postgresql 14:32:22.67 INFO  ==> Creating user papermerge
postgresql 14:32:22.68 INFO  ==> Granting access to "papermerge" to the database "papermerge"
postgresql 14:32:22.70 INFO  ==> Setting ownership for the 'public' schema database "papermerge" to "papermerge"
postgresql 14:32:22.72 INFO  ==> Configuring replication parameters
postgresql 14:32:22.74 INFO  ==> Configuring synchronous_replication
postgresql 14:32:22.74 INFO  ==> Configuring fsync
postgresql 14:32:22.75 INFO  ==> Stopping PostgreSQL...
waiting for server to shut down.... done
server stopped
postgresql 14:32:22.86 INFO  ==> Loading custom scripts...
postgresql 14:32:22.86 INFO  ==> Enabling remote connections
postgresql 14:32:22.86 INFO  ==> ** PostgreSQL setup finished! **

postgresql 14:32:22.87 INFO  ==> ** Starting PostgreSQL **
2024-06-29 14:32:22.887 GMT [1] LOG:  pgaudit extension initialized
2024-06-29 14:32:22.891 GMT [1] LOG:  starting PostgreSQL 16.1 on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2024-06-29 14:32:22.892 GMT [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-06-29 14:32:22.892 GMT [1] LOG:  listening on IPv6 address "::", port 5432
2024-06-29 14:32:22.893 GMT [1] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2024-06-29 14:32:22.896 GMT [145] LOG:  database system was shut down at 2024-06-29 14:32:22 GMT
2024-06-29 14:32:22.900 GMT [1] LOG:  database system is ready to accept connections
2024-06-29 14:37:22.995 GMT [143] LOG:  checkpoint starting: time
2024-06-29 14:37:45.854 GMT [143] LOG:  checkpoint complete: wrote 229 buffers (1.4%); 0 WAL file(s) added, 0 removed, 0 recycled; write=22.847 s, sync=0.008 s, total=22.860 s; sync files=146, longest=0.001 s, average=0.001 s; distance=1030 kB, estimate=1030 kB; lsn=0/1A10630, redo lsn=0/1A105F8
  1. Worker logs:
Applying sites.0001_initial... OK
  Applying sites.0002_alter_domain_unique... OK
Installing dependencies from lock file

Package operations: 6 installs, 0 updates, 0 removals

  • Installing iniconfig (2.0.0)
  • Installing packaging (23.2)
  • Installing pluggy (1.3.0)
  • Installing tomli (2.0.1)
  • Installing pytest (7.4.4)
  • Installing pytest-env (0.8.2)

Installing the current project: auth-server (0.6.4)
/core_app/.venv/lib/python3.10/site-packages/celery/platforms.py:829: SecurityWarning: You're running the worker with superuser privileges: this is
absolutely not recommended!

Please specify a different user using the --uid option.

User information: uid=0 euid=0 gid=0 egid=0

  warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
 
 -------------- worker-node-1708a096df8d@papermerge v5.3.6 (emerald-rush)
--- ***** ----- 
-- ******* ---- Linux-6.6.26-linuxkit-x86_64-with-glibc2.36 2024-06-29 16:32:33
- *** --- * --- 
- ** ---------- [config]
- ** ---------- .> app:         papermerge:0x7ffffda5bee0
- ** ---------- .> transport:   redis://papermerge_redis:6379/0
- ** ---------- .> results:     disabled://
- *** --- * --- .> concurrency: 7 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** ----- 
 -------------- [queues]
                .> celery           exchange=papermerge(direct) key=papermerge

[2024-06-29 16:32:33,918: WARNING/MainProcess] /core_app/.venv/lib/python3.10/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
  warnings.warn(

[2024-06-29 16:32:33,934: WARNING/MainProcess] /core_app/.venv/lib/python3.10/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
  warnings.warn(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants