add a new user does not work $scgi_port and $scgi_host?

simur612

Member
May 25, 2018
879
0
16
Hi every one,

I'm new in the rtorrent.
I Followed of all the steps in this topic http://forums.rutorrent.org/index.php?topic=256.0
all steps OK.

but the last step : Multi-user setup.
I doing every steps but not work when I login with <second_username> show me this error : "Bad link to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file."

I'm sure of the steps that I did:
These steps of $scgi_port and $scgi_host in the topic:

1. edit /etc/apache2/apache2.conf and add SCGIMount /RPC3 127.0.0.1:5001 .
2. edit /home/<second_username>/.rtorrent.rc and change port_range and scgi_port. and replace <username> to <second_username>.
3. copy /etc/init.d/rtorrent to /etc/init.d/rtorrent2, and edit /etc/init.d/rtorrent2 user="<username>".
4. copy /var/www/rutorrent/conf/config.php to /var/www/rutorrent/conf/users/<second_username>.
5. edit /var/www/rutorrent/conf/users/<second_username>/config.php $scgi_port to 5001 and $XMLRPCMountPoint to /RPC3.
6. login to https://<servername or IP>/rutorrent/ with details <second_username> but still show me the error .

The first user is working well.

any one can give me advise what I do ?
 

peshua19

Member
May 25, 2018
897
0
16
Hi,

Which error message rutorrent give you. This one will help us to know what happened.

++
 

simur612

Member
May 25, 2018
879
0
16
Quote
Hi,

Which error message rutorrent give you. This one will help us to know what happened.

++​


"Bad link to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file."
 

randac56

Member
May 25, 2018
915
0
16
Quote
2. edit /home/<second_username>/.rtorrent.rc and change port_range and scgi_port. and replace​

username - is a login of your rtorrent user. This account must exist in your sustem, it has home directory etc.
second_username - is a login of your *web-server* user. It's hasn't relation to system users at all.
rtorrent doesn't know anything about web-server user. For which reason your edit /home/<second_username>/.rtorrent.rc?
 

simur612

Member
May 25, 2018
879
0
16
Quote
Quote
2. edit /home/<second_username>/.rtorrent.rc and change port_range and scgi_port. and replace​

username - is a login of your rtorrent user. This account must exist in your sustem, it has home directory etc.
second_username - is a login of your *web-server* user. It's hasn't relation to system users at all.
rtorrent doesn't know anything about web-server user. For which reason your edit /home/<second_username>/.rtorrent.rc?​


in this topic http://forums.rutorrent.org/index.php?topic=256.0 said after adduser in step multi-user setup ,
he add in apache2.conf last line SCGIMount /RPC3 127.0.0.1:5001.

Quote
rtorrent config and startup

Each user needs to run their own instance of rtorrent. Each instance of rtorrent needs its own config file.
So we need to copy our previously created .rtorrent.rc config file and edit it specifically for this user​


For this reason to edit /home/<second_username>/.rtorrent.rc !!
 

lisas4567

Member
May 25, 2018
773
0
16
did you start rtorrent for that user also?
thats the only step you failed to mention.

when in doubt, read the error message 5 more times
 

saroos1

Member
May 25, 2018
718
0
16
Also remember to restart apache after you make changes to it's config.

With multipule user set-up , I would say use the cronjobs per user to start rtorrent
Not the init.d script , as then I believe you need to make a script for every user

If after this you still need help .. pm me
 

simur612

Member
May 25, 2018
879
0
16
Quote
did you start rtorrent for that user also?
thats the only step you failed to mention.

when in doubt, read the error message 5 more times​


I have 2 users.
user1(like root)= is running OK with rutorrent
user2(normal user)= can he login to rutorrent but give hem this error "Bad link to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file."


I am now confused with this problem, Is tutorial in this link http://forums.rutorrent.org/index.php?topic=256.0 true for adding multiple users?
I followed the tutorial step by step .
 

simur612

Member
May 25, 2018
879
0
16
Quote
Also remember to restart apache after you make changes to it's config.

With multipule user set-up , I would say use the cronjobs per user to start rtorrent
Not the init.d script , as then I believe you need to make a script for every user

If after this you still need help .. pm me​


yes I restart apache after edit any thing.
How do I enable cronjobs? Can you can give me a way to do it?
 

saroos1

Member
May 25, 2018
718
0
16
you made a mistake somewhere.

That error tells you exactly what the problem is.


either:

Rtorrent is not running
rtorrent is running but isn't set with the proper scgi
rtorrent ius running, scgi is set in rtorrent but not set properly in the web browser
rtorrent is running, scgi is correct in rtorrent and the webserver but not correct in rutorrent
 

peshua19

Member
May 25, 2018
897
0
16
What I am missing in the tutorial is the following :




* LOGIN with the NEW USER
* Start Rtorrent for the new user

Here is the script you use : http://forums.rutorrent.org/index.php?topic=121.0

I have called this : chkrtorrent.sh , I have put this into : /usr/local/bin/
And made it 777 , so all users can use it

Then I login as the NEW USER

* Type : crontab -e
* put this in crontab :

@reboot /usr/local/bin/chkrtorrent >/dev/null 2>&1
@reboot /usr/bin/screen -D -m /usr/local/bin/rtorrent
*/5 * * * * /usr/local/bin/chkrtorrent >/dev/null 2>&1

* Close crontab.

now try the following command :

/usr/local/bin/chkrtorrent

And if all is ok this should start rtorrent

Hope it helps you