[Support] binhex - rTorrentVPN


Recommended Posts

6 hours ago, pervin_1 said:

 

Hey binhex, can you explain how to use this docker image in multiple containers, meaning, if I can use this docker image with multiple running rtorrent clients? 

 

I tried to do it myself, started by creating brand new with completely different ports to avoid port conflicts, but for some reason, it does not work, I can see the folder created for the new container, but nothing inside. Can you explain the proper way of doing all this, please. Thank you!!!

 

yeahs sounds like your close, so there are 3 things you need to do:-

 

1. use unique ports on the host side for each container (sounds like you have done this)

2. use unique host path for the /config volume mapping - required as each container needs a clean area to create configs etc

3. ensure your vpn provider allows concurrent connections - not all do, i know pia allows 5 (i think) concurrent connections.

Link to comment
2 hours ago, binhex said:

 

yeahs sounds like your close, so there are 3 things you need to do:-

 

1. use unique ports on the host side for each container (sounds like you have done this)

2. use unique host path for the /config volume mapping - required as each container needs a clean area to create configs etc

3. ensure your vpn provider allows concurrent connections - not all do, i know pia allows 5 (i think) concurrent connections.

 

1. Unique ports are done, verified with Unraid as well to make sure no conflicts.

2. Also used unique path for /config volume mapping, as you said, each container requires a clean area for config folders and files.

3. Don't use VPN anymore, I am with private trackers at the moment, Privoxy disabled, Flood UI disabled.

 

I tried again this morning, I named the new config folder on the host as "binhex-rtorrent", during the installation, which is unique, and for some reason, docker merged the new container with the old running one after the installation, it does not create the config files for some reason, check the picture down below, please:

 

Screenshot_2018-04-24_at_8.09.45_AM.png

 

 

Link to comment
49 minutes ago, pervin_1 said:

 

1. Unique ports are done, verified with Unraid as well to make sure no conflicts.

2. Also used unique path for /config volume mapping, as you said, each container requires a clean area for config folders and files.

3. Don't use VPN anymore, I am with private trackers at the moment, Privoxy disabled, Flood UI disabled.

 

I tried again this morning, I named the new config folder on the host as "binhex-rtorrent", during the installation, which is unique, and for some reason, docker merged the new container with the old running one after the installation, it does not create the config files for some reason, check the picture down below, please:

 

Screenshot_2018-04-24_at_8.09.45_AM.png

 

 

 

hmm ok post the supervisord.log file.

Link to comment

@pervin_1 ahh its a bug!, a rogue function slipped into one of the scripts, god knows how it got committed but its there (late night coding with beer perhaps hehe), i will remove it and rebuild, obviously this only affects you if you turn off the vpn (thus why i havent spotted it :-) ), watch out for a new image.

Edited by binhex
Link to comment
24 minutes ago, binhex said:

ahh its a bug!, a rogue function slipped into one of the scripts, god knows how it got committed but its there (late night coding with beer perhaps hehe), i will remove it and rebuild, obviously this only affects you if you turn off the vpn (thus why i havent spotted it :-) ), watch out for a new image.

Is this in response to my post above? :D

 

Guess not, I just updated and tested with VPN enabled. When the download finishes it cant find it during check. But restarting the docker container fixes it. - which I would have to do every time something has finished downloading, so its maybe the rutorrent gui that just shows it wrong?

bar.png

Edited by JohanSF
Link to comment
19 minutes ago, JohanSF said:

Is this in response to my post above? :D

 

hehe nope that was for pervin (edited my post), your issue is probably due to misconfiguration of the volume mappings and/or rutorrent/rtorrent.

 

so can you send a screenshot of your unraid/docker webui showing how the container is configured with advanced option turned on, im interested in the volume mappings mainly as the rest must be configured correctly as you can see the web ui and thus must have a vpn tunnel working.

 

as well as that can you also post a screenshot showing how you have configured rutorrent for incomplete and complete downloads, i want to see what the paths are.

Link to comment
16 minutes ago, binhex said:

 

hehe nope that was for pervin (edited my post), your issue is probably due to misconfiguration of the volume mappings and/or rutorrent/rtorrent.

 

so can you send a screenshot of your unraid/docker webui showing how the container is configured with advanced option turned on, im interested in the volume mappings mainly as the rest must be configured correctly as you can see the web ui and thus must have a vpn tunnel working.

 

as well as that can you also post a screenshot showing how you have configured rutorrent for incomplete and complete downloads, i want to see what the paths are.

Even though it works perfectly when vpn is set to "no"?

 

I download straight to the completed folder, and I reference the /media folder. I have to reference the same upper layer folder in rutorrent and sonarr/radarr for hardlinking to work (after much debugging long ago). Folder structure for files I download with rutorrent:

/media

   /downloads/completed

   /movies
   /tv

   /music

image.thumb.png.2305c8b3aa37fbbe7327be0f6f60376e.png
image.thumb.png.fee47fb0ecac1be828081bb7b680cb67.png

Edited by JohanSF
Link to comment
1 minute ago, JohanSF said:

Even though it works perfectly when vpn is set to "no"?

 

i find that really hard to believe, are you 100% sure it doesn't do the same thing when the vpn tunnel is turned off? its the exact same app, same config, same everything, it just doesn't run up openvpn and configure it, but that wouldn't interfere with finished downloads so i would be very surprised if that were the case, you are using the same container right?, you are just setting VPN_ENABLED to 'no' ?

Link to comment

Everything is the same.

Except in rtorrent.rc I also comment/uncomment this line:

port_range = 49160-49160

Use it when VPN_ENABLED is "no" and vice versa.

Let me test with privoxy set to off, I guess privoxy is only really doing anything when vpn_enabled is yes?
Edit: Nope, same issue when privoxy is set to off disabling proxy in sonarr.

 

Btw. I posted the supervisord.log from when starting the container with vpn_enabled = "yes" and I added a torrent with sonarr mapped to "/media/downloads/completed" but when it finishes it wants to check for it in "/downloads/completed".

All autotools features are of course off both in rtorrent.rc and in the rutorrent gui and this only happens when vpn_enabled = "yes", super strange.

Clearing cache in the browser does not help, but after a restart of the docker container this:

image.thumb.png.f5b6e16250b776a8e60cd675457f2688.png

Edited by JohanSF
Link to comment
41 minutes ago, binhex said:

@pervin_1 ahh its a bug!, a rogue function slipped into one of the scripts, god knows how it got committed but its there (late night coding with beer perhaps hehe), i will remove it and rebuild, obviously this only affects you if you turn off the vpn (thus why i havent spotted it :-) ), watch out for a new image.

 

 

You are right about the VPN, I was able to run the 2nd container from the same image of your's last week and it worked with VPN enabled just fine, this time I was trying to do without VPN and it kept messing things up, glad to know you are on top it, god bless you and your hard work, binhex. Don't drink too much beer, haha, its addictive, can tell that from my beer belly..

Link to comment
Just now, pervin_1 said:

 

 

You are right about the VPN, I was able to run the 2nd container from the same image of your's last week and it worked with VPN enabled just fine, this time I was trying to do without VPN and it kept messing things up, glad to know you are on top it, god bless you and your hard work, binhex. Don't drink too much beer, haha, its addictive, can tell that from my beer belly..

 

the image is built so you should be good to go now.

Link to comment
16 minutes ago, JohanSF said:

"/media/downloads/completed" but when it finishes it wants to check for it in "/downloads/completed".

 

ok so you have a mismatch somewhere, host volume path, container volume path, and/or application path, see general faq link below Q9, read it then read it again if you don't grasp it the first time, its in my opinion probably the hardest thing to understand about docker, but once you have it in your brain your set :-).

 

https://lime-technology.com/topic/44108-support-binhex-general/?do=FindComment&comment=433612

 

 

Link to comment
2 minutes ago, binhex said:

 

ok so you have a mismatch somewhere, host volume path, container volume path, and/or application path, see general faq link below Q9, read it then read it again if you don't grasp it the first time, its in my opinion probably the hardest thing to understand about docker, but once you have it in your brain your set :-).

 

https://lime-technology.com/topic/44108-support-binhex-general/?do=FindComment&comment=433612

 

 

This I checked, and you can see above that for sonarr and rtorrentvpn /media are exactly the same. In the software I always reference /media and then the subfolder for exactly this reason. And how would it explain the error only occuring with vpn on?

Link to comment
Just now, JohanSF said:

And how would it explain the error only occuring with vpn on?

 

it wouldnt, i have no explanation for that at this time, but if you are seeing:-

 

Quote

/media/downloads/completed" but when it finishes it wants to check for it in "/downloads/completed


then you must have a mismatch somewhere, double check your application configuration if you are 100% sure the volume mappings are identical (host and container).

Link to comment
37 minutes ago, binhex said:

 

the image is built so you should be good to go now.

Can confirm that everything works on my end, your magic did the trick, you are awesome, binhex!!!

 

BTW forgot to ask, what's "throttle plugin has failed to start"? Does this container have one? Thank you!!!

 

Edit:

Never mind, its related to my rtorrent.rc settings, it has to do something with upload_rate and throttle lines I have in the config file, will figure it out myself, no worries, thank you again!!!

Edited by pervin_1
  • Like 1
Link to comment
45 minutes ago, binhex said:

 

it wouldnt, i have no explanation for that at this time, but if you are seeing:-

 


then you must have a mismatch somewhere, double check your application configuration if you are 100% sure the volume mappings are identical (host and container).

I tried adding a torrent with new label and not using sonarr or radarr at all, the issue still persists. So it must be within rtorrentvpn alone that something is wrong on my end.

 

Here is my rtorrent.rc file
 

# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
#https://github.com/rakshasa/rtorrent/wiki/Performance-Tuning

# Global upload and download rate in KiB, `0` for unlimited (`download_rate`, `upload_rate`)
throttle.global_down.max_rate.set_kb = 9216
throttle.global_up.max_rate.set_kb   = 1126

# Maximum number of simultaneous downloads and uploads slots (global slots!) (`max_downloads_global`, `max_uploads_global`) Default: `0` and `0` respectively
throttle.max_downloads.global.set = 300
throttle.max_uploads.global.set   = 50

# Maximum and minimum number of peers to connect to per torrent while downloading (`min_peers`, `max_peers`) Default: `100` and `200` respectively
throttle.min_peers.normal.set = 99
throttle.max_peers.normal.set = 100

# Same as above but for seeding completed torrents (seeds per torrent), `-1` for same as downloading (`min_peers_seed`, `max_peers_seed`) Default: `-1` for both
#throttle.min_peers.seed.set = -1
#throttle.max_peers.seed.set = -1

# Maximum number of simultaneous downloads and uploads slots per torrent (`max_uploads`) Default: `50` for both
#max_uploads = 15
# or
#throttle.max_downloads.set = 50
#throttle.max_uploads.set = 50

# Set the numwant field sent to the tracker, which indicates how many peers we want. 
#  A negative value disables this feature. Default: `-1` (`tracker_numwant`)
trackers.numwant.set = 100

# Set the max amount of memory address space used to mapping file chunks. This refers to memory mapping, not
#  physical memory allocation. Default: `1GB` (`max_memory_usage`) 
# This may also be set using ulimit -m where 3/4 will be allocated to file chunks.
#pieces.memory.max.set = 3277M
pieces.memory.max.set = 4096M

# Maximum number of connections rtorrent can accept/make (`sockets`)
network.max_open_sockets.set = 999

# Maximum number of open files rtorrent can keep open (you have to modify the system wide settings with ulimit!) (`set_max_open_files`)
network.max_open_files.set = 600

# Maximum number of simultaneous HTTP request (used by announce or scrape requests) Default: `32` (`set_max_open_http`)
network.http.max_open.set = 99

# Send and receive buffer size for socket. Disabled by default (`0`), this means the default is used by OS 
#  (you have to modify the system wide settings!) (`send_buffer_size`, `receive_buffer_size`)
# Increasing buffer sizes may help reduce disk seeking, connection polling as more data is buffered each time
#  the socket is written to. It will result higher memory usage (not visible in rtorrent process!).
network.receive_buffer.size.set =  4M
network.send_buffer.size.set    = 12M

# Preloading a piece of a file. Default: `0` Possible values: `0` (Off) , `1` (Madvise) , `2` (Direct paging).
pieces.preload.type.set = 2
pieces.preload.min_size.set = 262144
pieces.preload.min_rate.set = 5120

# TOS of peer connections. Default: `throughput`. If the option is set to `default` then the system default TOS
#  is used. A hex value may be used for non-standard settings.  (`tos`)
# Possible values: `[default|lowdelay|throughput|reliability|mincost]` or a hex value.
#network.tos.set = throughput

# CURL options to add support for nonofficial SSL trackers and peers
#network.http.ssl_verify_host.set = 0
#network.http.ssl_verify_peer.set = 0

# CURL option to lower DNS timeout. Default: `60`.
#network.http.dns_cache_timeout.set = 25

# Max packet size using xmlrpc. Default: `524288` (xmlrpc_size_limit)
network.xmlrpc.size_limit.set = 2M

# Save all the sessions in every 12 hours instead of the default 20 minutes.
#schedule2 = session_save, 1200, 43200, ((session.save))

# Prune file status in every 24 hours, this is the default setting.
#schedule2 = prune_file_status, 3600, 86400, ((system.file_status_cache.prune))

# Whether to allocate disk space for a new torrent. Default: `0`
system.file.allocate.set = 1

# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
execute = {/bin/bash,-c,mkdir -p /config/rtorrent/session}
session = /config/rtorrent/session/

# Directory to save incomplete downloads to.
execute = {/bin/bash,-c,mkdir -p /media/downloads/completed}
directory = /media/downloads/completed

# Directory to move completed downloads to.
# Note please ensure you disable the "AutoMove" in rutorrent 
# otherwise there could be a conflict that can cause deletion
# of partially downloaded torrents.
#execute = {/bin/bash,-c,mkdir -p /media/downloads/completed}
#system.method.set_key = event.download.finished,move_complete,"execute=mv,-u,$d.get_base_path=,/media/downloads/completed/;d.set_directory=/media/downloads/completed/"

# Watch a directory for new torrents, and stop those that have been
# deleted. Note please ensure you disable the "AutoMove" in rutorrent 
# otherwise there could be a conflict that can cause deletion
# of partially downloaded torrents.
#execute = {/bin/bash,-c,mkdir -p /downloads/watched}
#schedule = watch_directory,5,5,load_start=/downloads/watched/*.torrent
#schedule = untied_directory,5,5,stop_untied=
#schedule = untied_directory,5,5,remove_untied=

# Close torrents when diskspace is low.
#schedule = low_diskspace,5,60,close_low_diskspace=100M

# Disable check for SSL cert for tracker
#
network.http.ssl_verify_peer.set = 0

# The ip address reported to the tracker.
#ip = 127.0.0.1
#ip = rakshasa.no

# The ip address the listening socket and outgoing connections is
# bound to.
#bind = 127.0.0.1

# Port range to use for listening. Comment if using VPN, 59759.
#port_range = 49160-49160
#port_range = 30000-70000

# Start opening ports at a random position within the port range. 
port_random = no

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
#check_hash = no

# Set whether the client should try to connect to UDP trackers.
use_udp_trackers = yes

# Alternative calls to bind and ip that should handle dynamic ip's.
#schedule = ip_tick,0,1800,ip=rakshasa
#schedule = bind_tick,0,1800,bind=rakshasa

# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
encryption = allow_incoming,enable_retry,prefer_plaintext

# Enable DHT support for trackerless torrents or when all trackers are down.
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
# 
dht = disable

# UDP port to use for DHT. 
# 
#dht_port = 49170

# Enable peer exchange (for torrents not marked private)
#
peer_exchange = no

# Allows you to decide whether to pre-allocate space for files when adding torrent
#
#system.file_allocate.set = no # Commented out when above settings were inserted.

# Port used for scgi connections
#
scgi_port = 0.0.0.0:5000

# https://github.com/Novik/ruTorrent/issues/1508
# https://github.com/Novik/ruTorrent/wiki/Plugins#starting-plugins-with-rtorrent
execute2 = {sh,-c,/usr/bin/php /var/www/rutorrent/php/initplugins.php &}

I think that somewhere it is maybe hardcoded that it should check in /downloads/completed, which many probably use, and that this only triggers when vpn is enabled.

Edited by JohanSF
Link to comment

For someone, who is having issues with plugins like I had with throttle plugin, it was failing to start with webui, for this particular container just add this line to your rtorrent.rc file:

execute = {sh,-c,/usr/bin/php /usr/share/webapps/rutorrent/php/initplugins.php web_user_name_goes_here &}

 

Use web_user_name if you have one, which rtorrent requires to sign in.

/usr/bin/php is your PHP binary path

/usr/share/webapps/rutorrent/php/initplugins.php is the WEBROOT

 

Link for more info https://github.com/Novik/ruTorrent/wiki/Plugins#starting-plugins-with-rtorrent

Link for similar issue https://github.com/Novik/ruTorrent/issues/1508

Link to comment

I solved it.

 

It took tons of debugging, but it sems that when vpn is enabled, settings of the user "admin" are used, while the default settings are used when vpn is disabled. I deleted the file autotools.dat in \binhex-rtorrentvpn\rutorrent\share\users\admin\settings.

 

Contents of that file included that completed files be moved to "/downloads/completed" which caused the error. This setting was not visible in the rutorrent gui either.

Regards, Johan

Edited by JohanSF
  • Like 1
Link to comment

Another slightly infuriating issue;

 

For me rutorrent does not seem to remember priority of the torrents set by the user. Restarting the docker container returns all priorities to "normal". I noticed because a new torrent somehow automatically was set to "Don't download" after finishing which looks messy to me.

Link to comment

I hope someone can help. I have been having issues with Privoxy not working. I have had it setup in Jackett working fine before but it has now stopped working. I have not changed any of the configs and there don't appear to be any errors in the logs. I also used a proxy testing tool on my windows machine to test Privoxy and it fails. I know the VPN is up and working for rtorrent as I have tested it with an IP testing torrent. Any ideas whats going on?

 

rtorrent logs: https://pastebin.com/J7cXpqr8

proxy test logs: https://pastebin.com/AJi2uugh

Link to comment
12 minutes ago, cheesemarathon said:

I hope someone can help. I have been having issues with Privoxy not working. I have had it setup in Jackett working fine before but it has now stopped working. I have not changed any of the configs and there don't appear to be any errors in the logs. I also used a proxy testing tool on my windows machine to test Privoxy and it fails. I know the VPN is up and working for rtorrent as I have tested it with an IP testing torrent. Any ideas whats going on?

 

rtorrent logs: https://pastebin.com/J7cXpqr8

proxy test logs: https://pastebin.com/AJi2uugh

 

screenshot the unraid/docker webui with advanced view switched on for this container, i want to see what port mappings you have defined.

Link to comment
  • binhex locked this topic
Guest
This topic is now closed to further replies.