Technosoft2000 / docker-calibre-web

Docker image for Calibre Web https://github.com/janeczku/calibre-web/, based on docker image of Alpine
271 stars 57 forks source link

DB location is not valid, please enter correct path #58

Open luther84 opened 5 years ago

luther84 commented 5 years ago

I'm very sorry for opening another ticket about this error message but I feel like I am taking crazy pills. No matter what I've tried I cannot get past the config screen, calibre-web will not accept my metadata.db location. I believe I have set permissions properly, I have tried several variations on db location, permissioning and setup.

The version of Calibre that I used to create the db is 3.42.0

docker-compose.yml

  calibre-web:
    container_name: calibre-web
    restart: unless-stopped
    image: technosoft2000/calibre-web
    volumes:
      - /share/CACHEDEV1_DATA/Public/Books:/books
      - /share/CACHEDEV1_DATA/Container/Homelab/calibre-web/config:/config
    environment:
      - PGID=1001
      - PUID=1000
      - USE_CONFIG_DIR=true
      - SET_CONTAINER_TIMEZONE=true
      - CONTAINER_TIMEZONE=America/New_York
    ports:
      - "8083:8083"
    labels:
      - "traefik.enable=false"

Output of docker exec -it calibre-web ls -l /books/metadata.db -rwxrwxrwx+ 1 root calibre 389120 May 4 23:33 /books/metadata.db

Here's the output of docker logs calibre-web pastebin link

Technosoft2000 commented 5 years ago

Hi @luther84 ,

at the first look I can't see any issue at the log files and delivered info, everything looks okay. But as you wrote I see at the log file that you stuck at the config page and I've no idea now why it happens :-o

At your calibre app directory (inside the docker container) you should have also a calibre.log file - could you please check this one if you can see any issue there and please provide the content of it so that I can check it too :)

You've also the possibility to map the app directory as volume while container creation: -v <your Calibre Web application folder>:/calibre-web/app

luther84 commented 5 years ago

Thanks for taking a look! I really appreciate it. I have slightly modified the docker-compose and included it below. I fixed the internal folder for the config directory, added a depends for the proxy container and mounted the app folder. I still cannot get past the config page. No entry I put in Location of Calibre database is accepted. As far as I can see elsewhere /books should be accepted with my config.

   calibre-web:
    container_name: calibre-web
    restart: unless-stopped
    image: technosoft2000/calibre-web
    depends_on:
      - "reverse-proxy"
    volumes:
      - /share/CACHEDEV1_DATA/Public/Books:/books
      - /share/CACHEDEV1_DATA/Container/Homelab/calibre-web/config:/calibre-web/config
      - /share/CACHEDEV1_DATA/Container/Homelab/calibre-web/app:/calibre-web/app
    environment:
      - PGID=1001
      - PUID=1000
      - USE_CONFIG_DIR=true
      - SET_CONTAINER_TIMEZONE=true
      - CONTAINER_TIMEZONE=America/New_York
    ports:
      - "8083:8083"
    labels:
      - "traefik.enable=false"

Here is output of docker exec -it calibre-web ls -l /books/metadata.db -rwxrwxrwx+ 1 root calibre 389120 May 5 00:34 /books/metadata.db

pastebin of docker logs calibre-web (the POST towards the end is my last attempt to submit /books as the Calibre db location) https://pastebin.com/1tpNdP7x

pastbin of the logfiles /app/calibre-web.log and /config/calibre-web.log https://pastebin.com/dT8fMp3M

Still not seeing anything obvious, looking through the code I appear to be failing a db.setup_db function but I'm not certain. Is there a way I could bump the log level?

Is there any other information that would be useful?

Technosoft2000 commented 5 years ago

Still not seeing anything obvious, ...

I too, hmm that issue is hard, I thought we'll see any database or SQL exception at calibre-web.log, but there is nothing :-o

Does any other container use the the same metadata.db while you are using the Calibre-Web container?

Could you please try to use an empty books directory e.g. /share/CACHEDEV1_DATA/Public/Books-Test to see if it works when the container creates an empty metadata.db at this place.

luther84 commented 5 years ago

Solved, it was permissions 🤦‍♂ . I am running this on a qnap and there are two permissions systems in place, the normal file level one and a second one available in the graphical interface that I am guessing uses selinux? After I had set permissions as desired via the graphical interface it started working. I am so sorry to waste time and I hope this helps anyone else struggling on a QNAP device. Please close or remove this issue. Tx, it's a great docker image!

Technosoft2000 commented 5 years ago

Hi @luther84,

thanks for your answer 👍, I'll add a hint to the container description so that other QNAP users don't get into the same trap 😄

xpufx commented 4 years ago

I am getting the same error (portainer install with default everything. i haven't set persistent volumes yet) on a fresh install on a regular linux install. No qnap or selinux.

hobbygirl commented 4 years ago

I have installed Calibre-web and my drive has a folder called ‘My Library’. I have created my database and it is in the root of that folder. I can’t figure out how to enter the path to the database on caliber-web. It says DB Location is not Valid, Please Enter Correct Path. I am not proficient with Linux commands and don’t know where to set permissions but any help would be appreciated. Thanks.

hobbygirl commented 4 years ago

Forgot to add that the mounted volume is called books.

Close04 commented 1 year ago

Try using only lowercase letters in your library path*, this might do the trick.

*/share/CACHEDEV1_DATA/Public/Books