Got a handbrake container running but imposible to open the UI

  • Got several containers no issue what so ever, but I am trying Handbrake is running as far I can tell but my local ip:5800 give me 403 Forbidden and underneath black line nginx

    it is not a port conflict but rather a permission issue below the error log from the container?


    Code
    [error] 895#895: *1 open() "/opt/novnc/index.html" failed (13: Permission denied), client: 192.168.2.101, server: , request: "GET / HTTP/1.1", host: "192.168.2.50:5800"

    I google it and all the peoples getting this problem are all using OMV

    I tried all different ways to install it thru the CLI or docker compose with portainer same issue.

    Any help would be welcome.

    • Offizieller Beitrag

    hello,


    and if you specify the user and group ID ?


    https://github.com/jlesage/docker-handbrake#usergroup-ids

    I dunno, it worked perfectly for me.... It was pretty much brain dead simple.


    I deployed it as a stack in portainer... How did you create the directories involved? What are the permissions of them? Post the output of ls -l...


    Should look something like this...


    Code
    ken@openmediavault:/srv/dev-disk-by-label-D1/Disk_1/Handbrake$ ls -l
    total 12
    drwxr-sr-x 2 ken ken   4096 Oct 23 09:05 output
    drwxr-sr-x 2 ken users 4096 Oct 23 09:05 storage
    drwxr-sr-x 2 ken users 4096 Oct 23 09:05 watch
    ken@openmediavault:/srv/dev-disk-by-label-D1/Disk_1/Handbrake$ 

  • I tried previously to specify user id no change

    • Offizieller Beitrag

    why don't you specify the user and group on the stack?

    This stack has been working for me for months without problems:


    The warch path is not necessary to put it if you are not going to use it.

    Do not put the "devices" part either if you are not going to use intel quick sync.

    Give your docker user permissions on the folders and it should work.

  • Well no luck! Grrrr!

    • Offizieller Beitrag

    I thought about setting the env variables. I didn't follow the instructions on the documentation page he gave, and simply created a simple docker-compose file off the docker-run listed there... The docker-hub page also did not mention any env. variables.


    https://hub.docker.com/r/jlesage/handbrake


    So digging further, I took a look at the documentation, and it does mention environment variables...


    https://github.com/jlesage/docker-handbrake#usergroup-ids

    Code
    This is done by passing the user ID and group ID to the container via the USER_ID and GROUP_ID environment variables.


    So using PUID/PGID, is unlikely to work. I have no idea what he done, as I shown earlier I didn't even use them and it worked fine.. If he wanted to set the environment variables, he'd need to pass that in the Env variables as USER_ID and GROUP_ID


    Edit: Woops, wrong OP, if you deployed this using a stack or docker-compose...Try adding the environmental variables listed as below, then redeploy.. You'll need to get the UID/GID of a user on your system as detailed in the documentation you linked.


    (Note: This is the docker-compose you posted earlier, so if you want to delete your old container/stack and just copy/paste it, it should work.. as the only thing I changed was the env variable for UID/GID).. then see if you're still getting permission errors.


  • Unfortunately still the same


    Code
    root@OMV-MSI:~# id Philip
    uid=1000(Philip) gid=100(users) groups=100(users),4(adm),115(ssh),997(openmediavault-admin)
    • Offizieller Beitrag

    OK... lets take another approach if you've not tried this.... and delete all associated directories and start over. If you're using the same directories over and over, maybe the container is having trouble overwriting the permissions on one of the directories.


    I'm assuming: ..


    1. No risk of data loss, because you've yet to get this to work.


    2. None of these folders were created in the webUI.


    First, in Portainer... Delete your handbrake container and trip the trigger to remove volumes as well. Don't delete the stack, as we're going to use it again (as from what you're posting, it is right).

    Code
    root@openmediavault:cd /srv/dev-disk-by-uuid-2e5438fd-633f-4658-82b0-dce4dccd3b97/AppData/Config
    root@openmediavault:rm -R handbrake
    Code
    root@openmediavault:cd /srv/dev-disk-by-uuid-37d059e6-8189-404a-967b-53afec96bf4f/Data/
    root@openmediavault:rm -R handbrake


    If you used the OMV webUI to create your handbrake directories (which is kinda unnecessary).. Delete them in the webUI, and make sure you choose to delete local data so they are completely deleted.. again, assuming there is nothing there you need to risk losing.


    Now, go back your stack, and redeploy it, and let stack recreate the directories, and hopefully stick the right permissions on them from the beginning..

  • I did exactly what you kindly suggested no difference.

    Wondering what is wrong with my system!

    Code
    root@OMV-MSI:~# cd /srv/dev-disk-by-uuid-2e5438fd-633f-4658-82b0-dce4dccd3b97/AppData/Config
    root@OMV-MSI:/srv/dev-disk-by-uuid-2e5438fd-633f-4658-82b0-dce4dccd3b97/AppData/Config# rm -R handbrake
    root@OMV-MSI:/srv/dev-disk-by-uuid-2e5438fd-633f-4658-82b0-dce4dccd3b97/AppData/Config# cd ~
    root@OMV-MSI:~#
    root@OMV-MSI:~# cd /srv/dev-disk-by-uuid-37d059e6-8189-404a-967b-53afec96bf4f/Data/
    root@OMV-MSI:/srv/dev-disk-by-uuid-37d059e6-8189-404a-967b-53afec96bf4f/Data# rm -R handbrake
    • Offizieller Beitrag

    If you follow this guide [How to] Prepare OMV to install docker applications (beginners)

    and then you implement the stack maybe solve it.

    • Offizieller Beitrag

    If you follow the guide in my signature and then implement the stack you will have no problems.

    While your guide is fine.. I don't see where it will fix his problem. To me,... maybe I'm off base.. he's doing something wrong in the container setup, or something is just weird on his system.. . As I literally had this up in about 2min.


    OP, it's not working now.. are you still getting a permission error?

  • Yes the same permission error

    Code
    192.168.2.101 - - [23/Oct/2021:13:10:23 -0700] "GET /favicon.ico HTTP/1.1" 200 15086 "http://192.168.2.50:5800/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0" "-"


    Code
    2021/10/23 13:10:23 [error] 890#890: *3 open() "/opt/novnc/index.html" failed (13: Permission denied), client: 192.168.2.101, server: , request: "GET / HTTP/1.1", host: "192.168.2.50:5800"
    • Offizieller Beitrag

    What is confusing me... the file that it is complaining about permissions (/opt/novnc/index.html), is in the actual container... not in any of the data folders. Do you have some unusual setup with your containers folder? I'm assuming you're using 64bit?


  • Here what I was able to get:

    yes i am using 64bit

    -rw-r-----+ 1 root root 9865 Oct 23 13:56 index.html

    may not have the right permission?



    • Offizieller Beitrag

    OK, so the container checks out...


    Looking at my Data folder...

    Code
    root@openmediavault:/srv/dev-disk-by-label-D1/Disk_1# ls -l
    total 12
    drwxr-sr-x  5 root root  4096 Oct 23 15:33 Handbrake
    root@openmediavault:/srv/dev-disk-by-label-D1/Disk_1# 

    Only thing I'm noticing.. is all of mine are "sr" vs all of yours being "xr"



    Same with the below...

    Code
    root@openmediavault:/srv/dev-disk-by-label-D1/Disk_1/Handbrake# ls -l
    total 12
    drwxr-sr-x 2 ken  users 4096 Oct 23 15:33 output
    drwxr-sr-x 2 root root  4096 Oct 23 15:33 storage
    drwxr-sr-x 2 root root  4096 Oct 23 15:33 watch
    root@openmediavault:/srv/dev-disk-by-label-D1/Disk_1/Handbrake# 


    Code
    s (setuid) means set user ID upon execution. If setuid bit turned on a file, user executing that executable file gets the permissions of the individual or group that owns the file.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!