rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.07k stars 408 forks source link

Can't start rtorrent daemon when `scgi` port is open in `rtorrent.rc` #1085

Closed techsk8 closed 3 years ago

techsk8 commented 3 years ago

I have this uncommented in my rtorrent.rc: network.scgi.open_port = 127.0.0.1:5000. If I do comment it out rtorrent starts. but I can't access it through RuTorrent. So what do I do? This happens when the port is open:

May 27 18:43:27 $HOSTNAME systemd[1]: Starting rTorrent System Daemon...
May 27 18:43:27 $HOSTNAME systemd[1]: Started rTorrent System Daemon.
May 27 18:43:27 $HOSTNAME rtorrent[44031]: rtorrent: Error in option file: ~/.rtorrent.rc:110: SCGI already enabled.
May 27 18:43:27 $HOSTNAME systemd[1]: rtorrent.service: Main process exited, code=exited, status=255/EXCEPTION
May 27 18:43:27 $HOSTNAME systemd[1]: rtorrent.service: Failed with result 'exit-code'.

And inside rutorrent I it says: 'Torrent list not yet available, connection to rTorrent not established' when the line that opens the scgi port is commented out.

pyroscope commented 3 years ago

Read the error. Find the OTHER scgi config line.

techsk8 commented 3 years ago

At the time there was only one line commented out about SCGI_port. I made sure of it.

Xian-beep commented 3 years ago

I have a similar issue has reported above.

I use: rtorrent/stable 0.9.7-1 armhf

When trying to run rtorrent as a systemd unit, i get the following message when checking journalctl -xe rtorrent: Error in option file: ~/.rtorrent.rc:75: SCGI already enabled..

I on the other hand, try to use the unix sockets instead since why not. So the following is the config string.

73: # Unix Socket
74: system.daemon.set = true
75: network.scgi.open_local = /home/rtorrent/rpc.socket
76: execute.nothrow = chmod,770,/home/rtorrent/rpc.socket

The second i comment out network.scgi.open_local rtorrent springs to life. Albeit, there is no way to connect to flood ui / rutorrent if that is the case.

The systemd unit used looks like this:

[Unit]
Description=rTorrent System Daemon
After=network.target

[Service]
Type=simple
User=rtorrent
Group=rtorrent
ExecStartPre=/bin/rm -f /mnt/file/rtorrent/sessions/rtorrent.lock
ExecStart=/usr/bin/rtorrent -o import=/home/rtorrent/.rtorrent.rc
Restart=on-failure
RestartSec=3
WorkingDirectory=/home/rtorrent

[Install]
WantedBy=multi-user.target

If i search for scgi i can't find another line except network.scgi.open_local. Am i missing something? Previously i ran the systemd script with screen. But i figured i could use the daemon mode if it's there anyways.

pyroscope commented 3 years ago

Well, search harder. The easiest way to find this is to place the scgi cmd ON TOP of the main config, which will then make that other scgi cmd in there error out. Presto, you found it.

anon-127 commented 3 years ago

same problem for me.

sumoo13 commented 3 years ago

i have the same problem, i have placed the line on the top og=f rtorrent.rc, but it's same ! someone have an idea ? how to see other scgi used ?

rakshasa commented 3 years ago

You're missing the -n option to disable the default loading of ~/.rtorrent.rc.