Donkie / Spoolman

Keep track of your inventory of 3D-printer filament spools.
MIT License
932 stars 86 forks source link

no webui #35

Closed NonaSuomy closed 1 year ago

NonaSuomy commented 1 year ago

Hi any idea why I can't hit the webui seems like it's live? http://10.0.1.89:7912

# Spoolman Container for Docker https://github.com/Donkie/Spoolman
version: '3.8'
services:
  spoolman:
    container_name: "spoolman"
    image: ghcr.io/donkie/spoolman:latest
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
      - "com.centurylinklabs.watchtower.monitor-only=false"
    volumes:
       - /var/lib/libvirt/images/usb001/docker-storage/spoolman/data:/home/app/.local/share/spoolman
    mac_address: "de:ad:be:ef:00:41"
    networks:
      - dhcp
    restart: "no"
    ports:
      - "7912:8000"
    environment:
      - TZ=Europe/Stockholm # Optional, defaults to UTC
networks:
  dhcp:
    name: "dbrv700"
    external: true
ping 10.0.1.89

Pinging 10.0.1.89 with 32 bytes of data:
Reply from 10.0.1.89: bytes=32 time=4ms TTL=63
Reply from 10.0.1.89 bytes=32 time=2ms TTL=63
Reply from 10.0.1.89 bytes=32 time=2ms TTL=63

Can't seem to look at the console through docker as well.

INFO:     Waiting for application startup.
spoolman.main              INFO     Setting up database...
spoolman.database.database INFO     No database type specified, using a default SQLite database located at "/home/app/.local/share/spoolman/spoolman.db"
spoolman.main              INFO     Performing migrations...
alembic.runtime.migration  INFO     Context impl SQLiteImpl.
alembic.runtime.migration  INFO     Will assume non-transactional DDL.
spoolman.database.database INFO     Scheduling automatic database backup for midnight.
spoolman.main              INFO     Startup complete.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
WARNING:  Invalid HTTP request received.
WARNING:  Invalid HTTP request received.
WARNING:  Invalid HTTP request received.
WARNING:  Invalid HTTP request received.
WARNING:  Invalid HTTP request received.
WARNING:  Invalid HTTP request received.
NonaSuomy commented 1 year ago

Is it somehow blocked because I'm coming from a different subnet?

Donkie commented 1 year ago

Not sure why you are having issues. Hard to tell since I know little about your network and machine setup.

Running Spoolman should be the most basic case of hosting a docker service on a machine, so please check guides on how to generally host a docker service

NonaSuomy commented 1 year ago

I run 15 docker containers on this server all with the identical compose for network config besides different mac addresses. This is the only one with this issue. There is nothing strange about my setup it just uses dhcp statically set to the mac addresses. Did you set anything in your config setup that would block it from accessing multiple subnets?

Donkie commented 1 year ago

This goes beyond my knowledge field then, I think you're on your own on how to solve it.

I can give you some guidelines though. The server that is receiving the requests is Uvicorn, you can see the command line options here: https://www.uvicorn.org/#command-line-options . The default options that Spoolman sets is `--host 0.0.0.0 --port 8000´. If you want to override it, you can add the command field to the compose:

services:
  spoolman:
    image: ghcr.io/donkie/spoolman:latest
    command: --host 0.0.0.0 --port 8000 --something else

This is perhaps where you want to be looking to fix your issue, if it is a problem with Spoolman.

NonaSuomy commented 1 year ago

So to fall on my own sword here the port was incorrect I was trying to hit! As I clued into what you pointed me to above.

Documentation says:

https://github.com/Donkie/Spoolman/blob/master/README.md?plain=1#L43

Once you have it up and running, you can access the web UI by browsing to http://your.ip:7912 <-- Shouldn't that be 8000?

http://your.ip:8000 works when I hit it but 7912 does not.

image image

Thank you for your help.

Donkie commented 1 year ago

8000 is the internal port inside the container of the app, and then it's externally mapped to 7912.

Perhaps your meddling with the networking settings is causing it to expose the direct internal port instead

NonaSuomy commented 1 year ago

Does it matter that it's coming up as 8000 instead of 7912 should I just put 8000 in moonraker conf? What is the purpose of having an internal 8000 and an external 7912?

Donkie commented 1 year ago

If 8000 is the port you can access the web UI through, then it should be the port you put in moonraker as well.

NonaSuomy commented 1 year ago

Ok thank you.