Unable to move files from incomplete folder

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
helleon
Posts: 5
Joined: Fri Jan 29, 2016 1:35 pm

Unable to move files from incomplete folder

Post by helleon »

My Transmission 2.84(14307) always can not move files from incomplete folder to complete folder, if files belong to a subfolder. It create a download folder in same name, but not move the files to complete. But if torrent is not contain any folder, just files only, all files will be moved to complete folder.

For example:
My incomplete folder: /volume1/share/incoming/
Complete folder: cd /volume1/download/

1.torrent is a file: aa.avi
transmission create a file /volume1/share/incoming/aa.avi.part, and then move aa.avi to /volume1/download/ after download completed.

2.torrent is a folder bb, contain bb.avi.
transmission create a file /volume1/share/incoming/bb/bb.avi.part. after finish, create a folder /volume1/download/bb, but bb.avi still in /volume1/share/incoming/bb/

setting.json:

Code: Select all

    "peer-id-ttl-hours": 6,                             
    "peer-limit-global": 200,                           
    "peer-limit-per-torrent": 30,                       
    "peer-port": 54321,                                 
    "peer-port-random-high": 12345,                     
    "peer-port-random-low": 49152,                      
    "peer-port-random-on-start": false,                 
    "peer-socket-tos": "default",                       
    "pex-enabled": true,                                
    "pidfile": "/usr/local/transmission/var/transmission.pid",
    "port-forwarding-enabled": true,                          
    "preallocation": 2,                                       
    "prefetch-enabled": 1,                                    
    "queue-stalled-enabled": true,                            
    "queue-stalled-minutes": 30,                              
    "ratio-limit": 2,                                         
    "ratio-limit-enabled": false,                             
    "rename-partial-files": true,                             
    "rpc-authentication-required": true,                      
    "rpc-bind-address": "0.0.0.0",                            
    "rpc-enabled": true,                                      
    "rpc-password": "password",
    "rpc-port": 9876,                                                   
    "rpc-url": "/transmission/",                                        
    "rpc-username": "username",                                          
    "rpc-whitelist": "127.0.0.1",                                       
    "rpc-whitelist-enabled": false,                                     
    "scrape-paused-torrents-enabled": true,                             
    "script-torrent-done-enabled": false,                               
    "script-torrent-done-filename": "",                                 
    "seed-queue-enabled": false,                                        
    "seed-queue-size": 10,                                              
    "speed-limit-down": 100,                                            
    "speed-limit-down-enabled": false,                                  
    "speed-limit-up": 100,                                              
    "speed-limit-up-enabled": false,                                    
    "start-added-torrents": true,                                       
    "trash-original-torrent-files": false,                              
    "umask": 0,                                                         
    "upload-slots-per-torrent": 14,                                     
    "utp-enabled": true,                                                
    "watch-dir": "/volume1/share/torrent",                              
    "watch-dir-enabled": true   ,
folder permission and usergroup:

Code: Select all

drwxrwxrwx   11 transmis users         4096 Jan 30 00:00 download

Code: Select all

drwxrwxrwx    3 transmis users         4096 Jan 30 00:33 incoming
drwxrwxrwx    2 transmis users         4096 Jan 21 21:31 torrent
Any comments?
helleon
Posts: 5
Joined: Fri Jan 29, 2016 1:35 pm

Re: Unable to move files from incomplete folder

Post by helleon »

x190 wrote:
vDSM transmission-daemon
error moving...Bad file descriptor (torrent.c:3099)...
Try changing "/volume1/download/" to "/volume1/share/download/".

viewtopic.php?f=1&t=3415
sorry for unsuited infomation, download folder must be that path, I will try to change incomplete to /volume1/incomplete.
helleon
Posts: 5
Joined: Fri Jan 29, 2016 1:35 pm

Re: Unable to move files from incomplete folder

Post by helleon »

x190 wrote:Is memory corruption an issue? Quick search brought up: http://forum.synology.com/enu/viewtopic ... 0&t=105776.
tried to use /volume/incoming as incomplete folder, same result:

Code: Select all

Bad file descriptor (torrent.c:3099)
The page you mentioned is talking about virtual machine and DSM 6, didn't find any topic about memory corruption.

By the way, they are running virtual machine under DSM, Im running DSM under virtual machine, :lol: :lol:
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: Unable to move files from incomplete folder

Post by mike.dld »

@x190 I think original error is lost in this case. Between the time the error occurred and the time `tr_strerror()` is called there's a number of other calls which may have changed the value of `errno`, specifically `read()`, `write()`, and `close()` (inside `tr_close_file()`). Since we're getting EBADF my guess would be that we were unable to open the file (either source or destination) in the first place, and the cause of this is unknown.

Note I'm talking about r14306 and earlier here. Later revisions have better error handling and should print the actual error.

@helleon You could try running the daemon in foreground under strace, with an `-e trace=file` filter. If you're able to build from source, another way would be to try that (with current trunk) and look at log messages again.
helleon
Posts: 5
Joined: Fri Jan 29, 2016 1:35 pm

Re: Unable to move files from incomplete folder

Post by helleon »

@x190 Using Synology DSM system, not sure if it is a stand linux ext file system, but disk space is certainly enough.

Code: Select all

vDSM> df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       2.3G  646M  1.6G  30% /
/tmp           1004M  128K 1004M   1% /tmp
/run           1004M  1.7M 1002M   1% /run
/dev/shm       1004M     0 1004M   0% /dev/shm
none            4.0K     0  4.0K   0% /sys/fs/cgroup
/dev/md2        1.4T  332G  1.1T  25% /volume1

vDSM> fdisk -l
Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks  Id System
/dev/sdc1               1         311     2490240  fd Linux raid autodetect
/dev/sdc2             311         572     2097152  fd Linux raid autodetect
/dev/sdc3             588      182389  1460317584  fd Linux raid autodetect
@mike.dld Moved files success after used command line launch transmission, I assume only different is that transmission was launched by root. Detail please see:

Code: Select all

24985 transmis  178m S    /usr/local/transmission/bin/transmission-daemon -g /usr/local/transmission/var/ -x /usr/local/transmission/var/transmission.pid
25848 root      100m S    /usr/local/transmission/bin/transmission-daemon -g /usr/local/transmission/var/ -x /usr/local/transmission/var/transmission.pid -e /volume1/download/trace.log
Anyway, this may solved my issue, I will run it by root next time.
helleon
Posts: 5
Joined: Fri Jan 29, 2016 1:35 pm

Re: Unable to move files from incomplete folder

Post by helleon »

x190 wrote:
Anyway, this may solved my issue, I will run it by root next time.
So this is apparently a permissions/ownership issue. To fix*, you would need to search the forum or Synology's forum or other sources.

*Likely involves changes to your start script/method.
Yes, I will. Thank you so much, and @mike.dld as well, really appreciated.
Post Reply