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

Spoolman won't install on Podman, permission issues. #393

Closed
stelladraco27 opened this issue May 31, 2024 · 2 comments
Closed

Spoolman won't install on Podman, permission issues. #393

stelladraco27 opened this issue May 31, 2024 · 2 comments
Labels
Bug Something isn't working

Comments

@stelladraco27
Copy link

Describe the bug
After running podman compose up -d on the yaml file the image is downloaded and the container starts to run; however, when viewing the logs, there is a series of critical errors and the application does not finish setting up, then exits, before looping the whole thing again, and again. The error (view snippet section) mentions a permission issue on an internal folder (inside the container, not the host machine), before saying the data directory needs permissions and to use a chown command. Even once I use the chown command and try again, it still fails. Just a few days ago I had this thing running, then changed my data directory location, before trying to install again, maybe that has something to do with it?

To Reproduce
Steps to reproduce the behavior:

  1. Create a compose.yaml as described in the installation steps.
  2. Run container.
  3. Look at logs.

Expected behavior
I expect the container to install correctly and display a webpage for me.

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

Snippets
compose.yaml

services:
  spoolman:
    image: ghcr.io/donkie/spoolman:latest
    restart: unless-stopped
    volumes:
      # Mount the host machine's ./data directory into the container's /home/app/.local/share/spoolman directory
      - type: bind
        source: /home/MyUsername/podman/data/spoolman
        target: /home/app/.local/share/spoolman # Do NOT change this line
    ports:
      # Map the host machine's port 7912 to the container's port 8000
      - "7912:8000"
    environment:
      - TZ=America/Los_Angeles # Optional, defaults to UTC

Output log

usermod: no changes
User UID: 1000
User GID: 1000
Starting uvicorn...
�Failed to setup disk-based cache due to permission error. Ensure the path /home/app/.local/share/spoolman/cache/hishel is writable. Using in-memory cache instead as fallback.
INFO:     Started server process [1]
INFO:     Waiting for application startup.
spoolman.env               WARNING  Data directory is not writable, trying to fix it...
chown: /home/app/.local/share/spoolman: Operation not permitted
chown: /home/app/.local/share/spoolman: Operation not permitted
�spoolman.env               ERROR    Data directory is not writable. Please run "sudo chown -R 1000:1000 /path/to/spoolman/datadir" on the host OS.
ERROR:    Traceback (most recent call last):
  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 677, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 566, in __aenter__
    await self._router.startup()
  File "/home/app/spoolman/.venv/lib/python3.11/site-packages/starlette/routing.py", line 654, in startup
    await handler()
  File "/home/app/spoolman/spoolman/main.py", line 117, in startup
    env.check_write_permissions()
  File "/home/app/spoolman/spoolman/env.py", line 374, in check_write_permissions
    sys.exit(1)
SystemExit: 1

ERROR:    Application startup failed. Exiting.

Spoolman Host (please complete the following information):

  • Installation type: Docker (Podman)
  • Installed version: Unknown (Latest as of 5/31/24) because it fails to install so I can't see version number.
  • OS and Distro: Fedora
  • Database type: Unknown

Additional context
Add any other context about the problem here.

@stelladraco27 stelladraco27 added the Bug Something isn't working label May 31, 2024
@stelladraco27
Copy link
Author

Would love some help with this.

@Donkie
Copy link
Owner

Donkie commented Jun 8, 2024

Have you tried fixing the permissions of the host folder /home/MyUsername/podman/data/spoolman that you're mounting it to?

So like: sudo chown -R 1000:1000 /home/MyUsername/podman/data/spoolman

@Donkie Donkie closed this as completed Aug 5, 2024
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