Exception calling RPC request: [Errno 9] Bad file descriptor: b'/downloads/Incomplete'

General support for problems installing or using Deluge
Post Reply
instantdreams
New User
New User
Posts: 7
Joined: Fri Sep 10, 2021 5:11 pm

Exception calling RPC request: [Errno 9] Bad file descriptor: b'/downloads/Incomplete'

Post by instantdreams »

I am running Deluge 2.0.5 in a docker container. I have installed CIFS and mounted shares on the host machine.

Here is the relevant part of my /etc/fstab file:

Code: Select all

//192.168.1.93/Downloads/        /media/Downloads/     cifs  uid=1000,gid=1000,credentials=/root/.smbcredentials_svr-files,rw,iocharset=utf8,noperm  0  0
My docker compose file mounts this share as a volume:

Code: Select all

$ docker-compose --file /srv/deluge/docker-compose.yml config
services:
  deluge:
    container_name: deluge
    environment:
      DELUGE_LOGLEVEL: info
      PGID: '1000'
      PUID: '1000'
      TZ: America/Mountain
    image: lscr.io/linuxserver/deluge:amd64-2.0.5-0202202181752ubuntu20.04.1-ls140
    network_mode: container:nordlynx
    restart: unless-stopped
    volumes:
    - /srv/deluge/config:/config:rw
    - /media/Downloads/Deluge:/downloads:rw
version: '2.1'
My Deluge settings are:
  • Download to: /downloads/Incomplete | Maps to /media/Downloads/Deluge/Incomplete
  • Move completed to: /downloads/Complete | Maps to /media/Downloads/Deluge/Complete
  • Copy of .torrents files to: /downloads/Torrents | Maps to /media/Downloads/Deluge/Torrents
I have confirmed that the mounted folders have the right permissions on the host:

Code: Select all

$ ls -la /media/Downloads/Deluge/
total 0
drwxr-xr-x 2 idsvc idsvc 0 Dec  2 12:29 .
drwxr-xr-x 2 idsvc idsvc 0 Oct 25 13:42 ..
drwxr-xr-x 2 idsvc idsvc 0 Dec  2 12:50 Complete
drwxr-xr-x 2 idsvc idsvc 0 Dec  2 12:50 Incomplete
drwxr-xr-x 2 idsvc idsvc 0 Dec  2 12:42 Torrents
And inside the docker container:

Code: Select all

$ docker exec -it -u abc deluge bash
bash: /root/.bashrc: Permission denied
abc@290899de76be:/$ ls -la downloads/
total 4
drwxr-xr-x 2 abc  abc     0 Dec  2 12:29 .
drwxr-xr-x 1 root root 4096 Dec  2 11:36 ..
drwxr-xr-x 2 abc  abc     0 Dec  2 12:50 Complete
drwxr-xr-x 2 abc  abc     0 Dec  2 12:50 Incomplete
drwxr-xr-x 2 abc  abc     0 Dec  2 12:42 Torrents
My downloads complete and are accessible.

I have logging set to the INFO level, and when I check the docker logs I see the following:

Code: Select all

$ docker-compose --file /srv/deluge/docker-compose.yml logs | tail
deluge    | [Errno 9] Bad file descriptor: b'/downloads/Incomplete': Traceback (most recent call last):
deluge    |   File "/usr/lib/python3/dist-packages/deluge/core/rpcserver.py", line 326, in dispatch
deluge    |     ret = self.factory.methods[method](*args, **kwargs)
deluge    |   File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 1257, in get_free_space
deluge    |     return deluge.common.free_space(path)
deluge    |   File "/usr/lib/python3/dist-packages/deluge/common.py", line 902, in free_space
deluge    |     disk_data = os.statvfs(path.encode('utf8'))
deluge    | OSError: [Errno 9] Bad file descriptor: b'/downloads/Incomplete'
deluge    |
deluge    | --------------------------------------------------------------------------------
It is the same when I check the deluged.log file:

Code: Select all

$ cat /srv/deluge/config/deluged.log | tail

13:14:19 [ERROR   ][deluge.core.rpcserver         :1481] Exception calling RPC request: [Errno 9] Bad file descriptor: b'/downloads/Incomplete'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/rpcserver.py", line 326, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 1257, in get_free_space
    return deluge.common.free_space(path)
  File "/usr/lib/python3/dist-packages/deluge/common.py", line 902, in free_space
    disk_data = os.statvfs(path.encode('utf8'))
OSError: [Errno 9] Bad file descriptor: b'/downloads/Incomplete'
These errors repeat.

Why do they appear, and what can be done to fix this issue?
Post Reply