Jump to content
binhex

[Support] binhex - rTorrentVPN

2003 posts in this topic Last Reply

Recommended Posts

Ok, I think I should have started by mentioning this is a docker in a Synology NAS. I didn't even realize unRAID was an OS and thought this was the general support forum. I don't know if that is relevant or not, but oh well.
 
The log file doesn't have much info, I won't even need to attach it since other than the ASCII header it's just these two lines:
 
2020-02-14 17:14:16.550844 [info] System information Linux seedbox 4.4.59+ #24922 SMP PREEMPT Mon Aug 19 12:13:37 CST 2019 x86_64 GNU/Linux2020-02-14 17:14:16.621205 [info] PUID defined as '1'

I changed both PUID and PGID to "1". The thing is I don't really get what I should be putting there. I got that 0 is for root, but that's as far as my understanding goes right now.

Read the link to the readme again it's explained in there how you work out the values

Sent from my CLT-L09 using Tapatalk

Share this post


Link to post
47 minutes ago, binhex said:

Read the link to the readme again it's explained in there how you work out the values

My bad, I checked again and used the id command to find out the values for all users. There's only one user: root.

 

So, as per the readme, I used createuser.sh to create a new user account (it says it's for rutorrent but it's only thing related to this is the readme). I then checked the users again with "id" and still only the root user appears.

 

So... you told me before not to use useradd, and the script is not for this purpose, how do I create a user to run irssi from?

 

Actually got the list of users with

 

cut -d: -f1 /etc/passwd
root                                                                            
bin                                                                             
daemon                                                                          
mail                                                                            
ftp                                                                             
http                                                                            
nobody                                                                          
dbus                                                                            
systemd-journal-remote                                                          
systemd-network                                                                 
systemd-resolve                                                                 
systemd-timesync                                                                
systemd-coredump                                                                
uuidd                                                                           
privoxy                                                                         
git                                                                             
aurbuild  

 

Do I just pick one of these, for example privoxy, even though they don't seem like users for this purpose?

 

Also, since I deleted perms.txt to reset permissions rutorrent is no longer able to add torrents because of lack of permissions.

Edited by WiperWoper

Share this post


Link to post

@WiperWoper, the commands to figure out the UID and GID should be run at the host (your sinology machine), not the container. As a good default pick whatever user that docker is running or that actually owns the folders that you are writing to. More info about uid / gid and docker: https://medium.com/@mccode/understanding-how-uid-and-gid-work-in-docker-containers-c37a01d01cf

 

I would also start from the scratch, delete all files created before and run a new container with the right IDs.

 

Edited by Cat_Seeder

Share this post


Link to post
25 minutes ago, Cat_Seeder said:

@WiperWoper, the commands to figure out the UID and GID should be run at the host (your sinology machine), not the container. As a good default pick whatever user that docker is running or that actually owns the folders that you are writing to. More info about his / gid and docker: https://medium.com/@mccode/understanding-how-uid-and-gid-work-in-docker-containers-c37a01d01cf

 

I would also start from the scratch, delete all files created before and run a new container with the right IDs.

 

Ah, that makes sense. But yeah, I'll have to recreate the container to fix the permissions issue now anyway, so I'll figure out how to find the uid/gid in Synology and do that. Thanks!

Share this post


Link to post

Sorry if this has already been answered or spoken about. But im having GUI lock up due to cpu thread getting pinned at 100%. Ive tried the -t option in extra parameters but doesn't seem to make a difference. Have a threadripper 1920x and its just locking one thread at 100% and randomly changes which thread its using. Then the GUI sometimes comes back for a moment or everything crashes and restarts back up. Any ideas?

Share this post


Link to post
10 hours ago, binhex said:

that is a successful start, so the issue will most probably be lan_network setting, can you see Q4 from the following link to verify you have it configured correctly:-

https://github.com/binhex/documentation/blob/master/docker/faq/vpn.md

Yeah, I've read that and all my VLANS that need to talk to each other are connected as they should. My desktop is on the .20 VLAN that have full access to the host (.30) VLAN. The weird thing is that no matter how I config the LAN_NETWORK, it always jumps to 10.X instead of 10.1.X. I've tried to set it to 10.1.1.0, 10.1.30.0, even 192.168.1.0 as per your example, just to see if it works. And all VLANS are configured to be /24. If I turn off the VPN, the container works flawlessly on the server IP (10.1.30.30). The OS (Ubuntu Server) is running virtualized  on an XCP-ng host. Maybe that causes some issues? 

Share this post


Link to post

Quick update for @binhex and @Cat_Seeder, I got the issue with the users resolved and it's working now. No more bans from tracker ircs (hopefully). Thanks for the help and patience :)

Share this post


Link to post
On 2/14/2020 at 2:20 AM, binhex said:

Yes as I suspected you have some rogue value for vpn_options please remove the value for that env var.

Sent from my CLT-L09 using Tapatalk
 

Yep, that was it. Thank you very much!

Just curious, what are the uses of the 'vpn_options' field, and why would it cause an "auth-user-pass" error message?

Share this post


Link to post
Yep, that was it. Thank you very much!
Just curious, what are the uses of the 'vpn_options' field, and why would it cause an "auth-user-pass" error message?
Vpn_options is used to pass in additional OpenVPN options, aka parameters.

Sent from my CLT-L09 using Tapatalk

Share this post


Link to post

I'm trying to run this without the VPN option and am having a hard time figuring out how to get a port open on my router for seeding. Is there a guide somewhere showing the correct settings? I've read through this forum but haven't had much luck or I'm missing something. Any help would be appreciated.

Share this post


Link to post
I'm trying to run this without the VPN option and am having a hard time figuring out how to get a port open on my router for seeding. Is there a guide somewhere showing the correct settings? I've read through this forum but haven't had much luck or I'm missing something. Any help would be appreciated.
I follow this post.

Sendt fra min ONEPLUS A6003 med Tapatalk

Share this post


Link to post

I'm not having any luck searching this thread for the answer I need. Basically, got everything up and running fine. VPN works. GUI works. But as soon as I add a single torrent, the GUI starts freezing up and becomes unresponsive. If I refresh the GUI, it will sit on "Loading" for a random amount of time. A couple minutes sometimes, others it never seems to load the GUI at all. 

 

Only changes I've made are the listening port to the one specified by my VPN. 

 

Is there something simple that I'm not finding in my searches to fix this?

 

Edit: This appears to be related to "stuck" trackers. Found these threads for reference:

and this github issue:

 

https://github.com/rakshasa/rtorrent/issues/180

 

For me, a certain public tracker would immediately freeze the UI as soon as a torrent using that tracker was added. Removing that torrent would fix the issue.

 

@binhex

Have you ever dealt with this sort of issue in the past?

Edited by drawmonster

Share this post


Link to post
On 2/14/2020 at 8:38 PM, gnunin said:

Yeah, I've read that and all my VLANS that need to talk to each other are connected as they should. My desktop is on the .20 VLAN that have full access to the host (.30) VLAN.

although your vlan's are defined correctly to allow all traffic across multiple networks, this container is very strict as to what is permitted in/out, thus you need to define LAN_NETWORK to allow all your vlan's, using a comma to separate each network, e.g.:-

192.168.20.0/24,192.168.30.0/24

 

Share this post


Link to post
9 hours ago, eman31 said:

I'm trying to run this without the VPN option and am having a hard time figuring out how to get a port open on my router for seeding. Is there a guide somewhere showing the correct settings? I've read through this forum but haven't had much luck or I'm missing something. Any help would be appreciated.

so get a port forward setup on your router, once you have chosen a port then edit the file /config/rtorrent/config/rtorrent.rc and set the same port for the incoming port, note its a range in this file, so if its a single port then just define the same port twice with a hyphen between the ports, e.g.

network.port_range.set = 1234-1234

where 1234 is the port number you have set as a port forward on your router.

Edited by binhex

Share this post


Link to post
5 hours ago, binhex said:

so get a port forward setup on your router, once you have chosen a port then edit the file /config/rtorrent/config/rtorrent.rc and set the same port for the incoming port, note its a range in this file, so if its a single port then just define the same port twice with a hyphen between the ports, e.g.


network.port_range.set = 1234-1234

where 1234 is the port number you have set as a port forward on your router.

Thanks for the reply and sorry to be a total noob, what IP address do I forward the port to on my router? Is it the address of my unraid server or does the docker have it's own IP? I've tried the server address but it still says the port is closed. Should the STRICT_PORT_FORWARD in the docker setting be set to "yes" or "no"? I previously had it set to yes running with PIA.

Share this post


Link to post
1 minute ago, eman31 said:

Is it the address of my unraid server

yes.

1 minute ago, eman31 said:

Should the STRICT_PORT_FORWARD in the docker setting be set to "yes" or "no"?

it makes no difference if using this docker image with VPN_ENABLED = no, that is what you are doing right?, as per your comment below:-

 

15 hours ago, eman31 said:

I'm trying to run this without the VPN option

if you ARE attempting to setup port forwarding with the vpn enabled then that is a completely different scenario.

Share this post


Link to post
6 minutes ago, eman31 said:

Thanks for the reply and sorry to be a total noob, what IP address do I forward the port to on my router? Is it the address of my unraid server or does the docker have it's own IP? I've tried the server address but it still says the port is closed. Should the STRICT_PORT_FORWARD in the docker setting be set to "yes" or "no"? I previously had it set to yes running with PIA.

While I know next to nothing about Unraid, I would like to add to binhex answer above. There are 3 layers to think about when setting up port forwarding:

 

1. rtorrent has to be configured to listen at the desired port (what you did with rtorrent.rc)

2. Docker has to publish the ports to the outside world (e.g, with -p 1234:1234)

3. Your router has to forward requests to your Unraid box. That's what you do in the router's admin interface passing your Unraid server IP and port. Other than that you may also want to set your router DHCP server to always allocate the same IP to your Unraid box so that the setup is stable.

 

Cheers,

  • Like 1
  • Thanks 1

Share this post


Link to post

 

34 minutes ago, binhex said:

yes.

it makes no difference if using this docker image with VPN_ENABLED = no, that is what you are doing right?, as per your comment below:-

 

if you ARE attempting to setup port forwarding with the vpn enabled then that is a completely different scenario.

Correct, VPN_ENABLED is set to no but I wasn't sure about the other settings below that.

 

So what I've done so far is:

Stopped RTorrent docker.

Edited rtorrent.rc by uncomment line 77 and added a port range of 54130-54130.

Restarted RTorrent docker.

Add port forwarding rule to my router at IP 192.168.1.xx on port 54130.

Reboot router.

Start Rutorrent webui.

 

Everything starts fine but shows port 54130 Closed in the connection bar.

 

 

113188788_Screenshot(30)edited.thumb.jpg.f99319748dc9bd740ab517fc51a51b38.jpg

1581854766_Screenshot_2020-02-17NETGEARRouterR70002.thumb.jpg.e206d165b2fdcfff8d9fa727f544e127.jpg2123429361_Screenshot(32)edited.thumb.png.66d3d24285da7f3d2b2d3d2a5e74968c.png

Share this post


Link to post
3 hours ago, Cat_Seeder said:

While I know next to nothing about Unraid, I would like to add to binhex answer above. There are 3 layers to think about when setting up port forwarding:

 

1. rtorrent has to be configured to listen at the desired port (what you did with rtorrent.rc)

2. Docker has to publish the ports to the outside world (e.g, with -p 1234:1234)

3. Your router has to forward requests to your Unraid box. That's what you do in the router's admin interface passing your Unraid server IP and port. Other than that you may also want to set your router DHCP server to always allocate the same IP to your Unraid box so that the setup is stable.

 

Cheers,

I didn't see this when I was replying to binhex. Maybe 2. is what I'm missing. How would I run this parameter?

 

Edit: Ok I figured it out how to run the command by searching a little more.

 

In advanced view I added -p '54130:54130' to one of the empty lines at the top  and now it's showing connected.

 

Thanks for all the help! This has been driving me crazy for a week and I just wasn't able to find any solutions with all my searching.

Edited by eman31
Added fix

Share this post


Link to post
21 hours ago, binhex said:

although your vlan's are defined correctly to allow all traffic across multiple networks, this container is very strict as to what is permitted in/out, thus you need to define LAN_NETWORK to allow all your vlan's, using a comma to separate each network, e.g.:-


192.168.20.0/24,192.168.30.0/24

 

I made a new VM, tried the same settings & on that VM it just works. Even with the VPN. I do not know why, and I'll keep on trying to get it to work on the main docker host, but since I got it running, I consider my problem solved. Thanks for your time Binhex :)

Share this post


Link to post

I've enabled the autodl-irssi and attempted to set it up with my Trackers but I keep getting Timed out due to repeated attempts. If I ssh into the container and irssi I can see that it displays my 'nick' as "ISPPROVIDER@KJ7N_UKN9" etc not too sure what is happening, I haven't changed any settings in the config. I am also getting banned from the IRC' for attempting to use irc while root? I assume this means root user? How can I fix this? Any suggestions are appreciated sorry for the ignorance. Thank you

Share this post


Link to post
38 minutes ago, noraa said:

I am also getting banned from the IRC' for attempting to use irc while root? I assume this means root user? How can I fix this? Any suggestions are appreciated sorry for the ignorance. Thank you

Check out the conversation between WiperWoper, binhex and me starting bellow. Long story short, you need to set the right UID and GID.

 

Share this post


Link to post
On 2/14/2020 at 5:05 PM, WiperWoper said:

Quick update for @binhex and @Cat_Seeder, I got the issue with the users resolved and it's working now. No more bans from tracker ircs (hopefully). Thanks for the help and patience :)

Hey @WiperWoper I was wondering how you created the user for rTorrent irssi? I can't seem to get it worked and am also getting banned from IRC for running as root. Thank you!

Share this post


Link to post
5 hours ago, Cat_Seeder said:

Check out the conversation between WiperWoper, binhex and me starting bellow. Long story short, you need to set the right UID and GID.

 

I tried creating a new user following the readme. I created a new user "autodl" with uid/gid of 500 and applied to to the docker settings but upon launching I noticed in the logs it's saying

 

Set uid to user 0 succeeded
2020-02-18 11:32:40,281 INFO supervisord started with pid 6
2020-02-18 11:32:41,283 INFO spawned: 'irssi-script' with pid 108
2020-02-18 11:32:41,285 INFO spawned: 'logrotate-script' with pid 109
2020-02-18 11:32:41,286 INFO spawned: 'pyrocore-script' with pid 110
2020-02-18 11:32:41,287 INFO spawned: 'rutorrent-script' with pid 111
2020-02-18 11:32:41,289 INFO spawned: 'start-script' with pid 112
2020-02-18 11:32:41,290 INFO spawned: 'watchdog-script' with pid 113
2020-02-18 11:32:41,291 INFO reaped unknown pid 7

 

Shouldn't it be running this with the newly created autodl user? I have changed it in the docker settings and deleted the perms.txt as well as the entire container and /config. Any suggestions are appreciated.

Share this post


Link to post

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.