Just lost connectivity between autoirssi and rtorrent

[2017-02-24 23:53:56] Error downloading files. Make sure autodl-irssi is started and configured properly (eg. password, port number): Error getting files listing: Error: Could not connect: (111) Connection refused
[2017-02-24 23:54:00] Command failed: Error: Could not connect: (111) Connection refused

It just stopped working over night…

any tips?

Try going to the dashboard and click the restart iRSSi-AutoDL button in the service control center widget.

I have restarted and rebooted the box . the problem is still there.

irssi is running and rtorrent is also running fine.

I would recommend going into server via ssh and re-attach the irssi screen. From there you can diagnose what the problem really is.
screen -r irssi should do the trick. Let us know what it says.

yeah I usually watch the reg exp catching releases in the status window of irssi, its up and running just fine.

00:23 -!- Irssi: Matched dfgdfg in sdfsf, 21.90 GB (1 FL), TTT
00:23 -!- Irssi: (1 FL) Download 1 / 1 for the day starting Sat Feb 25 00:00:00 GMT
00:23 -!- Irssi: Waiting 1 seconds. sdfdf , TTT
00:23 -!- Irssi: Sent torrent to rtorrent sdfsdf , TTT, total time 2.913 seconds
01:00 [TTT] -!- RRR [~RRR@dfh45456CA9.] has quit [Client exited]
02:00 [TTT] -!- RRR [~RRR@345345CA6ECA9.] has quit [Client exited]
03:00 [TTT] -!- RRR [~RRR@345dfgd1CA6ECA9.] has quit [Client exited]
03:39 -!- Irssi: Matched Ftryrtutyutruy in abc, 8.30 GB (1 FL 0 to 4GB), TTT
03:39 -!- Irssi: (1 FL 0 to 4GB) Download 1 / 1 for the day starting Sat Feb 25 00:00:00 GMT
03:39 -!- Irssi: Sent torrent to rtorrent Fertyertyry, TTT, total time 0.339 seconds

I took a closer look now and the torrentfiles are added correctly, but I can’t edit the filters,preferences, IRc servers via the gui. All autoirssi menus can’t be accessed.

How can I debug the autoirssi script from within irssi?

Well it looks like the actual irssi client is fine if it’s still grabbing releases. The issue is the irssi plugin for rutorrent. It could be that the plugin just needs to be reinstalled. You can toggle the switch uninstall/install in your dashboard plugins menu.

I reinstalled the autoirssi plugin , but the problem persits.

I think I found why theres a problem. I got this error message in irssi:
“09:03 -!- Irssi: GUI server disabled. Got error: Could not bind to port 20507: Address already in use”

but I only have one irssi running

There are screens on:
5524.irssi (02/24/2017 10:53:44 PM) (Detached)
624.rtorrent (02/24/2017 08:35:30 PM) (Detached)

Hello @noone2000,

You could see which process is using the port 20507 with these commands :

  • netstat -tulpn | grep :20507
  • ls -l /proc/PIDretrievedFromThePreviousCommand/exe

More info here : https://www.cyberciti.biz/faq/what-process-has-open-linux-port/

netstat
tcp 0 0 127.0.0.1:20507 0.0.0.0:* LISTEN 625/rtorrent

/proc/625/exe -> /usr/bin/rtorrent

hm does the irssi plugin autodl try to start a process that listen to 20507?

Could you do screen -r 5524 (based on your previoulsy screen -ls) and tell us what it displays?

thats just irssi

5524.irssi

that works just fine, joinaning channels and adding torrent files from announcechannels.

I guess you have the port 20507 configured in your /home/MasterUser/.autodl/autodl2.cfg file ?
Could you tell me which SCGI port is configured in your /home/MasterUser/.rtorrent.rc file ?

.rtorrent.rc :
network.port_random.set = yes
network.port_range.set = 12871-12971
network.scgi.open_port = localhost:20507
network.tos.set = throughput
pieces.hash.on_completion.set = no
protocol.pex.set = no

/home/user/.autodl/autodl.cfg:
autodl.cfg
[options]
gui-server-port = 20507
gui-server-password = PASSWORD
upload-type = rtorrent

That’s why you have an error with irssi, ruTorrent is already using the port 20507.

Normaly you should have the port 12871 as the rTorrent SCGI port thanks to the installation script.
A better and simplier solution should be to replace your SCGI port with 12871 to do not have to modify any irssi files (and restart rtorrent obviously) :wink: But if you have already configured some services like CP, Radarr, Sonarr, etc. which are using the SCGI port for downloading with rTorrent, you will need to reconfigure them.

If you still want to modify your irssi port :

  • cp /home/MasterUser/.autodl/autodl2.cfg /home/MasterUser/.autodl/autodl2.cfg.old
  • nano /home/MasterUser/.autodl/autodl2.cfg and change the irssi port (E.g. 20508, please check if the port is not used with netstat -tulpn | grep :20508)
  • cp /srv/rutorrent/conf/users/MasterUser/config.php /srv/rutorrent/conf/users/MasterUser/config.php.old
  • nano /srv/rutorrent/conf/users/MasterUser/config.php and replace the old irssi port by the new one at line 25 : $autodlPort = 20508;
  • Restart irssi with sudo systemctl restart [email protected]
  • Try to connect to the irssi GUI from ruTorrent :slight_smile:

PS : if it works, you can delete files autodl2.cfg.old & config.php.old :wink:

I noticed that in /srv …/config.php

the autodl port and password was different from in autodl.cfg

I change the config.php to the lines found in autodl.cfg
and now I get

“[2017-03-01 15:47:23] Error downloading files. Make sure autodl-irssi is started and configured properly (eg. password, port number): Error getting files listing: Error: Could not decode json string”

ok

scgi_port = 20508;
autodlport cant be the same here.

We got two ports and two passwords that need to match. Which port is which?

im autodl.cfg I got
autodl.cfg
[options]
gui-server-port = 20508
gui-server-password = PASSWORD

in the .rtorrent.rc
.rtorrent.rc

– START HERE –

directory.default.set = /mnt/incomming
encoding.add = UTF-8
encryption = allow_incoming,try_outgoing,enable_retry
execute.nothrow = chmod,777,/home/xxx/.config/rpc.socket
execute.nothrow = chmod,777,/home/xx/.sessions
network.port_random.set = yes
network.port_range.set = 11871-13371
network.scgi.open_port = localhost:20508

what port is gui server? scgi or autodl?

I tried myself to change the irssi port and it works, could you confirm that you have :

In the /home/MasterUser/.rtorrent.rc file :

  • network.scgi.open_port = localhost:20507

In the /home/MasterUser/.autodl/autodl2.cfg file :

  • gui-server-port = 20508
  • gui-server-password = irssiPassword

In the /srv/rutorrent/conf/users/MasterUser/config.php file :

  • $scgi_port = 20507;
  • $autodlPort = 20508;
  • $autodlPassword = “irssiPassword”;

if yes : sudo systemctl restart [email protected]; should be working!

You changed SCGI port range between the two posts where pasted .rtorrent.rc configuration no ?
First time 12871-12971 and second time 11871-13371, you should be careful when you modify some files :wink: (alway make backup files)

I edited the ports to what I though was correct and got it to work! thnx!
really odd tho I wonder what made the changes in the first place.

Well done :+1:

1 Like