gramps-project / gramps-web

Frontend for Gramps Web
https://www.grampsweb.org
GNU Affero General Public License v3.0
397 stars 51 forks source link

On a fresh install, with or without a config file, I get the error: FileNotFoundError: [Errno 2] No such file or directory #453

Closed nothing2obvi closed 3 months ago

nothing2obvi commented 3 months ago

Here is the error:

[2024-06-18 19:51:32 +0000] [59] [INFO] Worker exiting (pid: 59)
[2024-06-18 19:51:33 +0000] [52] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/base.py", line 142, in init_process
    self.run()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/sync.py", line 126, in run
    self.run_for_one(timeout)
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/sync.py", line 63, in run_for_one
    self.notify()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/base.py", line 75, in notify
    self.tmp.notify()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/workertmp.py", line 45, in notify
    os.utime(self._tmp.fileno(), (new_time, new_time))
FileNotFoundError: [Errno 2] No such file or directory
[2024-06-18 19:51:33 +0000] [52] [INFO] Worker exiting (pid: 52)
[2024-06-18 19:51:34 +0000] [61] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/base.py", line 142, in init_process
    self.run()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/sync.py", line 126, in run
    self.run_for_one(timeout)
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/sync.py", line 63, in run_for_one
    self.notify()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/base.py", line 75, in notify
    self.tmp.notify()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/workertmp.py", line 45, in notify
    os.utime(self._tmp.fileno(), (new_time, new_time))
FileNotFoundError: [Errno 2] No such file or directory
[2024-06-18 19:51:34 +0000] [61] [INFO] Worker exiting (pid: 61)
[2024-06-18 19:51:35 +0000] [54] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/base.py", line 142, in init_process
    self.run()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/sync.py", line 126, in run
    self.run_for_one(timeout)
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/sync.py", line 63, in run_for_one
    self.notify()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/base.py", line 75, in notify
    self.tmp.notify()
  File "/usr/local/lib/python3.11/dist-packages/gunicorn/workers/workertmp.py", line 45, in notify
    os.utime(self._tmp.fileno(), (new_time, new_time))
FileNotFoundError: [Errno 2] No such file or directory
[2024-06-18 19:51:35 +0000] [54] [INFO] Worker exiting (pid: 54)
/usr/local/lib/python3.11/dist-packages/gramps/plugins/tool/check.py:51: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
[2024-06-18 19:51:36 +0000] [18] [ERROR] Worker (pid:52) exited with code 255
[2024-06-18 19:51:36 +0000] [18] [ERROR] Worker (pid:52) exited with code 255.
[2024-06-18 19:51:36 +0000] [71] [INFO] Booting worker with pid: 71
all values are hidden
(gunicorn:62): Gtk-CRITICAL **: 19:51:36.447: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
[2024-06-18 19:51:37 +0000] [18] [ERROR] Worker (pid:59) exited with code 255
[2024-06-18 19:51:37 +0000] [18] [ERROR] Worker (pid:59) exited with code 255.
[2024-06-18 19:51:37 +0000] [72] [INFO] Booting worker with pid: 72
[2024-06-18 19:51:38 +0000] [18] [ERROR] Worker (pid:61) exited with code 255
[2024-06-18 19:51:38 +0000] [18] [ERROR] Worker (pid:61) exited with code 255.
[2024-06-18 19:51:38 +0000] [74] [INFO] Booting worker with pid: 74
/usr/local/lib/python3.11/dist-packages/gramps/plugins/tool/check.py:51: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
all values are hidden
(gunicorn:63): Gtk-CRITICAL **: 19:51:38.780: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
[2024-06-18 19:51:38 +0000] [18] [ERROR] Worker (pid:54) exited with code 255
[2024-06-18 19:51:38 +0000] [18] [ERROR] Worker (pid:54) exited with code 255.
[2024-06-18 19:51:38 +0000] [77] [INFO] Booting worker with pid: 77

This is my docker-compose.yml file. I have tried running it with and without Portainer.

# This is currently synced via Syncthing.

version: "3.7"

services:
  grampsweb: &grampsweb
    image: ghcr.io/gramps-project/grampsweb:latest
    restart: always
    container_name: tree
    ports:
      - "9950:5000"  # host:docker
    environment:
      GRAMPSWEB_TREE: "Gramps Web"  # will create a new tree if not exists
      GRAMPSWEB_CELERY_CONFIG__broker_url: "redis://tree_redis:6379/0"
      GRAMPSWEB_CELERY_CONFIG__result_backend: "redis://tree_redis:6379/0"
      GRAMPSWEB_RATELIMIT_STORAGE_URI: redis://tree_redis:6379/1
    depends_on:
      - grampsweb_redis
    volumes:
      - "/Users/username/Docker/gramps-web/gramps_users:/app/users"  # persist user database
      - "/Users/username/Docker/gramps-web/gramps_index:/app/indexdir"  # persist search index
      - "/Users/username/Docker/gramps-web/gramps_thumb_cache:/app/thumbnail_cache"  # persist thumbnails
      - "/Users/username/Docker/gramps-web/gramps_cache:/app/cache"  # persist export and report caches
      - "/Users/username/Docker/gramps-web/gramps_secret:/app/secret"  # persist flask secret
      - "/Users/username/Docker/gramps-web/gramps_db:/root/.gramps/grampsdb"  # persist Gramps database
      - "/Users/username/Docker/gramps-web/gramps_tmp:/tmp"
      - "/Users/username/Docker/gramps-web/config/config.cfg:/app/config/config.cfg" # config file
      - "/Users/username/Docker/gramps-web/gramps_export:/app/export" # for export
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
    #deploy:
      #resources:
        #limits:
          #cpus: '0.50'
          #memory: 750M

  grampsweb_celery:
    <<: *grampsweb  # YAML merge key copying the entire grampsweb service config
    ports: []
    container_name: tree_celery
    depends_on:
      - grampsweb_redis
    command: celery -A gramps_webapi.celery worker --loglevel=INFO
    #deploy:
      #resources:
        #limits:
          #cpus: '0.25'
          #memory: 500M

  grampsweb_redis:
    image: redis:7.2.4-alpine
    container_name: tree_redis
    ports:
      - 5590:6379
    restart: always
    #deploy:
      #resources:
        #limits:
          #cpus: '0.25'
          #memory: 250M

networks:
  default:
    name: lsio
    external: true
DavidMStraub commented 3 months ago

This doesn't look like a Gramps Web problem but a setup problem. It looks like Gunicorn is complaining about not being able to access a temp directory. Perhaps /Users/username/Docker/gramps-web/gramps_tmp doesn't exist.

Please use the Gramps forum for setup issues. Thanks!