Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch directory not being picked up #14

Closed
ab623 opened this issue May 17, 2015 · 11 comments
Closed

Watch directory not being picked up #14

ab623 opened this issue May 17, 2015 · 11 comments

Comments

@ab623
Copy link
Contributor

ab623 commented May 17, 2015

On my system, (debian linux with vanilla docker, and running the command on the readme), transmission does not seem to pick up any torrents I place in the watch directly on my host.

I attach myself into the container and have checked that the container has picked up the file which it has, but transmission does not seem to pick up the file.

Is this an issue on anyone else container.

@ab623 ab623 changed the title Watch directly not being picked up Watch directory not being picked up May 17, 2015
@haugene
Copy link
Owner

haugene commented May 19, 2015

But everything else is running as it should? You can add torrents from the web interface and OpenVPN connects successfully? Do you have any logs?

@ab623
Copy link
Contributor Author

ab623 commented May 19, 2015

Everything else is working perfectly thankfully. What kind of logs do you
need? I will be happy to provide.

Does the watch directory work okay for you?
On 19 May 2015 22:29, "Kristian Haugene" [email protected] wrote:

But everything else is running as it should? You can add torrents from the
web interface and OpenVPN connects successfully? Do you have any logs?


Reply to this email directly or view it on GitHub
#14 (comment)
.

@haugene
Copy link
Owner

haugene commented May 20, 2015

Hmm. I was thinking of the container log first off. But if all services start up correctly then they might not reveal much. The watch directory works in my installation, an ubuntu 14.04.

Did you mount an empty directory and let transmission create the folders? Or did you create the subfolders (completed, incomplete and watch) and then mount it to the container?
Probably shouldn't have much to say, but I was thinking it might be different permissions somehow. Or file system handles, who knows.

@ab623
Copy link
Contributor Author

ab623 commented May 20, 2015

Docker log quite rightly does not show anything useful.

I created the directory manually and then mounted it in. How did you do it? I assumed the actual watching of the folder wasn't working. But I then killed the container and removed it and started a new one, (as service transmission-daemon restart gives me permission errors) and when transmission-daemon come it, it doesn't pick up the file that is already present. So it looks like the daemon isn't seeing it.

My running command is this. the installations should be the same as it is on your machine.

#!/bin/bash
docker run --privileged  -d \
-v /mounts/media/incoming/torrents/:/data \
-v /mounts/media/incoming/automatic/:/completed \
-e "PIA_USERNAME=xxx" \
-e "PIA_PASSWORD=xxx" \
-p 9091:9091 \
-e "OPEN_VPN_CONFIG=Netherlands" \
-e "TRANSMISSION_DOWNLOAD_DIR=/completed/" \
haugene/transmission-openvpn

@haugene
Copy link
Owner

haugene commented May 20, 2015

I also created it manually. Just wondered if you created the subfolders of /mounts/media/incoming/torrents/ manually or if transmission daemon created them at startup. In your caseit would only be /incomplete and /watch I guess.

I will try running the container like you describe here, hopefully later today. As a curiosity, could you test if you have the same problem if you use a setup close to the default?

That is, create a new folder to mount with all subfolders:
mkdir -p /mounts/media/incoming/torrentsTemp/completed
mkdir -p /mounts/media/incoming/torrentsTemp/incomplete
mkdir -p /mounts/media/incoming/torrentsTemp/watch

Then run container with default locations:
docker run --privileged -d
-v /mounts/media/incoming/torrentsTemp/:/data
-e "PIA_USERNAME=xxx"
-e "PIA_PASSWORD=xxx"
-p 9091:9091
haugene/transmission-openvpn

@ab623
Copy link
Contributor Author

ab623 commented May 20, 2015

Okay I was playing about, and I managed to get it working. But I'm not sure why. I think the issue was the torrent file itself. I tried it with a few others and its picking up fine.

interestingly though the "corrupted" torrent didn't get picked up by the watch, but it when I added it manually it was fine. Just a transmission thing I guess.

Oh well! All is well I guess.

@haugene
Copy link
Owner

haugene commented May 21, 2015

Ok. Closing this then.

@JRGonz
Copy link

JRGonz commented Feb 14, 2021

Would it be possible to re-open this? I am finding awkward problems with this as well. I found adding directly to the watch dir would not work but then moving the .torrent out of the dir and back in would cause it to pick up. I attempted to workaround this problem by making another dir called queue and make a cron job to mv the .torrents to the watch dir. This worked a few times but then stopped working for an unknown reason. Still when I mv out and back in again the watch dir picks them up. It is rather strange.

I am doing something similar. I am mounting a smb mount on a proxmox host and then binding it into the container.

@haugene
Copy link
Owner

haugene commented Feb 25, 2021

@JRGonz: Try the config option watch-dir-force-generic. https://github.com/haugene/docker-transmission-openvpn/blob/master/transmission/default-settings.json#L70

the watch functionality builds on inotify I think, and with some mounts, NFS and "stuff" it has proven to not work reliably. This tells Transmission to not trust the events and go look for itself. Or something to that effect.

@JRGonz
Copy link

JRGonz commented Feb 26, 2021

Thank you. I will try it. Does the watch-dir-force-generic use some sort of timer? If so can it be set for x seconds / minutes?

Update: I tested it out a bit. It seems to have done the trick. Thank you.

@haugene
Copy link
Owner

haugene commented Feb 26, 2021

Great 👍 About the timer you'd have to ask the Transmission guys. I'm guessing it's checking every few seconds, checks like that use negligible resources and is probably run very frequent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants