Log error: Could not create required directory '/config/.cache/qBittorrent/'

Hi, folks.

I’ve just downloaded linuxserver/qbittorrent:latest and configured it per the example. However, attempting to connect to the webui on port 8080 gives me a “connection was reset”, and checking the log I see
Could not create required directory '/config/.cache/qBittorrent/'
recurring every second.

The weird part is that I have /config mapped to /volume1/docker/qbittorrent/config on my host, and the container has successfully created other directories below it:
root@Tower:~# ls -al /volume1/docker/qbittorrent/config
total 0
dr-xr-xr-x+ 1 Torrents users 68 Aug 19 23:57 .
dr-xr-xr-x+ 1 Torrents users 30 Aug 19 22:27 ..
dr-xr-xr-x+ 1 Torrents users 0 Aug 19 23:56 data
dr-xr-xr-x+ 1 Torrents users 32 Aug 19 23:56 qBittorrent

Furthermore, even if I manually create and chown /volume1/docker/qbittorrent/config/.cache/qBittorrent/ and restart the container, I get the same error - it’s as if the error message is not reflecting the actual problem.

Any and all suggestions welcomed.

Thanks!

I’ve also tried the unstable release; same problem.

please share your docker run/compose and your docker logs.

Will post those after lunch. In the meantime, some more information:

I created a clone and removed the /config mapping so it would use its own internal storage for /config… and it works! Of course the configuration won’t survive a container clear since its not externalized, but it does confirm that the error message is indeed referencing the correct directory:

root@Tower:~# docker exec -it qbittorrent-copy /bin/bash
root@qbittorrent-copy:/# ls -al /config
total 4
drwxr-xr-x 1 abc users 68 Aug 20 11:45 .
drwxr-xr-x 1 root root 258 Aug 20 11:41 ..
-rw------- 1 abc users 115 Aug 20 11:46 .bash_history
drwxr-xr-x 1 abc users 22 Aug 20 11:41 .cache
drwxr-xr-x 1 abc users 22 Aug 20 11:41 data
drwxr-xr-x 1 abc users 80 Aug 20 11:52 qBittorrent

root@qbittorrent-copy:/# ls -al /config/.cache/
total 0
drwxr-xr-x 1 abc users 22 Aug 20 11:41 .
drwxr-xr-x 1 abc users 68 Aug 20 11:45 ..
drwxr-xr-x 1 abc users 0 Aug 20 11:41 qBittorrent

So it would appear to be specific to the externalized /cache volume mapping, or Synology’s Docker implementation.

OK. I’m using Synology’s Docker implementation which generates and hides the actual docker-compose command, but here’s the settings of the resulting container:

{
   "cap_add" : [],
   "cap_drop" : [],
   "cmd" : "",
   "cpu_priority" : 50,
   "devices" : null,
   "enable_publish_all_ports" : false,
   "enable_restart_policy" : true,
   "enabled" : false,
   "entrypoint_default" : "/init",
   "env_variables" : [
      {
         "key" : "PATH",
         "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      },
      {
         "key" : "HOME",
         "value" : "/config"
      },
      {
         "key" : "LANGUAGE",
         "value" : "en_US.UTF-8"
      },
      {
         "key" : "LANG",
         "value" : "en_US.UTF-8"
      },
      {
         "key" : "TERM",
         "value" : "xterm"
      },
      {
         "key" : "XDG_CONFIG_HOME",
         "value" : "/config"
      },
      {
         "key" : "XDG_DATA_HOME",
         "value" : "/config"
      },
      {
         "key" : "UMASK_SET",
         "value" : "022"
      },
      {
         "key" : "PGID",
         "value" : "100"
      },
      {
         "key" : "PUID",
         "value" : "1032"
      },
      {
         "key" : "WEBUI_PORT",
         "value" : "8080"
      },
      {
         "key" : "TZ",
         "value" : "US/Central"
      }
   ],
   "exporting" : false,
   "id" : "78a64f89d6a3efa6f4bd69be788ba934ae8fa75121732b1f6f10d9ddd3b525a6",
   "image" : "linuxserver/qbittorrent:latest",
   "is_ddsm" : false,
   "is_package" : false,
   "links" : [],
   "memory_limit" : 0,
   "memory_limit_slider" : 1024,
   "name" : "qbittorrent",
   "network" : [
      {
         "driver" : "bridge",
         "name" : "bridge"
      }
   ],
   "network_mode" : "bridge",
   "port_bindings" : [
      {
         "container_port" : 6881,
         "host_port" : 6881,
         "type" : "tcp"
      },
      {
         "container_port" : 6881,
         "host_port" : 6881,
         "type" : "udp"
      },
      {
         "container_port" : 8080,
         "host_port" : 8080,
         "type" : "tcp"
      }
   ],
   "privileged" : false,
   "shortcut" : {
      "enable_shortcut" : false
   },
   "use_host_network" : false,
   "volume_bindings" : [
      {
         "host_volume_file" : "/docker/qbittorrent/downloads",
         "mount_point" : "/downloads",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/docker/qbittorrent/config",
         "mount_point" : "/config",
         "type" : "rw"
      }
   ]
}

and the log:

root@Tower:~# docker logs --tail=50 -f qbittorrent
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1032
User gid:    100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Could not create required directory '/config/.cache/qBittorrent/'
Could not create required directory '/config/.cache/qBittorrent/'
Could not create required directory '/config/.cache/qBittorrent/'
Could not create required directory '/config/.cache/qBittorrent/'
Could not create required directory '/config/.cache/qBittorrent/'
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Again, this works fine if I remove the external /config volume binding, but even with it, it successfully creates other directories but not .cache.

Thanks!

Solved! Despite chowning the /docker/qbittorrent directory (and below) to the UID/GID I am using, that user was denied access to the parent directory within Synology’s Disk Station Manager. I’m not even sure how that gets implemented at the filesystem level, but apparently it was enough to prevent Docker from creating the .cache directory despite the fact that it could happily create the other directories. After granting the user r/w access via DSM, it’s all working perfectly.

Sorry for the false alarm. Hopefully my experience can save another Synology user some time in the future.

Cheers!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.