Watch-dir on network folder

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
franchu29
Posts: 7
Joined: Mon Apr 25, 2016 9:24 pm

Watch-dir on network folder

Post by franchu29 »

Hello, i configured a watch-dir in a network folder, the problem is that only works when daemon starts, then don't work

How can i configure to watch a network folder permanent?
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: Watch-dir on network folder

Post by mike.dld »

What version of Transmission are you using? There have been changes in this area in 2.90, so if you didn't try 2.90 or later yet please do.
franchu29
Posts: 7
Joined: Mon Apr 25, 2016 9:24 pm

Re: Watch-dir on network folder

Post by franchu29 »

i am in 2.84, i will try 2.90
franchu29
Posts: 7
Joined: Mon Apr 25, 2016 9:24 pm

Re: Watch-dir on network folder

Post by franchu29 »

I am on raspberry, how can i update transmisión?,
I tried sudo apt-get update & upgrade but dont update.

I tried to reinstall but install the same versión

How can i update?
PapaXris
Posts: 5
Joined: Tue Aug 16, 2016 7:41 pm

Re: Watch-dir on network folder

Post by PapaXris »

mike.dld wrote:What version of Transmission are you using? There have been changes in this area in 2.90, so if you didn't try 2.90 or later yet please do.
Wanted to follow-up on this. I have a Linux Host that was using v2.82 and had the same issues with the watch folder over a network share using cifs protocol. Version 2.82 was also having issues connecting to the torrents via the cifs share upon reboot of the host. The simple solution was to stop the daemon, then start it again to "touch" the files and see the share. After the daemon stop/start (reload would not solve the issue) the transmission service would work fine.

Now I have updated transmission to v2.92 and I still have the same issues with the watch folder. But, of note, when the transmission host is rebooted it picks up the torrent cifs share without issue and automatically starts to serve the torrents without user intervention.

Having the watch folder actively queue up the torrents would be a monumental addition. I would be happy to assist and report my findings.
blinding
Posts: 29
Joined: Mon Mar 07, 2016 12:48 am

Re: Watch-dir on network folder

Post by blinding »

Is it possible to make the watch directory local to the host running transmission and access it over the network from the client? I.E. have your raspberry share the watch dir and then access it over the network from the system you are putting files in the watch dir. I ran that way for a while and it functioned correctly.

Do you access the downloaded files via network share?
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: Watch-dir on network folder

Post by mike.dld »

@PapaXris, are there any messages related to watchdir in daemon's log during startup (apart from those about adding found files)?

With 2.90+, I've added a "watch-dir-force-generic" boolean option support to the daemon. What you could do is add

Code: Select all

...
    "watch-dir-force-generic": true,
....
to settings.json which will (as its name suggests) force the use of generic watching (checking directory for new files each 10 seconds). I was actually hoping that this fallback will happen automatically after daemon tries and fails to use inotify with smb/cifs-mounted directory, but seems like this is not happening for some reason.
PapaXris
Posts: 5
Joined: Tue Aug 16, 2016 7:41 pm

Re: Watch-dir on network folder

Post by PapaXris »

mike.dld wrote:@PapaXris, are there any messages related to watchdir in daemon's log during startup (apart from those about adding found files)?

With 2.90+, I've added a "watch-dir-force-generic" boolean option support to the daemon. What you could do is add

Code: Select all

...
    "watch-dir-force-generic": true,
....
to settings.json which will (as its name suggests) force the use of generic watching (checking directory for new files each 10 seconds). I was actually hoping that this fallback will happen automatically after daemon tries and fails to use inotify with smb/cifs-mounted directory, but seems like this is not happening for some reason.

I checked the following:

/var/log/syslog

Nothing related to the watchdir was listed among all the other transmission related logging. Is there another log I need to check? Perhaps you can lead me in the right direction to help you troubleshoot it further.

I did end up making the following entry:

"watch-dir-force-generic": true,

In the settings.json config. This workaround worked perfectly as soon as I added a torrent to the watch folder. I appreciate your response and contribution. Please let me know how I can further assist.
PapaXris
Posts: 5
Joined: Tue Aug 16, 2016 7:41 pm

Re: Watch-dir on network folder

Post by PapaXris »

blinding wrote:Is it possible to make the watch directory local to the host running transmission and access it over the network from the client? I.E. have your raspberry share the watch dir and then access it over the network from the system you are putting files in the watch dir. I ran that way for a while and it functioned correctly.

Do you access the downloaded files via network share?
Thanks for your input. I have a need for the watch directory to be on a network share to facilitate adding torrents via remote systems. Plus, I wanted to share my findings so others encountering the same issue can learn and or chime in. As well as, help facilitate further development on the Transmission project by nailing down its bugs. Thanks again for offering an alternative, but I believe we are on the right track with the watchdir on a network share now.
PapaXris
Posts: 5
Joined: Tue Aug 16, 2016 7:41 pm

Re: Watch-dir on network folder

Post by PapaXris »

mike.dld wrote:@PapaXris, are there any messages related to watchdir in daemon's log during startup (apart from those about adding found files)?

With 2.90+, I've added a "watch-dir-force-generic" boolean option support to the daemon. What you could do is add

Code: Select all

...
    "watch-dir-force-generic": true,
....
to settings.json which will (as its name suggests) force the use of generic watching (checking directory for new files each 10 seconds). I was actually hoping that this fallback will happen automatically after daemon tries and fails to use inotify with smb/cifs-mounted directory, but seems like this is not happening for some reason.
As a follow-up I made sure that inotify was enabled within my distro installation. I ran the following:

sysctl fs.inotify.max_user_watches

And it returned a watch value of 8192. I wanted to eliminate the possibility that inotify wasn't enabled during the OS installation.
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: Watch-dir on network folder

Post by mike.dld »

The thing is, inotify doesn't (correctly, if at all) work with cifs shares, at least using standard Linux implementation: https://lists.samba.org/archive/linux-c ... 04318.html.
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: Watch-dir on network folder

Post by mike.dld »

@x190, are you suggesting to use generic implementation when -c is passed? Not sure this is the right thing to do...
PapaXris
Posts: 5
Joined: Tue Aug 16, 2016 7:41 pm

Re: Watch-dir on network folder

Post by PapaXris »

mike.dld wrote:The thing is, inotify doesn't (correctly, if at all) work with cifs shares, at least using standard Linux implementation: https://lists.samba.org/archive/linux-c ... 04318.html.
Thanks for providing the background on the technicalities of inotify with CIFS mounts, it was an interesting read. I noticed it was dated in 2009; if this hasn't had any development within the kernel in the last 7 years, then, your watchdir boolean check is the only elegant solution available when one uses this configuration.

I would be happy to document and annotate this for other users to have a clear understanding of the limitations as well as the workaround available from v2.90+ . Please let me know how I can assist.
Post Reply