Transmission 3.00-18 No space left on device

Hi,
I've updated my router firmware to 22.03.5 and installed transmission-daemon - 3.00-18.

After starting a download I've faced the "access denied error" first, then after switching transmission user to root the error has been changed to "No space left on device".
It was only happening for larger torrents (2GB+)

After many tricks to fix it (even reinstalling router firmware and formatting my USB extroot disk - without any success) I've disabled the 'incomplete_dir' option... and the download started to work!

So I assume something is wrong with handling the incomplete_dir parameter and my setting is ignored, ending up with the daemon trying to download the files to some default /etc/var (?) directory which is on a partition that can't fit it.

Where can I report this bug? Should I contact the transmission developers or someone else is working on the Openwrt package to adapt it to router OS?

Best regards
Ygrek

But how much space do you have to begin with?

Does this mean the function takes one dir for the complete file and one dir for the file under download which means 2x2GB+

Probably no bug, but a config error.

But if you can't figure out where the parameter is set, softlink the dir instead.

Download failed after ~200-250 MB so transmission tried to save it to /tmp dir probably

Transmission config takes these 2 parameters
download_dir - where to move files after finished downloading
incomplete_dir - where to save files while downloading

Do you suggest that the error is on my side? It happened after upgrade of firmware and transmission, while my config hasn't been changed.

Could you please elaborate? Should I change it in /etc/init.d/transmission ?

and you sure it hasn't been reset ?

nope, you should redirect the location of the destination dir

I'm debugging the /etc/init.d/transmission and it looks like it relies on conditions based on flag equal to 1 or 0:

 [ "$incomplete_dir_enabled" = "0" ] || service_dirs="$service_dirs $incomplete_dir"

But when I output the flag value using echo "incomplete dir enabled value = $incomplete_dir_enabled" the scripts prints incomplete dir enabled value = false

Should this work this way or the script is broken and should check if variable is false instead of 0 ?

@neheb Something is wrong with the init.d script as when I used service transmission start it hasn't even created resume, blocklists, torrents dirs and stats.json file.

My problems were fixed when I've started the transmission-daemon manually providing -g parameter (and --log-debug --logfile params too).

did you enable the transmission service/daemon ?

now that you've ran transmission as root, the "correct" startup will fail, due to root parmissions on all the dirs and files created during start.


Isn't that something which is natural that sevice is enabled ? When I call service transmission start isn't that enough to have everything working as expected?

I have set the transmission config in /etc/config/transmission to run as root and I'll keep it this way until the problem is fixed.

The config, for reference:

root@OpenWrt:~# cat /etc/config/transmission
config transmission
        option enabled 1
        option config_dir '/mnt/data/transmission'
        option config_overwrite '1'
        option user 'root'
        option group 'root'
        option mem_percentage 50
        option nice 10
        option web_home ''
        option alt_speed_down 50
        option alt_speed_enabled false
        option alt_speed_time_begin  540
        option alt_speed_time_day 127
        option alt_speed_time_enabled false
        option alt_speed_time_end 1020
        option alt_speed_up 50
        option bind_address_ipv4 '0.0.0.0'
        option bind_address_ipv6 '::'
        option blocklist_enabled false
        option blocklist_url ''
        option cache_size_mb 24
        option dht_enabled true
        option download_dir '/mnt/data/transmission/done'
        option download_queue_enabled true
        option download_queue_size 4
        option encryption 1
        option idle_seeding_limit 30
        option idle_seeding_limit_enabled false
        option incomplete_dir '/mnt/data/transmission/incomplete'
        option incomplete_dir_enabled true
        option lazy_bitfield_enabled true
        option lpd_enabled false
        option message_level 1
        option peer_congestion_algorithm ''
        option peer_limit_global 240
        option peer_limit_per_torrent 60
        option peer_port 51413
        option peer_port_random_high 65535
        option peer_port_random_low 49152
        option peer_port_random_on_start false
        option peer_socket_tos 'default'
        option pex_enabled true
        option port_forwarding_enabled true
        option preallocation 0
        option prefetch_enabled true
        option queue_stalled_enabled true
        option queue_stalled_minutes 30
        option ratio_limit 2.0000
        option ratio_limit_enabled false
        option rename_partial_files true
        option rpc_authentication_required false
        option rpc_bind_address '0.0.0.0'
        option rpc_enabled true
        option rpc_host_whitelist '127.0.0.1,192.168.1.*'
        option rpc_host_whitelist_enabled false
        option rpc_password ''
        option rpc_port 9091
        option rpc_url '/transmission/'
        option rpc_username ''
        option rpc_whitelist '127.0.0.1,192.168.1.*'
        option rpc_whitelist_enabled false
        option scrape_paused_torrents_enabled true
        option script_torrent_done_enabled false
        option script_torrent_done_filename ''
        option seed_queue_enabled false
        option seed_queue_size 10
        option speed_limit_down 35000
        option speed_limit_down_enabled true
        option speed_limit_up 20
        option speed_limit_up_enabled false
        option start_added_torrents true
        option trash_original_torrent_files false
        option umask 2
        option upload_slots_per_torrent 14
        option utp_enabled true
        option scrape_paused_torrents true
        option watch_dir_enabled false
        option watch_dir ''

https://openwrt.org/docs/guide-user/services/downloading_and_filesharing/transmission#basic_setup

Ah so you meant not the service being enabled ( by command service transmission enable) but if the /etc/config/transmission parameter enabled is set to true. As you can see in my previous post it is.

I really can't reproduce the issue.
Just installed it, and it starts if enabled, dir gets created in /tmp, but you can simply softlink it elsewhere ...

Only thing you seem to have deleted, is the rpc port param, which is also the port for the transmission webui (unless there's a default specified elsewhere).

Have you set the incomplete_dir_enabled to true and it uses the incomplete_dir property correctly?

it appears to, but I had to modify the /etc/init.d/transmission and add
procd_add_jail_mount_rw "$config_dir/incomplete" to the list of dirs,
below line procd_add_jail transmission log, around row 160.

1 Like

Thanks,

I don't know what this command exactly does but I've added it this way to my /etc/init.d/transmission and now I can see that the file is downloaded correctly and saved to the incomplete dir in the meantime.

 [ "$incomplete_dir_enabled" = "1" ] && [ -d "$incomplete_dir" ] && {
     procd_add_jail_mount_rw "$incomplete_dir"
}

Isn't that something that should be added to the official package so no one will run into the same problem as me ?

jail is a way of isolating processes from each other, and only providing access to resources they require.
the incomplete dir probably wasn't added, since it's not a part of the default config in openwrt.

btw, the issue's already reported in https://github.com/openwrt/packages/issues/19403
I would suggest you add your solution to the ticket, it's prettier than the one provided here (same as in the ticket).

Nice find!

I can see that on master branch the issue is fixed already with

[ "$incomplete_dir_enabled" = "1" ] && procd_add_jail_mount_rw "$incomplete_dir"

So I think it's not needed to add anything more to that github topic as the next release will contain the fix anyway.

Thank you so much for your help.

Cheers!

1 Like

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