[Support] binhex - rTorrentVPN


Recommended Posts

On 5/15/2022 at 5:45 PM, mason1171 said:

I cant get rutorrent-vpn or qbittorrent-vpn to run with the vpn enabled anymore. Rtorrent worked for a few days then all of a sudden stopped. Can I get some help please?
Log
https://pastebin.com/nimf2EqN

You've got too many nameservers active. If the VPN service doesn't provide you with server addresses that work with this container, try some public one like Quad9 or 1.1.1.1, but make sure to delete the other IP addresses you aren't using.

Link to comment
1 minute ago, eroc1990 said:

You've got too many nameservers active. If the VPN service doesn't provide you with server addresses that work with this container, try some public one like Quad9 or 1.1.1.1, but make sure to delete the other IP addresses you aren't using.

Thanks for the tip. I was able to fix it by recreating the wg0.conf and copying the dns server from there to the container config.

  • Like 1
Link to comment
On 4/16/2022 at 9:45 PM, kakmoster said:

I have started getting the following: 

 

 

 

 

I have tried removing docker container and install new one, only keeping the session folder. This has happended twice in two days. 

I am getting the exact same problem. I tried everything I can think of and am pretty sure it is a regression in rtorrent itself for the xmlrpc interface. I even modified the scripts for the container and adjusted the config to use a unix socket instead of a loopback port with the same results. When I use Python3 to try and talk to the RPC interface I get closed connection without response:

How I tested:

 

import httplib
import socket
import xmlrpclib

class UnixStreamHTTPConnection(httplib.HTTPConnection, object):
    def __init__(self, *args, **kwargs):
        self.socketpath = kwargs.pop('socketpath')
        super(UnixStreamHTTPConnection, self).__init__(*args, **kwargs)

    def connect(self):
        self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
        self.sock.connect(self.socketpath)

class UnixStreamTransport(xmlrpclib.Transport, object):
    def __init__(self, *args, **kwargs):
        self.socketpath = kwargs.pop('socketpath')
        super(UnixStreamTransport, self).__init__(*args, **kwargs)

    def make_connection(self, host):
        return UnixStreamHTTPConnection(host, socketpath=self.socketpath)

proxy = client.ServerProxy('http://localhost', transport=UnixStreamTransport("/tmp/rpc.socket"))
print(proxy.supervisor.getState())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1116, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1458, in __request
    response = self.__transport.request(
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1160, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1173, in single_request
    resp = http_conn.getresponse()
  File "/usr/lib/python3.9/http/client.py", line 1371, in getresponse
    response.begin()
  File "/usr/lib/python3.9/http/client.py", line 319, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.9/http/client.py", line 288, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

 

Did something change with the binary itself? It's quite peculiar because rutorrent itself can connect fine and loads. This is a fresh install on a new server. I did notice this behavior though on my old server where the rpc dies sometimes. Perhaps it is time to go to qbittorrent even if I much rather stay with the tried and true lol.
 

Link to comment
  • 4 weeks later...

My rtorrentvpn has been down since yesterday and I cannot get it back up and running.

 

It's been working fine for over a year and yesterday I added several torrents all at once.  It started getting slow and then stopped responding.  I've tried restarting the docker and even restarted the entire server but still it does not load.

 

the log says:

[info] rTorrent process listening on port 5000

2022-06-15 09:54:20,242 DEBG 'watchdog-script' stdout output:
[info] Initialising ruTorrent plugins (checking rTorrent is running)...

2022-06-15 09:54:20,253 DEBG 'watchdog-script' stdout output:
[info] rTorrent running
[info] Initialising ruTorrent plugins (checking nginx is running)...

2022-06-15 09:54:20,264 DEBG 'watchdog-script' stdout output:
[info] nginx running
[info] Initialising ruTorrent plugins...

2022-06-15 09:54:31,849 DEBG 'watchdog-script' stdout output:
[info] ruTorrent plugins initialised

2022-06-15 09:55:17,100 DEBG 'watchdog-script' stdout output:
[info] rTorrent not running

2022-06-15 09:55:17,108 DEBG 'watchdog-script' stdout output:
[info] Removing any rTorrent session lock files left over from the previous run...

2022-06-15 09:55:17,114 DEBG 'watchdog-script' stdout output:
[info] Attempting to start rTorrent...

2022-06-15 09:55:17,115 DEBG 'watchdog-script' stdout output:
Script started, output log file is '/home/nobody/typescript'.

2022-06-15 09:55:17,151 DEBG 'watchdog-script' stdout output:
Script done.

2022-06-15 09:55:19,190 DEBG 'watchdog-script' stdout output:
[info] rTorrent process started
[info] Waiting for rTorrent process to start listening on port 5000...

2022-06-15 09:55:19,201 DEBG 'watchdog-script' stdout output:
[info] rTorrent process listening on port 5000

2022-06-15 09:55:19,202 DEBG 'watchdog-script' stdout output:
[info] Initialising ruTorrent plugins (checking rTorrent is running)...

2022-06-15 09:55:19,213 DEBG 'watchdog-script' stdout output:
[info] rTorrent running
[info] Initialising ruTorrent plugins (checking nginx is running)...

2022-06-15 09:55:19,226 DEBG 'watchdog-script' stdout output:
[info] nginx running
[info] Initialising ruTorrent plugins...

2022-06-15 09:55:39,515 DEBG 'watchdog-script' stdout output:
[info] ruTorrent plugins initialised

2022-06-15 09:56:09,726 DEBG 'watchdog-script' stdout output:
[info] rTorrent not running

2022-06-15 09:56:09,734 DEBG 'watchdog-script' stdout output:
[info] Removing any rTorrent session lock files left over from the previous run...

2022-06-15 09:56:09,737 DEBG 'watchdog-script' stdout output:
[info] Attempting to start rTorrent...

2022-06-15 09:56:09,738 DEBG 'watchdog-script' stdout output:
Script started, output log file is '/home/nobody/typescript'.

2022-06-15 09:56:09,773 DEBG 'watchdog-script' stdout output:
Script done.

2022-06-15 09:56:11,807 DEBG 'watchdog-script' stdout output:
[info] rTorrent process started
[info] Waiting for rTorrent process to start listening on port 5000...

2022-06-15 09:56:11,817 DEBG 'watchdog-script' stdout output:
[info] rTorrent process listening on port 5000

2022-06-15 09:56:11,818 DEBG 'watchdog-script' stdout output:
[info] Initialising ruTorrent plugins (checking rTorrent is running)...

2022-06-15 09:56:11,828 DEBG 'watchdog-script' stdout output:
[info] rTorrent running

2022-06-15 09:56:11,828 DEBG 'watchdog-script' stdout output:
[info] Initialising ruTorrent plugins (checking nginx is running)...

2022-06-15 09:56:11,839 DEBG 'watchdog-script' stdout output:
[info] nginx running
[info] Initialising ruTorrent plugins...

2022-06-15 09:56:20,175 DEBG 'watchdog-script' stdout output:
[info] ruTorrent plugins initialised

image.thumb.png.c506dc8a3a9f61875f35c92339c97e14.png

 

any suggestions or advice?

Link to comment

What ended up working for me was I went into appdata>rtorrentvpn>rtorrent>session and deleted all the files in there.  I was able to start rutorrent after that.  Now I'm slowly adding my existing torrents back on there.

Edited by fonzie
Link to comment

So I added the following to my rtorrent.rc,

execute = {/bin/bash,-c,mkdir -p /config/rtorrent/logs}
log.open_file = "rtorrent", /config/rtorrent/logs/rtorrent.log
log.open_file = "tracker", /config/rtorrent/logs/tracker.log
log.open_file = "storage", /config/rtorrent/logs/storage.log

# rTorrent logging verbosity for rtorrent, comment out if logs are too chatty
log.add_output = "info", "rtorrent"
log.add_output = "critical", "rtorrent"
log.add_output = "error", "rtorrent"
log.add_output = "warn", "rtorrent"
log.add_output = "notice", "rtorrent"
log.add_output = "debug", "rtorrent"

# rTorrent logging for dht and tracker traffic
log.add_output = "dht_debug", "tracker"
log.add_output = "tracker_debug", "tracker"

# rTorrent logging for storage
log.add_output = "storage_debug", "storage"

that wrote logs and told me that this line

execute = {/bin/bash,-c,mkdir -p /data/incomplete}

is causing the error. I never had a mount for /data, that line has always been there. I have no idea why all of a sudden it's been a problem. Might be cool to add those logs to supervisord.log. Anyway, I hope this helps somebody else!

Link to comment
  • 2 weeks later...

i've disabled the builtin vpn feature and switched to the unraid os wireguard solution. rutorrent works well behind the tunnel wg0, i just can't get a port working with it. i've activated a port with my vpn provider and i've setup that port with rtorrent but it's not listening. what might i be missing? thanks!

Link to comment
  • 3 weeks later...
On 7/16/2022 at 11:40 PM, phptanker said:

Hi, my web ui stopped working after Ubuntu upgraded. I'm trying to troubleshoot but not sure where to start. Any ideas? I just get connection refused. 

 

Same here - Tried recreating from scratch as last resort, still doesn't want to me to access the web interface.

Link to comment
  • 2 weeks later...

Hi @binhex

First, thanks a lot for these containers, have been using arch-rtorrentvpn for quite some time and been pretty happy with it - not on unraid but on a qnap NAS via AirVPN (a UDP OpenVPN Linux config retrieved via the dedicated airvpn page). I recently noticed a drop in bandwidth and decided to clean my install and rewrite the whole docker-compose file after reading your documentation VPN page. I've tried both the rtorrent and qbittorrent containers, via openvpn or wireguard, but I cannot get decent bandwidth, and the port I've got open on airvpn for port forwarding always appears to be closed when trying to reach it via yougetsignal. 

 

As a baseline, using QNAP Download Station on Ubuntu torrents gets me 60MBps, and using a standard qbittorrent from linuxserver with no VPN, I get 40MBps. Having 1/1000 that bandwidth, and reading on your doc that it must be a port forwarding issue, I requested port 62821-62825 on airvpn, and modified:

  • the rtorrent.rc config `network.port_range.set = 61821-61821 and dht.port.set = 61821` and commented out the `#execute = {/bin/bash,-c,mkdir -p /data/incomplete}` line
  • as well as the qBittorrent.conf  `Session\Port=62821 and Connection\PortRangeMin=62821`

Just in case, I pulled the latest images, set PUID and PGID to 0. It seems like my containers are not set to priviledged when using wireguard since I get the error from Q23 `[warn] WireGuard interface failed to come 'up', exit code is '1'`. So I focused on OpenVPN config

No matter what I tried, I cannot get it to work. I did set VPN_INPUT_PORTS and VPN_OUTPUT_PORTS to 62821, but then realized these are used for inter-containers communication, which I am not using at the moment. I've tried with both a AirVPN_Netherlands_TCP-443.ovpn and AirVPN_Netherlands_UDP-443.ovpn openvpn file with no luck.

 

Here are my docker-compose files: 

rutorrent

Spoiler
version: '3.5'
services:
  rutorrentvpn:
    image: binhex/arch-rtorrentvpn:latest
    container_name: rutorrentvpn
    restart: "no" # unless-stopped
    # OpenVPN
    cap_add:
      - NET_ADMIN
    # WIREGUARD
    #privileged: true
    #sysctls:
    #  - net.ipv4.conf.all.src_valid_mark=1
    ports:
      - 8083:9080 # 8083 or newer 9001
      - 9443:9443
      - 8118:8118
      - 61821:61821  # 6881
      - 61821:61821/udp # 6881/udp
    environment:
      # OPENVPN or WIREGUARD
      - VPN_ENABLED=yes 
      - VPN_PROV=airvpn # airvpn custom
      - VPN_CLIENT=openvpn # openvpn wireguard
      - STRICT_PORT_FORWARD=yes 
      #- VPN_INPUT_PORTS=61821
      #- VPN_OUTPUT_PORTS=61821
      # LAN CONFIG
      - LAN_NETWORK=192.168.2.0/24 
      - NAME_SERVERS=209.222.18.222,84.200.69.80,37.235.1.174,1.1.1.1,209.222.18.218,37.235.1.177,84.200.70.40,1.0.0.1 \
      - DEBUG=true 
      - VPN_USER=admin 
      - VPN_PASS=mypassword 
      # PLUGINS
      #- ENABLE_FLOOD=yes
      - ENABLE_PRIVOXY=yes 
      - ENABLE_AUTODL_IRSSI=no 
      - ENABLE_RPC2=yes 
      - ENABLE_RPC2_AUTH=yes 
      - ENABLE_WEBUI_AUTH=yes 
      # LOGINS
      - RPC2_USER=admin 
      - RPC2_PASS=PWIz6hDg7GJLipOqUuP9 
      - WEBUI_USER=admin 
      - WEBUI_PASS=PWIz6hDg7GJLipOqUuP9 
      # OTHER
      - PUID=0 # 1000
      - PGID=0 # 100
      - UMASK=000 
      - PHP_TZ="Europe/Paris" # UTC
    volumes:
      - /share/DockerApps/config/rutorrentvpn:/config
      - /share/DockerApps/downloads_rutorrentvpn:/data
      - /etc/localtime:/etc/localtime:ro
    networks: 
      - backend    
networks:
  backend:
    # driver: "bridge"
    name: website # networks can be named since version 3.5

 

 

 

Qbittorrent

Spoiler
version: '3'

services:
  qbittorrentvpn:
    image: binhex/arch-qbittorrentvpn:latest
    container_name: qbittorrentvpn 
    restart: unless-stopped
    # OpenVPN
    cap_add:
      - NET_ADMIN
    # WIREGUARD
    #privileged: true
    #sysctls:
    #  - net.ipv4.conf.all.src_valid_mark=1
    # COMMMON
    ports: 
        - 61821:61821  # 6881
        - 61821:61821/udp # 6881/udp
        - 8030:8080 
        - 8118:8118 
    volumes: 
        - /share/DockerApps/downloads_qbittorrent:/data 
        - /share/DockerApps/config/qbittorrentvpn:/config 
        - /etc/localtime:/etc/localtime:ro         
    environment: 
      # OPENVPN or WIREGUARD
      - VPN_ENABLED=yes 
      - VPN_PROV=airvpn # airvpn custom
      - VPN_CLIENT=openvpn # openvpn wireguard
      - STRICT_PORT_FORWARD=yes 
      #- VPN_INPUT_PORTS=61821
      #- VPN_OUTPUT_PORTS=61821
      # LAN CONFIG
      - LAN_NETWORK=192.168.2.0/24 
      - NAME_SERVERS=209.222.18.222,84.200.69.80,37.235.1.174,1.1.1.1,209.222.18.218,37.235.1.177,84.200.70.40,1.0.0.1 \
      - DEBUG=true 
      - VPN_USER=admin 
      - VPN_PASS=mypassword 
      # PLUGINS
      #- ENABLE_FLOOD=yes
      - ENABLE_PRIVOXY=yes 
      # LOGINS
      - WEBUI_USER=admin 
      - WEBUI_PORT=8080 
      - WEBUI_PASS=PWIz6hDg7GJLipOqUuP9 
      # OTHER
      - PUID=0 # 1000
      - PGID=0 # 100
      - UMASK=000 
      - PHP_TZ="Europe/Paris" # UTC
      
     
#    networks: 
#      - backend
#    
#networks:
#  backend:
#    # driver: "bridge"
#    name: website # networks can be named since version 3.5
    

 

 

 

Here are my [logs dump](https://pastebin.com/SRJ7mEsu) with debud mode set to true for the rtorrent/OpenVPN container - not obfuscated, passwords are random.

 

Would love some pointers to get it to work back again!

Best,

Link to comment
  • 2 weeks later...
On 8/16/2022 at 11:29 PM, SDEN said:

Hi 

 

After an unwanted shutdown, im having problems getting rtorrent running.

 

Im running unraid and have attached supervisord log.

 

Docker starts, but i cant load the webpage of rtorrent.

 

Hope someone can help from information from log file.

 

best regards 

 

JS

supervisord.log 2.73 MB · 0 downloads

 

I've come to the conclusion its when changing /data to /media in the config. Why i dont know. Works when leaving it to be data and just change the paths. Now its time to change all paths in autodl and other dockers.

Link to comment

I've been coming into a problem that I'm not sure how to fix. When editing the rtorrent.rc config file (using notepad++), I get this error: 

 

[18.08.2022 10:41:00] WebUI started.
[18.08.2022 10:41:02] Bad response from server: (0 [error,getplugins])
[18.08.2022 10:41:12] JS error: [http://192.168.1.3:9080/js/stable.js : 1784] Uncaught TypeError: Cannot read properties of undefined (reading 'scrollTop')

 

For the latest attempt, the only thing I changed was: 

 

directory.default.set = /data/incomplete/

To this: 

directory.default.set = /data/Plex_Downloads/

 

Changing back to incomplete didn't fix the issue (and Plex_Downloads is a folder in the mapped /data/ directory, I'm fairly certain). 

When I was trying this last night, the above change didn't throw an error but it did when I changed 

# Global upload and download rate in KiB. "0" for unlimited.
#
#throttle.global_down.max_rate.set_kb = 0
#throttle.global_up.max_rate.set_kb = 0

to this: 

# Global upload and download rate in KiB. "0" for unlimited.
#
#throttle.global_down.max_rate.set_kb = 0
throttle.global_up.max_rate.set_kb = 900

 

Any ideas? Thanks!

Link to comment
  • 2 weeks later...

Dear @binhex, I used rtorrentvpn with PIA. Worked. I have a fixed IP adress from my provider. When I try to connect externally via IP/Port to the unraid menu or other dockers it doesn't load anything. As soon as I start the PIA Client it instantly connects to the IP. Deleted the docker and appdata but problem still persists. Routing table is new, Updated Unraid and restarted the server, asked around but no one was able to help me to just get rid of the VPN Connect to my server. As I am quite the noob please help me out here... TIA

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