Project

General

Profile

Bug #1348

Transmission does not load all torrents from the watch directory

Added by Mourdsoe over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Apps
Target version:
-
Start date:
04/22/2014
Due date:
% Done:

0%


Description

Hello, I have a similar issue to the one detailed here: https://bugs.amahi.org/issues/1084

I detailed my problem on the forums here: https://forums.amahi.org/viewtopic.php?f=26&t=5333&p=29547

Basically transmission will pickup a single torrent from the watch directory, however if more than one is located in the watch directory, it will only load one and delete all of them from the directory.

It should also be noted that right now, Im just copying the .torrent files into the watch directory from a Windows client

Thank you in advance

History

#1 Updated by bigfoot65 over 7 years ago

  • Status changed from New to Feedback
  • Assignee set to Mourdsoe

Not sure if this is the fix, but there is a package missing that the watch cron daemon uses called netstat.

Please do the following:

yum install net-tools

Hoping this is the fix. Please report back.

#2 Updated by Mourdsoe over 7 years ago

System indicated the packages was already installed.

Thanks

#3 Updated by bigfoot65 over 7 years ago

Can you post /etc/cron.d/amahi-transmission here? Did not change it to match the wiki? If so, that may be part of the problem.

The wiki guidance is not specifically for Amahi 7.

#4 Updated by Mourdsoe over 7 years ago

Sorry, I may not be quite sure what you are asking. I ran /etc/cron.d/amahi-transmission and it said No such file or dir. I then tried to navigate to it and same thing.

#5 Updated by bigfoot65 over 7 years ago

I want you to post the contents of the file /etc/cron.d/amahi-transmission or amahi-transmission-watch. Not sure what it's called on Amahi 7.

I need to see that it correctly matches the app.

#6 Updated by Mourdsoe over 7 years ago

cat amahi-transmission-watch:

# watch for torrent files in the torrents directory
*/5 * * * * transmission if [ "`netstat -an | grep :9091 | wc -l`" != "0" ]; then transmission-remote localhost:9091 -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent; fi

#7 Updated by bigfoot65 over 7 years ago

Ok, good. Did you add a user name and password to the settings.json file? If so, then you need to add it to the amahi-transmission-watch file too.

If not, then we will need to look deeper for the problem. Might consider checking /var/log/cron for errors as well.

#8 Updated by Mourdsoe over 7 years ago

Nope, the only thing I changed was to disable the whitelist and changed the maimum DLs.

Here is the output from the log:

Apr 23 12:01:01 localhost CROND[28687]: (root) CMD (run-parts /etc/cron.hourly)
Apr 23 12:01:01 localhost run-parts[28687]: (/etc/cron.hourly) starting 0anacron
Apr 23 12:01:01 localhost run-parts[28696]: (/etc/cron.hourly) finished 0anacron
Apr 23 12:01:01 localhost run-parts[28687]: (/etc/cron.hourly) starting hda-update
Apr 23 12:01:27 localhost run-parts[28780]: (/etc/cron.hourly) finished hda-update
Apr 23 12:05:01 localhost CROND[29715]: (transmission) CMD (if [ "`netstat -an | grep :9091 | wc -l`" != "0" ]; then transmission-remote localhost:9091 -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent; fi)
Apr 23 12:10:01 localhost CROND[31661]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Apr 23 12:10:01 localhost CROND[31662]: (transmission) CMD (if [ "`netstat -an | grep :9091 | wc -l`" != "0" ]; then transmission-remote localhost:9091 -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent; fi)
Apr 23 12:15:01 localhost CROND[981]: (transmission) CMD (if [ "`netstat -an | grep :9091 | wc -l`" != "0" ]; then transmission-remote localhost:9091 -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent; fi)
Apr 23 12:20:01 localhost CROND[2717]: (transmission) CMD (if [ "`netstat -an | grep :9091 | wc -l`" != "0" ]; then transmission-remote localhost:9091 -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent; fi)
Apr 23 12:20:01 localhost CROND[2723]: (root) CMD (/usr/lib64/sa/sa1 1 1)
[root@localhost cron.d]#

I put three torrents in the directory and only one was added to transmission, all .torrent files were deleted.

#9 Updated by bigfoot65 over 7 years ago

Not seeing anything out of the ordinary. Looks like this one will take more time to research. If you come up with anything, please let us know.

#10 Updated by Mourdsoe over 7 years ago

I can confirm that not all torrents get loaded when placed in the watch folder from Sickbeard, so I don't think it's a windows problem

let me know if there is anything else I can try, as it kinda makes the watch directory a bit pointless

#11 Updated by bigfoot65 over 7 years ago

What are the file permissions, i.e. who owns them and are they read/writable by all?

#12 Updated by Mourdsoe over 7 years ago

Here you go. It's weird if it's a permission issue since one always gets added, no?

http://screencast.com/t/1lYas3YmJ

Thanks for your help

#13 Updated by bigfoot65 over 7 years ago

It may be a permission issue since all the files are owned by root. The cron job runs as transmission, not root.

Change transmission to root in /etc/cron.d/amahi-transmission-watch. Let's see if that makes a difference.

It seems to be permissions related. Not sure why one file would move, but other would not.

If this does not work, you can change it back and we will have to explore other options.

#14 Updated by Mourdsoe over 7 years ago

No dice :(

#15 Updated by Mourdsoe over 7 years ago

Any update on this? I thought it may be the amount of time it takes my transmission to load multiple torrent files. I have seen the same behavior when manually adding multiple torrents and then trying to delete torrent file before transmission has finished. I tried testing this by removing the "&& rm -f /var/hda/files/torrents/*.torrent" from the cron job, it however still only brought in a single torrent.

Thanks

#16 Updated by bigfoot65 over 7 years ago

Sorry, nothing new on this issue. I will try to take a look at it again this week, but can't promise anything.

#17 Updated by bigfoot65 over 7 years ago

Ok, found some time tonight to work on it. I think I have a fix. It will require you uninstall and reinstall the app.

Please try it out and let me know if it works. The cron job will run every 5 minutes and writes to /var/log/torrentwatch.log.

#18 Updated by Mourdsoe over 7 years ago

That works! However, im now left with a bunch of .torrent.added files that dont get removed. Is this a setting I set?

Thanks for all your help

#19 Updated by bigfoot65 over 7 years ago

  • Status changed from Feedback to Closed

You can update the script, /usr/share/transmission/torrentwatch.sh and change:

mv "$file" "$file".added

to

rm -f "$file"

#20 Updated by Mourdsoe over 7 years ago

Thanks, it seems the watchdog keeps starting the server so I cannot remove my watch directory settings from the config. Every time I go to settings-servers and click the watchdog off, it gives me the warning, I hit ok, but then it just checks itself back on.

Thoughts?

Thanks

#21 Updated by bigfoot65 over 7 years ago

Copy the torrentwatch.sh file to a different location. Make the changes, then copy it back to /usr/share/transmission overwritting the current one.

#22 Updated by Mourdsoe over 7 years ago

Sorry, I meant changes to the /var/lib/transmission/.config/transmission-daemon/settings.json file. Same process?

#23 Updated by bigfoot65 over 7 years ago

Should work. If not, check the wiki for guidance.

Also available in: Atom