[Support] binhex - rTorrentVPN


Recommended Posts

I have a script that I want to run when the VPN first connects to register whatever IP I get to a tracker that I use.  When I add this to VPN_OPTIONS:

 

--script-security 2 --up /config/openvpn/tun_up.sh

 

I get this:
 

2021-04-17 09:01:44,949 DEBG 'start-script' stdout output:
2021-04-17 09:01:44 Multiple --up scripts defined. The previously configured script is overridden.

 

And then things never connect.

 

What would be the better option for doing this?

Link to comment

I have been experiencing an issue for a while where the VPN connection drops approx. 30-40 seconds after Radarr adds a movie to rtorrent. When it's added it's all good and the torrent is downloading at great speeds but then the VPN connection drops and it takes a while for rTorrent to regain connection and download the remainders of the torrent. The VPN connection seems to be working fine when Radarr is not adding torrents.

I really can't figure out what the problem is, so I was hoping that someone would be able to help.

I have attached my supervisor.log, Radarr log and my rTorrent configuration.

Please let me know if I need to send any other debugging data and I also understand that it might be Radarr that's causing the error, but I just find it weird that the connection drops.

rtorrent.rc supervisord.log radarr.debug.txt

Link to comment

So i have seen lately that some torrents get errors days after download is complete. Some are ok and doesen't change status from seeding but alot of them are changed to pausing. In the download folder the correct files are there but the sizes say 0kb.

 

For now i have stopped the torrent then started it again and this works for the most part but not always.

Anyone have any clue as to what i can do to fix this?

Link to comment

It seems the Linuxserver/rutorrent isnt beeing updated anymore or so.

 

So was checking this. But it has stuff like VPN which i dont need. I can disable it i saw that is ok. BUT can i also move ALL my settings over from the old one to this one ?  Just copy some files start and it works again ?

Link to comment
On 4/24/2021 at 3:32 PM, KoNeko said:

It seems the Linuxserver/rutorrent isnt beeing updated anymore or so.

 

So was checking this. But it has stuff like VPN which i dont need. I can disable it i saw that is ok. BUT can i also move ALL my settings over from the old one to this one ?  Just copy some files start and it works again ?

create and start the binhex-rtorrentvpn container, then stop it and then look at your old container and copy across files from /config from the old to the correct location in the new, yes the paths will be different so you will need to work that out so dont just copy and paste cos that wont work.

Link to comment
On 4/17/2021 at 3:52 PM, matt.shepker said:

I have a script that I want to run when the VPN first connects to register whatever IP I get to a tracker that I use. 

you shouldnt need to do this, the ip assigned to you from your vpn provider is set in rtorrent and should register to the tracker.

Link to comment

One question.

 

I have rtorrentvpn setup using wireguard. When I want to access unraid remotley I use wireguard for that too. For some reason I cant connect to rtorrent web-gui when using wireguard connecting to unraid. All other containers web-gui works except rtorrent.

 

Is there any settings I need to do to access web-gui when connected to my server with wireguard?

Edited by ProphetSe7en
Link to comment

I can't seem to get this working with my TorGuard generated OVPN file. It seems to run fine up until the connection point with OpenVPN. It loops with the following:

 

2021-04-29 19:21:23,743 DEBG 'start-script' stdout output:
2021-04-29 19:21:23 OpenVPN 2.5.1 [git:makepkg/f186691b32e68362+] x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Feb 24 2021
2021-04-29 19:21:23 library versions: OpenSSL 1.1.1j 16 Feb 2021, LZO 2.10

2021-04-29 19:21:28,743 DEBG 'start-script' stdout output:
2021-04-29 19:21:28 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts

2021-04-29 19:21:28,743 DEBG 'start-script' stdout output:
2021-04-29 19:21:28 TCP/UDP: Preserving recently used remote address: [AF_INET]193.XXX.XXX.XXX:1912

2021-04-29 19:21:28,744 DEBG 'start-script' stdout output:
2021-04-29 19:21:28 UDP link local: (not bound)
2021-04-29 19:21:28 UDP link remote: [AF_INET]193.XXX.XXX.XXX:1912

2021-04-29 19:22:28,441 DEBG 'start-script' stdout output:
2021-04-29 19:22:28 [UNDEF] Inactivity timeout (--ping-restart), restarting

2021-04-29 19:22:28,442 DEBG 'start-script' stdout output:
2021-04-29 19:22:28 SIGHUP[soft,ping-restart] received, process restarting

2021-04-29 19:22:28,442 DEBG 'start-script' stdout output:
2021-04-29 19:22:28 DEPRECATED OPTION: ncp-disable. Disabling cipher negotiation is a deprecated debug feature that will be removed in OpenVPN 2.6
2021-04-29 19:22:28 WARNING: file 'credentials.conf' is group or others accessible

 

Any ideas? I've tested the same config using OpenVPN GUI on my PC and it connects fine.

 

EDIT; It ended up connecting after sometime. I'll continue to monitor the connection.

Edited by bamtan
added more info
Link to comment

Any tips or suggestions around getting pyrocore setup? I'm trying to build a script that will utilize hashcheck rtxmlrpc and so far the only way I've been able to interact with pyrocore is by using the console mode on the docker. 

 

Thanks in advance, I done a bit of searching, but outside of the pyrocore docs which I tried to use I can't really find much. Cheers!

Link to comment

With the new pool options, i'm trying to have different shares for different things. Currently trying to have downloads be in a share that is on a pool (pool only), and done/seeding to be on main array (mover pool->array). Initially tried having p2p share (for incoming and everything else) mount as /data and also shares mounting as /data/downloading and /data/DONE but that caused conflicts where some stuff went to proper share and some went to p2p/[downloading or DONE].

 

Now do not have a base /data mount, but mounting everything needed...which seems to work ok but save to cannot escape whatever share it is currently in, and auto tools does not always succeeded. Is there a "right" way to do this? If can get this working, the idea is to start splitting off different categories into their own pools (like all defcon/infocon torrents to be in a separate pool). Considered adding links within p2p share to the other shares, but that just seemed like a really bad idea.

Link to comment

I'm getting lots of entries in the access.log file:

 

nnn.nnn.n.nnn - admin [02/May/2021:23:24:56 +0800] "POST /plugins/httprpc/action.php HTTP/1.1" 200 892 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:24:56 +0800] "POST /plugins/httprpc/action.php HTTP/1.1" 200 55 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:24:56 +0800] "GET /plugins/cpuload/action.php?_=1619845697880 HTTP/1.1" 200 14 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:24:58 +0800] "GET /plugins/diskspace/action.php?_=1619845697881 HTTP/1.1" 200 41 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:25:00 +0800] "POST /plugins/httprpc/action.php HTTP/1.1" 200 815 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:25:00 +0800] "POST /plugins/httprpc/action.php HTTP/1.1" 200 55 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:25:00 +0800] "GET /plugins/cpuload/action.php?_=1619845697882 HTTP/1.1" 200 14 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:25:04 +0800] "POST /plugins/httprpc/action.php HTTP/1.1" 200 704 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:25:04 +0800] "POST /plugins/httprpc/action.php HTTP/1.1" 200 55 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:25:04 +0800] "GET /plugins/cpuload/action.php?_=1619845697883 HTTP/1.1" 200 14 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:25:08 +0800] "POST /plugins/httprpc/action.php HTTP/1.1" 200 838 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:25:08 +0800] "POST /plugins/httprpc/action.php HTTP/1.1" 200 55 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
nnn.nnn.n.nnn - admin [02/May/2021:23:25:08 +0800] "GET /plugins/cpuload/action.php?_=1619845697884 HTTP/1.1" 200 14 "http://nnn.nnn.n.nn:9080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"

 

This gets repeated constantly and I fill up a 10MB log file roughly every day.

 

Is there something wrong with my setup or can I do something to fix this?

Link to comment
Posted (edited)

I have a need to run the WebUI behind a separate Reverse Proxy.... in this case, I'm running Nginx Proxy Manager.  

 

https://github.com/binhex/arch-rtorrentvpn/issues/56

 

I found this issue listed and tried to implement the solution from the wiki, but it didn't change anything. Overall, most of the UI works just fine.  So far, the only issue I have run into is an HTTP 500 when I try to add cookies.  Does anyone have a suggestion on how I should configure the host in Nginx Proxy Manager?  

 

 

edit: It seems my thoughts may be misplaced. Bypassing NPM, I still get the same message even though I'm connecting directly. :| 

 

2021/05/03 23:10:47 [error] 405#405: *3740 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, bool given in /usr/share/webapps/rutorrent/plugins/cookies/cookies.php:38
Stack trace:
#0 /usr/share/webapps/rutorrent/plugins/cookies/action.php(28): rCookies->set()
#1 {main}
  thrown in /usr/share/webapps/rutorrent/plugins/cookies/cookies.php on line 38" while reading response header from upstream, client: [local_ip], server: localhost, request: "POST /plugins/cookies/action.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "[host]", referrer: "https://[host]/"

 

 

edit2: I have 3 different instances of ruTorrent, two are this docker container, and the other is installed directly on a machine.  Only the two running in docker have this problem. 

Edited by psycho_asylum
  • Like 1
Link to comment
On 5/3/2021 at 10:52 PM, psycho_asylum said:

edit2: I have 3 different instances of ruTorrent, two are this docker container, and the other is installed directly on a machine.  Only the two running in docker have this problem. 

 

I have the same issue psycho_asylum. I'm trying to move from Linuxservers retired image to this one. I've done a compare of both php files that are referenced in the stack trace, and they're identical. I did notice however that Linuxserver (which works) is running PHP 8.0.3 and this one is running 7.3.27

 

I'm not an expert, but maybe that has something to do with it? I haven't gone beyond this point in my troubleshooting yet.

Link to comment
3 hours ago, Chunks said:

 

I have the same issue psycho_asylum. I'm trying to move from Linuxservers retired image to this one. I've done a compare of both php files that are referenced in the stack trace, and they're identical. I did notice however that Linuxserver (which works) is running PHP 8.0.3 and this one is running 7.3.27

 

I'm not an expert, but maybe that has something to do with it? I haven't gone beyond this point in my troubleshooting yet.

 

I'm running PHP 7.2 on the box that's working, so I don't think it's PHP. :|  

Link to comment
Posted (edited)
On 5/8/2021 at 3:15 PM, psycho_asylum said:

 

I'm running PHP 7.2 on the box that's working, so I don't think it's PHP. :|  

So I got it to save my value.

 

Line 38 of "/usr/share/webapps/rutorrent/plugins/cookies/cookies.php" looks like this:

 

if(count($tmp>1) && (trim($tmp[1])!=''))

 

if you change it to

if( (count($tmp)>1) && (trim($tmp[1])!=''))

 

You just need to move the comparison outside of the "count" function.

 

This is all I could find that MIGHT be relevant?

https://www.php.net/manual/en/function.count.php#refsect1-function.count-changelog

 

Edit to add: The source file hasn't been changed in 9 years. So I dunno why this is suddenly a problem for us. I don't know enough PHP to guess.

https://github.com/Novik/ruTorrent/blob/master/plugins/cookies/cookies.php

Edited by Chunks
  • Thanks 1
Link to comment
Posted (edited)
1 hour ago, Chunks said:

 


if(count($tmp>1) && (trim($tmp[1])!=''))

 

Just from a logic standpoint, left side doesn't make any sense. 

 

Good find.  I hadn't had a chance to dig through it. I also have minimal PHP experience, but that's just standard logic. 

 

$tmp>1 would just return true or false, I have no idea how this actually works for anyone. You can't get count of a boolean.  When I get a few minutes, I'll see what is on my working machine. 

 

 

edit: 

 if(count($tmp>1) && (trim($tmp[1])!=''))

 

It's the same on my working machine, how the hell does this work? 

Edited by psycho_asylum
  • Haha 1
Link to comment
Posted (edited)

I can't for the life of me get any of the VPN containers to start with Wireguard support (I've tried rtorrent and qbittorrent). The only symptoms I can see are the wg0.conf file is never generated and the webui never starts. The logs always seem to just stop after adding DNS servers to resolv.conf...

 

I'm not seeing anything in the FAQs and these threads are so unruly and hard to navigate through if you don't have a specific error to search for.

 

These are freshly pulled containers, no previous appdata or template was available so these should have all the latest changes in them.

 

EDIT:

I'm seeing:

2021-05-18 08:32:52,689 DEBG 'start-script' stderr output:
Error: error sending query: Could not send or receive, because of network error

2021-05-18 08:32:52,690 DEBG 'start-script' stdout output:
[debug] Having issues resolving name 'nl-amsterdam.privacy.network', sleeping before retry...

2021-05-18 08:34:57,807 DEBG 'start-script' stderr output:
Error: error sending query: Could not send or receive, because of network error

2021-05-18 08:34:57,808 DEBG 'start-script' stdout output:
[debug] Having issues resolving name 'nl-amsterdam.privacy.network', sleeping before retry...

2021-05-18 08:37:02,930 DEBG 'start-script' stderr output:
Error: error sending query: Could not send or receive, because of network error

2021-05-18 08:37:02,931 DEBG 'start-script' stdout output:
[debug] Having issues resolving name 'nl-amsterdam.privacy.network', sleeping before retry...

2021-05-18 08:39:08,052 DEBG 'start-script' stderr output:
Error: error sending query: Could not send or receive, because of network error

2021-05-18 08:39:08,053 DEBG 'start-script' stdout output:
[debug] Having issues resolving name 'nl-amsterdam.privacy.network', sleeping before retry...

2021-05-18 08:41:13,168 DEBG 'start-script' stderr output:
Error: error sending query: Could not send or receive, because of network error

2021-05-18 08:41:13,169 DEBG 'start-script' stdout output:
[debug] Having issues resolving name 'nl-amsterdam.privacy.network', sleeping before retry...


Trying to dig or ping anything returns no servers could be reached errors. I can see the name servers defined in /etc/resolv.conf though they just flat out don't work...

 

DNS seems to be broken in the container? I can ping IP addresses but no hostnames at all...


EDIT: Ok so my issues look very similar to: 

Which never got an answer or reply and I can't seem to find anyone else who's having this problem.

 

@binhex Is there any further testing I can do? 

Edited by weirdcrap
Link to comment
1 hour ago, weirdcrap said:

Having issues resolving name 'nl-amsterdam.privacy.network', sleeping before retry...

so there is a bit of a chicken and egg situation going on here, because PIA endpoint nl-amsterdam.privacy.network is down we are unable to contact PIA servers to create the initial wireguard config file, and because we cant create the file, users can't then change it to another endpoint. so whilst this is not the best solution in the world, i think the easiest way out of this is to reconfigure the default to be something else other than nl-amsterdam.privacy.network, leave it with me and i will take a look tonight.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.