mondediefr / docker-rutorrent

:outbox_tray: :whale: Docker image of rutorrent with filebot based on alpine (multiarch)

Home Page:https://hub.docker.com/r/mondedie/rutorrent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bad response from server: (500 [error,getplugins]) Internal Server Error

petsasj opened this issue · comments

Trying to get this docker image to work, but getting error 500 when reaching RuTorrent interface.

Attaching both my docker run command and logs

docker run --name rutorrent -dt \
  --privileged \
  -e UID=1000 \
  -e GID=1001 \
  -e DHT_RTORRENT=on \
  -e PORT_RTORRENT=6881 \
  -e FILEBOT_LICENSE=/config/filebot/FileBot_License_xxxxxxxxxx.psm \
  -e FILEBOT_RENAME_METHOD=move \
  -e FILEBOT_LANG=en \
  -p 8080:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /mnt/docker/rutorrent/config:/config \
  -v /mnt/docker/rutorrent/data:/data \
  mondedie/rutorrent:filebot

logs

[2020/02/02-16:02:28] Create user torrent ...
[2020/02/02-16:02:28] Create user torrent done
[2020/02/02-16:02:28] Generate configuration ...
rm: can't remove '/rutorrent/app/conf/users': Directory not empty
rm: can't remove '/rutorrent/app/share/settings': Directory not empty
rm: can't remove '/rutorrent/app/share/torrents': Directory not empty
rm: can't remove '/rutorrent/app/share/users': Directory not empty
[2020/02/02-16:02:28] Generate configuration done
[2020/02/02-16:02:28] HTTP authentication configuration ...
[2020/02/02-16:02:28] HTTP authentication configuration done
[2020/02/02-16:02:28] Configuration of filebot ...
[2020/02/02-16:02:28] Configuration of filebot done
[2020/02/02-16:02:28] Update old configurations ...
[2020/02/02-16:02:28] Update old configurations done
[2020/02/02-16:02:28] Apply system permissions ...
find: ‘/rutorrent/app/conf/.htaccess’: No such file or directory
chown: /rutorrent/app/conf/.htaccess: No such file or directory
find: ‘/rutorrent/app/conf/access-swap.sh’: No such file or directory
chown: /rutorrent/app/conf/access-swap.sh: No such file or directory
find: ‘/rutorrent/app/conf/access.ini’: No such file or directory
chown: /rutorrent/app/conf/access.ini: No such file or directory
find: ‘/rutorrent/app/conf/access_no’: No such file or directory
chown: /rutorrent/app/conf/access_no: No such file or directory
find: ‘/rutorrent/app/conf/access_yes’: No such file or directory
chown: /rutorrent/app/conf/access_yes: No such file or directory
find: ‘/rutorrent/app/conf/config.php’: No such file or directory
chown: /rutorrent/app/conf/config.php: No such file or directory
find: ‘/rutorrent/app/conf/plugins.ini’: No such file or directory
chown: /rutorrent/app/conf/plugins.ini: No such file or directory
find: ‘/rutorrent/app/conf/users/.gitignore’: No such file or directory
chown: /rutorrent/app/conf/users/.gitignore: No such file or directory
find: ‘/rutorrent/app/share/.htaccess’: No such file or directory
chown: /rutorrent/app/share/.htaccess: No such file or directory
find: ‘/rutorrent/app/share/settings/.gitignore’: No such file or directory
chown: /rutorrent/app/share/settings/.gitignore: No such file or directory
find: ‘/rutorrent/app/share/torrents/.gitignore’: No such file or directory
chown: /rutorrent/app/share/torrents/.gitignore: No such file or directory
find: ‘/rutorrent/app/share/users/.gitignore’: No such file or directory
chown: /rutorrent/app/share/users/.gitignore: No such file or directory
[2020/02/02-16:02:28] Apply system permissions done
[2020/02/02-16:02:28] Apply data permissions ...
[2020/02/02-16:02:28] Apply data permissions done
[2020/02/02-16:02:28] Start all services ...
[02-Feb-2020 16:02:28] NOTICE: fpm is running, pid 106
[02-Feb-2020 16:02:28] NOTICE: ready to handle connections

Sorry I should have mentioned the following:

Running docker on Centos 7.7 (with SELinux on, hence the --privileged argument).

If any more info are required, please do let me know.

I think it's selinux the problem.
Can you paste the resultat of this commands?

ls -alZ /mnt/docker/rutorrent/config/rutorrent/conf
ls -alZ /mnt/docker/rutorrent/config/rutorrent/share

I had checked the file structure previously and found the files inside /config/rutorrent/

However If you check the results from the logs provided above, you'll see the file structure /rutorrent/app/conf/* and /rutorrent/app/share/*. So I was wondering if there is somekind of wrong file association

Here are the results you asked.

[petsasj@router ~]$ ls -alZ /mnt/docker/rutorrent/config/rutorrent/share
drwxr-xr-x. petsasj docker system_u:object_r:mnt_t:s0       .
drwxr-xr-x. petsasj docker system_u:object_r:mnt_t:s0       ..
-rw-r--r--. petsasj docker system_u:object_r:mnt_t:s0       .htaccess
drwxr-xr-x. petsasj docker system_u:object_r:mnt_t:s0       settings
drwxr-xr-x. petsasj docker system_u:object_r:mnt_t:s0       torrents
drwxr-xr-x. petsasj docker system_u:object_r:mnt_t:s0       users
[petsasj@router ~]$ ls -alZ /mnt/docker/rutorrent/config/rutorrent/conf
drwxr-xr-x. petsasj docker system_u:object_r:mnt_t:s0       .
drwxr-xr-x. petsasj docker system_u:object_r:mnt_t:s0       ..
-rw-r--r--. petsasj docker system_u:object_r:mnt_t:s0       .htaccess
-rwxr-xr-x. petsasj docker system_u:object_r:mnt_t:s0       access-swap.sh
-rw-r--r--. petsasj docker system_u:object_r:mnt_t:s0       access.ini
-rw-r--r--. petsasj docker system_u:object_r:mnt_t:s0       access_no
-rw-r--r--. petsasj docker system_u:object_r:mnt_t:s0       access_yes
-rw-r--r--. petsasj docker system_u:object_r:mnt_t:s0       config.php
-rw-r--r--. petsasj docker system_u:object_r:mnt_t:s0       plugins.ini
drwxr-xr-x. petsasj docker system_u:object_r:mnt_t:s0       users

EDIT: Added inline results

(with SELinux on, hence the --privileged argument).

Why?

Can you try this?

docker run --name rutorrent -dt \
  -e UID=1000 \
  -e GID=1001 \
  -e DHT_RTORRENT=on \
  -e PORT_RTORRENT=6881 \
  -e FILEBOT_LICENSE=/config/filebot/FileBot_License_xxxxxxxxxx.psm \
  -e FILEBOT_RENAME_METHOD=move \
  -e FILEBOT_LANG=en \
  -p 8080:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /mnt/docker/rutorrent/config:/config:z \
  -v /mnt/docker/rutorrent/data:/data:z \
  mondedie/rutorrent:filebot

Running a container with --privileged argument, allows for it to run as if SELinux is disabled.

Running it without, the file structure within /mnt/docker/rutorrent/config/ are not created. I will provide a log once I return home.

Below are a screenshot and logs for non privileged docker run (exactly like you asked, with :z in -v)

Screenshot 2020-02-03 at 20 31 21

[2020/02/03-18:29:03] Create user torrent ...
[2020/02/03-18:29:03] Create user torrent done
[2020/02/03-18:29:03] Generate configuration ...
rm: can't remove '/rutorrent/app/conf/users': Directory not empty
rm: can't remove '/rutorrent/app/share/settings': Directory not empty
rm: can't remove '/rutorrent/app/share/torrents': Directory not empty
rm: can't remove '/rutorrent/app/share/users': Directory not empty
[2020/02/03-18:29:03] Generate configuration done
[2020/02/03-18:29:03] HTTP authentication configuration ...
[2020/02/03-18:29:03] HTTP authentication configuration done
[2020/02/03-18:29:03] Configuration of filebot ...
[2020/02/03-18:29:05] Configuration of filebot done
[2020/02/03-18:29:05] Update old configurations ...
[2020/02/03-18:29:05] Update old configurations done
[2020/02/03-18:29:05] Apply system permissions ...
find: ‘/rutorrent/app/conf/.htaccess’: No such file or directory
chown: /rutorrent/app/conf/.htaccess: No such file or directory
find: ‘/rutorrent/app/conf/access-swap.sh’: No such file or directory
chown: /rutorrent/app/conf/access-swap.sh: No such file or directory
find: ‘/rutorrent/app/conf/access.ini’: No such file or directory
chown: /rutorrent/app/conf/access.ini: No such file or directory
find: ‘/rutorrent/app/conf/access_no’: No such file or directory
chown: /rutorrent/app/conf/access_no: No such file or directory
find: ‘/rutorrent/app/conf/access_yes’: No such file or directory
chown: /rutorrent/app/conf/access_yes: No such file or directory
find: ‘/rutorrent/app/conf/config.php’: No such file or directory
chown: /rutorrent/app/conf/config.php: No such file or directory
find: ‘/rutorrent/app/conf/plugins.ini’: No such file or directory
chown: /rutorrent/app/conf/plugins.ini: No such file or directory
find: ‘/rutorrent/app/conf/users/.gitignore’: No such file or directory
chown: /rutorrent/app/conf/users/.gitignore: No such file or directory
find: ‘/rutorrent/app/share/.htaccess’: No such file or directory
chown: /rutorrent/app/share/.htaccess: No such file or directory
find: ‘/rutorrent/app/share/settings/.gitignore’: No such file or directory
chown: /rutorrent/app/share/settings/.gitignore: No such file or directory
find: ‘/rutorrent/app/share/torrents/.gitignore’: No such file or directory
chown: /rutorrent/app/share/torrents/.gitignore: No such file or directory
find: ‘/rutorrent/app/share/users/.gitignore’: No such file or directory
chown: /rutorrent/app/share/users/.gitignore: No such file or directory
[2020/02/03-18:29:13] Apply system permissions done
[2020/02/03-18:29:13] Apply data permissions ...
[2020/02/03-18:29:13] Apply data permissions done
[2020/02/03-18:29:13] Start all services ...
[03-Feb-2020 18:29:13] NOTICE: fpm is running, pid 2480
[03-Feb-2020 18:29:13] NOTICE: ready to handle connections

Ok and with --privileged argument?

docker run --name rutorrent -dt \
  --privileged \
  -e UID=1000 \
  -e GID=1001 \
  -e DHT_RTORRENT=on \
  -e PORT_RTORRENT=6881 \
  -e FILEBOT_LICENSE=/config/filebot/FileBot_License_xxxxxxxxxx.psm \
  -e FILEBOT_RENAME_METHOD=move \
  -e FILEBOT_LANG=en \
  -p 8080:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /mnt/docker/rutorrent/config:/config:z \
  -v /mnt/docker/rutorrent/data:/data:z \
  mondedie/rutorrent:filebot

The problem comes from selinux, not from the docker image.

Exactly the same logs as before even with --privileged argument

Just want to ask again: is it normal to look for files "/rutorrent/app/share/* and /rutorrent/app/conf/* when no such directories exist?

In your file structure there are is no /rutorrent/APP folder.

Can you try this solution? moby/moby#27214 (comment)
It seems to be a problem related to centos.

Sorry for not replying: I was drowned in work and could not get to trying the method you suggested.

I had time yesterday and moved the whole docker location (symlink /var/lib/docker) to an ext4 formatted location.

And to my amazement it did work!

Just wanted to update this question so everyone ever facing this problem could try this.