linuxserver / docker-deluge

GNU General Public License v3.0
243 stars 89 forks source link

Deluge reports "No such device" #140

Closed codetheweb closed 2 years ago

codetheweb commented 2 years ago

linuxserver.io


Expected Behavior

Torrents shouldn't be stuck with an error message and should download normally.

Current Behavior

All torrents are errrored out with "No such device". Same issue as reported here: https://github.com/linuxserver/docker-deluge/pull/135#issuecomment-1054899503

The exact same config and setup works with version-2.0.5-0202202181752ubuntu20.04.1 but not version-2.0.5-r0 (latest).

It seems like this PR is the source of the trouble: https://github.com/linuxserver/docker-deluge/pull/135

Steps to Reproduce

Not sure what's triggering this so hard to say. Contents of core.conf:

{
    "file": 1,
    "format": 1
}{
    "add_paused": false,
    "allow_remote": true,
    "auto_manage_prefer_seeds": false,
    "auto_managed": true,
    "autoadd_enable": false,
    "autoadd_location": "/.../",
    "cache_expiry": 60,
    "cache_size": 512,
    "compact_allocation": false,
    "copy_torrent_file": false,
    "daemon_port": 58846,
    "del_copy_torrent_file": false,
    "dht": true,
    "dont_count_slow_torrents": true,
    "download_location": "/.../",
    "download_location_paths_list": [],
    "enabled_plugins": [
        "Label",
        "AutoAdd",
        "PIAPortPlugin"
    ],
    "enc_in_policy": 1,
    "enc_level": 2,
    "enc_out_policy": 1,
    "enc_prefer_rc4": false,
    "geoip_db_location": "/usr/share/GeoIP/GeoIP.dat",
    "ignore_limits_on_local_network": true,
    "info_sent": 0.0,
    "listen_interface": "",
    "listen_ports": [
        40372,
        40372
    ],
    "listen_random_port": null,
    "listen_reuse_port": true,
    "listen_use_sys_port": false,
    "lsd": false,
    "max_active_downloading": 25,
    "max_active_limit": 40,
    "max_active_seeding": 15,
    "max_connections_global": -1,
    "max_connections_per_second": 20,
    "max_connections_per_torrent": -1,
    "max_download_speed": -1.0,
    "max_download_speed_per_torrent": -1,
    "max_half_open_connections": 500,
    "max_upload_slots_global": 300,
    "max_upload_slots_per_torrent": -1,
    "max_upload_speed": 1000.0,
    "max_upload_speed_per_torrent": -1,
    "move_completed": false,
    "move_completed_path": "/.../deluge/completed",
    "move_completed_paths_list": [],
    "natpmp": false,
    "new_release_check": false,
    "outgoing_interface": "",
    "outgoing_ports": [
        46364,
        46364
    ],
    "path_chooser_accelerator_string": "Tab",
    "path_chooser_auto_complete_enabled": true,
    "path_chooser_max_popup_rows": 20,
    "path_chooser_show_chooser_button_on_localhost": true,
    "path_chooser_show_hidden_files": false,
    "peer_tos": "0x00",
    "plugins_location": "/config/plugins",
    "pre_allocate_storage": false,
    "prioritize_first_last_pieces": false,
    "proxy": {
        "anonymous_mode": false,
        "force_proxy": false,
        "hostname": "",
        "password": "",
        "port": 8080,
        "proxy_hostnames": true,
        "proxy_peer_connections": true,
        "proxy_tracker_connections": true,
        "type": 0,
        "username": ""
    },
    "queue_new_to_top": false,
    "random_outgoing_ports": true,
    "random_port": false,
    "rate_limit_ip_overhead": true,
    "remove_seed_at_ratio": true,
    "seed_time_limit": 180,
    "seed_time_ratio_limit": 7.0,
    "send_info": false,
    "sequential_download": false,
    "share_ratio_limit": 1.0,
    "shared": false,
    "stop_seed_at_ratio": false,
    "stop_seed_ratio": 1.0,
    "super_seeding": false,
    "torrentfiles_location": "/.../torrentfiles",
    "upnp": false,
    "utpex": true
}

I'm using a few plugins; PIAPortPlugin is the only one that's not included with Deluge.

Environment

OS: Ubuntu 20.04.3 LTS CPU architecture: x86_64

Command used to create docker container (run/create/compose/screenshot)

Docker Compose:

version: '3'

services:
  deluge:
    image: ghcr.io/linuxserver/deluge
    environment:
      TZ: 'EST5EDT'
      PUID: 0
      PGID: 0
      DELUGE_LOGLEVEL: info
    restart: always
    volumes:
      - /.../:/config
      - /.../:/downloads

Docker logs

seedbox-deluge | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
seedbox-deluge | [s6-init] ensuring user provided files have correct perms...exited 0.
seedbox-deluge | [fix-attrs.d] applying ownership & permissions fixes...
seedbox-deluge | [fix-attrs.d] done.
seedbox-deluge | [cont-init.d] executing container initialization scripts...
seedbox-deluge | [cont-init.d] 01-envfile: executing...
seedbox-deluge | [cont-init.d] 01-envfile: exited 0.
seedbox-deluge | [cont-init.d] 01-migrations: executing...
seedbox-deluge | [migrations] started
seedbox-deluge | [migrations] no migrations found
seedbox-deluge | [cont-init.d] 01-migrations: exited 0.
seedbox-deluge | [cont-init.d] 02-tamper-check: executing...
seedbox-deluge | [cont-init.d] 02-tamper-check: exited 0.
seedbox-deluge | [cont-init.d] 10-adduser: executing...
seedbox-deluge | usermod: no changes
seedbox-deluge |
seedbox-deluge | -------------------------------------
seedbox-deluge |           _         ()
seedbox-deluge |          | |  ___   _    __
seedbox-deluge |          | | / __| | |  /  \
seedbox-deluge |          | | \__ \ | | | () |
seedbox-deluge |          |_| |___/ |_|  \__/
seedbox-deluge |
seedbox-deluge |
seedbox-deluge | Brought to you by linuxserver.io
seedbox-deluge | -------------------------------------
seedbox-deluge |
seedbox-deluge | To support LSIO projects visit:
seedbox-deluge | https://www.linuxserver.io/donate/
seedbox-deluge | -------------------------------------
seedbox-deluge | GID/UID
seedbox-deluge | -------------------------------------
seedbox-deluge |
seedbox-deluge | User uid:    0
seedbox-deluge | User gid:    0
seedbox-deluge | -------------------------------------
seedbox-deluge |
seedbox-deluge | [cont-init.d] 10-adduser: exited 0.
seedbox-deluge | [cont-init.d] 30-config: executing...
seedbox-deluge | [cont-init.d] 30-config: exited 0.
seedbox-deluge | [cont-init.d] 90-custom-folders: executing...
seedbox-deluge | [cont-init.d] 90-custom-folders: exited 0.
seedbox-deluge | [cont-init.d] 99-custom-files: executing...
seedbox-deluge | [custom-init] no custom files found exiting...
seedbox-deluge | [cont-init.d] 99-custom-files: exited 0.
seedbox-deluge | [cont-init.d] done.
seedbox-deluge | [services.d] starting services
seedbox-deluge | [services.d] done.
seedbox-deluge | 19:03:06 [INFO    ][deluge.configmanager:52  ] Setting config directory to: /config
seedbox-deluge | 19:03:06 [INFO    ][deluge.ui.ui:70  ] Deluge ui 2.0.5
seedbox-deluge | 19:03:06 [INFO    ][deluge.ui.ui:72  ] Starting web ui..
seedbox-deluge | 19:03:06 [INFO    ][deluge.configmanager:52  ] Setting config directory to: /config
seedbox-deluge | 19:03:06 [INFO    ][deluge.core.daemon            :94  ] Deluge daemon 2.0.5
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.core              :339 ] Successfully loaded session.state: /config/session.state
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.core              :339 ] Successfully loaded session.state: /config/session.state.bak
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.alertmanager      :148 ] Alert Queue Size set to 10000
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.rpcserver         :402 ] Starting DelugeRPC server :58846
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.daemon            :154 ] Deluge daemon starting...
seedbox-deluge | 19:03:07 [INFO    ][deluge_label.core             :78  ] *** Start Label plugin ***
seedbox-deluge | 19:03:07 [INFO    ][deluge.pluginmanagerbase      :191 ] Plugin Label enabled...
seedbox-deluge | 19:03:07 [INFO    ][deluge.i18n.util           :105 ] Setting up translations from /usr/lib/python3.10/site-packages/deluge/i18n
seedbox-deluge | 19:03:07 [INFO    ][deluge.pluginmanagerbase      :191 ] Plugin AutoAdd enabled...
seedbox-deluge | 19:03:07 [WARNING ][deluge.config                 :405 ] Unable to open config file /config/piaportplugin.conf: [Errno 2] No such file or directory: '/config/piaportplugin.conf'
seedbox-deluge | 19:03:07 [INFO    ][deluge.ui.web.server       :735 ] Starting webui server at PID 332
seedbox-deluge | 19:03:07 [INFO    ][deluge.ui.web.server       :750 ] Serving at http://0.0.0.0:8112/
seedbox-deluge | 19:03:07 [INFO    ][deluge.pluginmanagerbase      :191 ] Plugin PIAPortPlugin enabled...
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.authmanager       :228 ] Opening auth for load: /config/auth
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.authmanager       :236 ] Successfully loaded auth: /config/auth
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.torrentmanager    :818 ] Loading torrent state: /config/state/torrents.state
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.torrentmanager    :834 ] Successfully loaded /config/state/torrents.state
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.torrentmanager    :1081] Opening torrents.fastresume for load: /config/state/torrents.fastresume
seedbox-deluge | 19:03:07 [INFO    ][deluge.core.torrentmanager    :1092] Successfully loaded torrents.fastresume: /config/state/torrents.fastresume
seedbox-deluge | 19:03:11 [WARNING ][deluge.ui.web.server       :614 ] Failed to enable WebUI "normal" mode, script files are missing!
seedbox-deluge | 19:03:11 [WARNING ][deluge.ui.web.server       :626 ] WebUI falling back to "debug" mode.
github-actions[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

thelamer commented 2 years ago

That TZ is not valid US/Eastern would be east coast. Why are you running the container as root PUID/PGID?

thelamer commented 2 years ago

Also please try the container as a test without the https://github.com/jawilson/deluge-piaportplugin plugin, they may need to make updates to that plugin now that this image has been rebased to Alpine.

brott8 commented 2 years ago

I had similar issues. Likely due to the replatform. I found that rolling back to tag 2.0.5-0202202181752ubuntu20.04.1-ls140 corrected the issue for me. I don't have any plugins configured.

I don't think this is a permissions issue, as in my tests, the file was still initialised successfully from the torrent.

thelamer commented 2 years ago

I had similar issues. Likely due to the replatform. I found that rolling back to tag 2.0.5-0202202181752ubuntu20.04.1-ls140 corrected the issue for me. I don't have any plugins configured.

I don't think this is a permissions issue, as in my tests, the file was still initialised successfully from the torrent.

Post your setup. Me and our team cannot replicate this, so there is an outside variable here.

codetheweb commented 2 years ago

Yep, I was able to reproduce it with jawilson/deluge-piaportplugin disabled. I'm currently trying to reproduce it with a clean config on macOS, we'll see how that goes.

brott8 commented 2 years ago

All through my mobile, so please excuse any formatting issues. Docker compose bit:

  deluge:
      image: linuxserver/deluge
      container_name: deluge                        
      network_mode: "service:vpn"
      depends_on: ['vpn']
      environment:
        - PUID=995
        - PGID=995
        - UMASK_SET=000
        - UMASK=000
        - TZ=${TZ}
      volumes:
        - ${USERDIR}/deluge:/config       
        - /media/drv1/VIDEO/Torrents:/downloads
      restart: unless-stopped

Plugins directory is empty. Perhaps the other factor is that I am using mergerfs filesystem for the downloads directory. This should be mostly abstracted away, but I have seen oddities before. I have not tried to set downloads to a local folder.

codetheweb commented 2 years ago

Perhaps the other factor is that I am using mergerfs filesystem for the downloads directory. This should be mostly abstracted away, but I have seen oddities before.

Hmm, I'm also using mergefs.

codetheweb commented 2 years ago

I can confirm that the issue is with mergerfs. I created a clean Deluge container (new config), mounted to my boot SSD, and it worked fine. I shutdown the container, changed the mountpoint to my mergerfs mount, and now I'm getting the same "No such device" error.

I am able to touch a new file on the mergerfs mount inside the container if I do docker-compose exec deluge bash and su abc though...

codetheweb commented 2 years ago

I was able to fix this by removing the direct_io argument to mergerfs and adding cache.files=full (not sure if that was necessary since it defaults to cache.files=libfuse when direct_io isn't set).

Thanks @brott8 for pointing me in the right direction. :)

vitor-alves commented 1 year ago

I can confirm removing direct_io from mergerfs works

r0m1CH commented 1 year ago

can you share your whole options ? I replaced direct_io for cache.files=full ? Torrents can be now added but does not start downloading. Pretty sure this is one of my option that screw things up