Bonjour et très belle année à tous,
Je viens de relancer une installation de seedbox sur une debian 11 (+tuto sécurité) à partir du tuto d'ex_rat qui fonctionne toujours aussi bien. Je bloque cependant sur la fin depuis ce matin et je commence à désespérer... alors je viens chercher un peu d'aide.
J'ai l'erreur fréquente
Lien incorrect avec rTorrent. Vérifiez qu'il soit bien en cours d'exécution. Vérifiez la configuration de $scgi_port et de $scgi_host dans config.php et de scgi_port dans le fichier de configuration de rTorrent.
Pour l'avoir déjà rencontrée par le passé, voici ce que je peux dire :
- j'ai passé en revue les fichiers .rtorrent.rc et rutorrent/conf/config.php, ainsi que le vhost nginx. Il me semble que tout est ok mais je les poste tout de même ci-dessous au cas où.
- les plugin logoff et filemanager ne sont pas installés (je n'en ai pas besoin).
- rtorrent est bien actif (v. ci-dessous).
Je me demande si ce n'est pas plutôt un problème de droits sur je ne sais quel fichier... Ce qui m'a mis la puce à l'oreille, ce sont les échanges entre @chapit-nicolas et @Magicalex ici. Car si je lance un...
su ascun
rtorrent
... alors l'interface web rutorrent fonctionne et l'erreur scgi_host scgi_port disparaît. Mais dès que je me déconnecte du ssh, l'erreur reparaît immédiatement. Enfin, en plus violent :
[07.01.2023 17:59:53] Bad response from server: (502 [error,list]) <!DOCTYPE html> <html> <head> <title>Error</title> <style> html { color-scheme: light dark; } body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } </style> </head> <body> <h1>An error occurred.</h1> <p>Sorry, the page you are looking for is currently unavailable.<br/> Please try again later.</p> <p>If you are the system administrator of this resource then you should check the error log for details.</p> <p><em>Faithfully yours, nginx.</em></p> </body> </html>
J'ai beau essayer de comprendre comment fonctionne le système de droits sur les fichiers et dossier (j'ai lu plein de trucs sur chmod), je n'arrive pas à identifier celui qui n'a pas les bonnes permissions et quelles permissions je peux lui donner. Bon après, si ça se trouve, c'est complètement autre chose...
Un grand merci à ceux qui pourront me donner un coup de main !
Les commandes et fichiers qui pourraient être utile à celui qui pourra m'aider
systemctl status ascun-rtorrent
● ascun-rtorrent.service - LSB: Start daemon at boot time
Loaded: loaded (/etc/init.d/ascun-rtorrent; generated)
Active: active (exited) since Sat 2023-01-07 17:29:43 CET; 16min ago
Docs: man:systemd-sysv-generator(8)
Process: 417 ExecStart=/etc/init.d/ascun-rtorrent start (code=exited, status=0/SUCCESS)
CPU: 13ms
Jan 07 17:29:43 AMS-446076 systemd[1]: Starting LSB: Start daemon at boot time...
Jan 07 17:29:43 AMS-446076 ascun-rtorrent[417]: Starting rtorrent...
Jan 07 17:29:43 AMS-446076 ascun-rtorrent[420]: su: user <username> does not exist or the user entry does not contain all the required fields
Jan 07 17:29:43 AMS-446076 systemd[1]: Started LSB: Start daemon at boot time.
.rtorrent.rc
network.scgi.open_port = 127.0.0.1:5001
encoding.add = UTF-8
network.port_range.set = 45000-65000
network.port_random.set = no
pieces.hash.on_completion.set = no
directory.default.set = /home/ascun/torrents
session.path.set = /home/ascun/.session
protocol.encryption.set = allow_incoming, try_outgoing, enable_retry
schedule2 = watch_directory,1,1,load.start=/home/ascun/watch/*.torrent
schedule2 = untied_directory,5,5,stop_untied=/home/ascun/watch/*.torrent
schedule2 = espace_disque_insuffisant,1,30,close_low_diskspace=500M
trackers.use_udp.set = yes
dht.mode.set = off
protocol.pex.set = no
throttle.min_peers.normal.set = 40
throttle.max_peers.normal.set = 100
throttle.min_peers.seed.set = 10
throttle.max_peers.seed.set = 50
throttle.max_uploads.set = 15
execute2 = {sh,-c,/usr/bin/php /var/www/rutorrent/php/initplugins.php ascun &}
/etc/nginx/sites-enabled/seedbox.conf
server {
listen 80 default_server;
server_name _;
charset utf-8;
index index.html index.php;
client_max_body_size 10M;
access_log /var/log/nginx/rutorrent-access.log combined;
error_log /var/log/nginx/rutorrent-error.log error;
error_page 500 502 503 504 /50x.html;
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
root /var/www;
location = /50x.html {
root /usr/share/nginx/html;
}
location = /favicon.ico {
access_log off;
log_not_found off;
}
location /rutorrent {
try_files $uri $uri/ /index.html;
}
location ~ ^/rutorrent/(conf|share)/(.+)$ {
deny all;
}
location ~ \.php$ {
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
location ~* \.(jpg|jpeg|gif|css|png|js|map|woff|woff2|ttf|svg|eot)$ {
expires 30d;
access_log off;
}
location = /ASCUN {
include scgi_params;
scgi_pass 127.0.0.1:5001;
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_ascun";
}
}
/var/www/rutorrent/conf/users/ascun/config.php
<?php
$pathToExternals = array(
"curl" => '/usr/bin/curl',
"stat" => '/usr/bin/stat',
"php" => '/usr/bin/php7.4',
"pgrep" => '/usr/bin/pgrep',
"python" => '/usr/bin/python3'
);
$topDirectory = '/home/ascun';
$scgi_port = 5001;
$scgi_host = '127.0.0.1';
$XMLRPCMountPoint = '/ASCUN';