- Modifié
ps -ef | grep rtorrent
root 7122 4308 0 14:02 pts/0 00:00:00 grep rtorrent
C'est de la que le problème viens je pense car je n'ai pas de lancement de rtorrent sur mon user.
pourtant la commande
service mcfly-rtorrent restart
Ne me renvoie aucune erreur.
J'ai suivie le tuto de Ex_rat pour donner les droit au dossier et le script de demarage de rtorrent mais rien.
Vraiment Bizarre
J'ai deja reinstaller 3 fois depuis une fresh install pour voir.
Je vais re essayer depuis le scrip de ex_rat et non celui de xavier au cas ou.
En tous cas merci pour vos pistes
PS j'ai suivi aussi se poste https://mondedie.fr/d/7898-FAQ-ruTorrent-La-Foire-Aux-Questions-de-ruTorrent/2
script Ex_rat installé
Même problème
service <username>-rtorrent start
service <username>-rtorrent restart
je n'ai plus q'une erreur de liaison.
screen -ls
No Sockets found in /run/screen/S-root.
En cour je reprend la petite a faim
service nginx status
● nginx.service - nginx - high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-10-27 14:59:17 CEST; 44min ago
Docs: http://nginx.org/en/docs/
Process: 876 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=
Main PID: 921 (nginx)
Tasks: 9 (limit: 4915)
CGroup: /system.slice/nginx.service
├─921 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
├─922 nginx: worker process
├─923 nginx: worker process
├─924 nginx: worker process
├─925 nginx: worker process
├─926 nginx: worker process
├─927 nginx: worker process
├─928 nginx: worker process
└─929 nginx: worker process
oct. 27 14:59:15 ns381901 systemd[1]: Starting nginx - high performance web server...
oct. 27 14:59:17 ns381901 systemd[1]: Started nginx - high performance web server.
systemctl status php7.2-fpm
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enab
Active: active (running) since Sat 2018-10-27 14:59:19 CEST; 47min ago
Docs: man:php-fpm7.2(8)
Main PID: 872 (php-fpm7.2)
Status: "Processes active: 0, idle: 2, Requests: 304, slow: 0, Traffic: 0.1req/sec"
Tasks: 3 (limit: 4915)
CGroup: /system.slice/php7.2-fpm.service
├─872 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf)
├─957 php-fpm: pool www
└─958 php-fpm: pool www
oct. 27 14:59:15 ns381901 systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
oct. 27 14:59:19 ns381901 systemd[1]: Started The PHP 7.2 FastCGI Process Manager.
service php7.2-fpm status
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enab
Active: active (running) since Sat 2018-10-27 14:59:19 CEST; 49min ago
Docs: man:php-fpm7.2(8)
Main PID: 872 (php-fpm7.2)
Status: "Processes active: 0, idle: 2, Requests: 318, slow: 0, Traffic: 0.1req/sec"
Tasks: 3 (limit: 4915)
CGroup: /system.slice/php7.2-fpm.service
├─872 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf)
├─957 php-fpm: pool www
└─958 php-fpm: pool www
oct. 27 14:59:15 ns381901 systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
oct. 27 14:59:19 ns381901 systemd[1]: Started The PHP 7.2 FastCGI Process Manager.
service nginx restart && service php7.2-fpm restart
pas d'erreurs
/etc/init.d/nginx restart && /etc/init.d/php7.2-fpm restart
[ ok ] Restarting nginx (via systemctl): nginx.service.
[ ok ] Restarting php7.2-fpm (via systemctl): php7.2-fpm.service.
systemctl restart php7.2-fpm && systemctl restart nginx
Pas d'erreurs
ps -ef | grep rtorrent
root 16346 4741 0 15:52 pts/2 00:00:00 grep rtorrent
C'est la le problème je pense
su - <username>
rtorrent
ca se lance et je reviens cette fois avec le problème 502 php
Je supprime Le .torrent et .nfo puis relance rtorrent via seedbox-manager avec irssi
Bad response from server: (502 [error,list]) <!DOCTYPE html> <html> <head> <title>Error</title> <style> 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 <a href="http://nginx.org/r/error_log">error log</a> for details.</p> <p><em>Faithfully yours, nginx.</em></p> </body> </html>
service nginx restart
fin de l'erreur 502 PHP retour de l'erreur liaison.
ps -ef | grep rtorrent
root 20249 20182 0 16:06 pts/2 00:00:00 grep rtorrent
cat /etc/init.d/mcfly-rtorrent
#!/usr/bin/env bash
Dépendance : screen, killall et rtorrent
BEGIN INIT INFO
Provides: mcfly-rtorrent
Required-Start: $syslog $network
Required-Stop: $syslog $network
Default-Start: 2 3 4 5
Default-Stop: 0 1 6
Short-Description: Start daemon at boot time
Description: Start-Stop rtorrent user session
END INIT INFO
Début configuration
user="mcfly"
Fin configuration
rt_start() {
su --command="screen -dmS ${user}-rtorrent rtorrent" "${user}"
}
rt_stop() {
killall --user "${user}" screen
}
case "$1" in
start) echo "Starting rtorrent..."; rt_start
;;
stop) echo "Stopping rtorrent..."; rt_stop
;;
restart) echo "Restart rtorrent..."; rt_stop; sleep 1; rt_start
;;
*) echo "Usage: $0 {start|stop|restart}"; exit 1
;;
esac
exit 0
j'ai supprimer les espace pour simplifier la mise en page sur le post.
nano /etc/nginx/sites-enabled/rutorrent.conf
include /etc/nginx/conf.d/log_rutorrent.conf;
server {
listen 80 default_server;
listen 443 default_server ssl http2;
server_name _;
index index.html index.php;
charset utf-8;
client_max_body_size 10M;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
include /etc/nginx/conf.d/ciphers.conf;
access_log /var/log/nginx/rutorrent-access.log combined if=$loggable;
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 = /favicon.ico {
access_log off;
log_not_found off;
}
location = /50x.html {
root /usr/share/nginx/html;
}
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.2-fpm.sock;
}
location ~* \.(jpg|jpeg|gif|css|png|js|map|woff|woff2|ttf|svg|eot)$ {
expires 30d;
access_log off;
}
location ~* \.(eot|ttf|woff|svg)$ {
add_header Acccess-Control-Allow-Origin *;
}
## Config accueil serveur ##
location ^~ / {
root /var/www/base;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
}
## Config rutorrent ##
location /rutorrent {
try_files $uri $uri/ /index.html;
}
location ~ ^/rutorrent/(conf|share)/(.+)$ {
deny all;
}
## Config munin ##
location /graph {
}
location /graph/img {
error_log /dev/null crit;
}
location /monitoring {
auth_basic "Monitoring";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_mcfly";
}
location ^~ /nginx_status {
stub_status on;
access_log off;
satisfy any;
allow 127.0.0.1;
deny all;
}
## Config seedbox-manager ##
location /seedbox-manager {
try_files /seedbox-manager/$uri /seedbox-manager/index.php$is_args$args;
}
## Config utilisateurs ##
location /MCFLY {
include scgi_params;
scgi_pass 127.0.0.1:5001;
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_mcfly";
}
}
nano /home/mcfly/.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/mcfly/torrents
session.path.set = /home/mcfly/.session
protocol.encryption.set = allow_incoming, try_outgoing, enable_retry
schedule2 = watch_directory,1,1,load.start=/home/mcfly/watch/.torrent
schedule2 = untied_directory,5,5,stop_untied=/home/mcfly/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 mcfly &}
nano /etc/php/7.2/fpm/pool.d/www.conf
Sur demande car c'est un pavé ce fichier
nano /var/www/rutorrent/conf/config.php
<?php
// configuration parameters
// for snoopy client
@define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0', true);
@define('HTTP_TIME_OUT', 30, true); // in seconds
@define('HTTP_USE_GZIP', true, true);
$httpIP = null; // IP string. Or null for any.
@define('RPC_TIME_OUT', 5, true); // in seconds
@define('LOG_RPC_CALLS', false, true);
@define('LOG_RPC_FAULTS', true, true);
// for php
@define('PHP_USE_GZIP', false, true);
@define('PHP_GZIP_LEVEL', 2, true);
$schedule_rand = 10; // rand for schedulers start, +0..X seconds
$do_diagnostic = true;
$log_file = '/tmp/errors.log'; // path to log file (comment or leave blank to disable logging)
$saveUploadedTorrents = true; // Save uploaded torrents to profile/torrents directory or not
$overwriteUploadedTorrents = false; // Overwrite existing uploaded torrents in profile/torrents directory or make unique name
$topDirectory = '/'; // Upper available directory. Absolute path with trail slash.
$forbidUserSettings = false;
$scgi_port = 5000;
$scgi_host = "127.0.0.1";
// For web->rtorrent link through unix domain socket
// (scgi_local in rtorrent conf file), change variables
// above to something like this:
//
// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";
$XMLRPCMountPoint = "/RPC2"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
$pathToExternals = array(
"php" => '', // Something like /usr/bin/php. If empty, will be found in PATH.
"curl" => '', // Something like /usr/bin/curl. If empty, will be found in PATH.
"gzip" => '', // Something like /usr/bin/gzip. If empty, will be found in PATH.
"id" => '', // Something like /usr/bin/id. If empty, will be found in PATH.
"stat" => '', // Something like /usr/bin/stat. If empty, will be found in PATH.
);
$localhosts = array( // list of local interfaces
"127.0.0.1",
"localhost",
);
$profilePath = '../share'; // Path to user profiles
$profileMask = 0777; // Mask for files and directory creation in user profiles.
// Both Webserver and rtorrent users must have read-write access to it.
// For example, if Webserver and rtorrent users are in the same group then the value may be 0770.
$tempDirectory = null; // Temp directory. Absolute path with trail slash. If null, then autodetect will be used.
$canUseXSendFile = false; // If true then use X-Sendfile feature if it exist
$locale = "UTF8";
nano /var/www/rutorrent/conf/users/mcfly/config.php
<?php
$pathToExternals = array(
"curl" => '/usr/bin/curl',
"stat" => '/usr/bin/stat',
);
$topDirectory = '/home/mcfly';
$scgi_port = 5001;
$scgi_host = '127.0.0.1';
$XMLRPCMountPoint = '/MCFLY';
Merci d'avance