• Archive
  • [Discussion] Installer ruTorrent sur Debian 9 {nginx & php-fpm}

wget -c 'https://github.com/rakshasa/rtorrent/archive/master.zip' -O rtorrent_master.zip
wget -c 'https://github.com/rakshasa/libtorrent/archive/master.zip' -O libtorrent_master.zip

Bonsoir,

il existe une autre façon @palouf34 afin de les récupérer.
Et non car malgré quelques tentatives, a priori il n'y a aucun problème (pour le moment).

Cordialement.

merci pour le lien.

La compilation ne passe pas car impossible de faire le checkout feature-bind vue que cela vient pas du repos GIT.

voila les erreur que j'obtiens lors de la compilation de libtorrent:

bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..  -I. -I./.. -I../.. -I/usr/include -I/usr/include  -pthread  -g -O2 -g -DDEBUG -Wall -fvisibility=hidden  -MT diffie_hellman.lo -MD -MP -MF .deps/diffie_hellman.Tpo -c -o diffie_hellman.lo diffie_hellman.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I../.. -I/usr/include -I/usr/include -pthread -g -O2 -g -DDEBUG -Wall -fvisibility=hidden -MT diffie_hellman.lo -MD -MP -MF .deps/diffie_hellman.Tpo -c diffie_hellman.cc  -fPIC -DPIC -o .libs/diffie_hellman.o
diffie_hellman.cc: In constructor ‘torrent::DiffieHellman::DiffieHellman(const unsigned char*, int, const unsigned char*, int)’:
diffie_hellman.cc:58:7: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
   m_dh->p = BN_bin2bn(prime, primeLength, NULL);
       ^~
In file included from /usr/include/openssl/bn.h:32:0,
                 from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
diffie_hellman.cc:59:7: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
   m_dh->g = BN_bin2bn(generator, generatorLength, NULL);
       ^~
In file included from /usr/include/openssl/bn.h:32:0,
                 from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
diffie_hellman.cc: In member function ‘bool torrent::DiffieHellman::is_valid() const’:
diffie_hellman.cc:77:30: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
   return m_dh != NULL && m_dh->pub_key != NULL;
                              ^~
In file included from /usr/include/openssl/bn.h:32:0,
                 from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
diffie_hellman.cc: In member function ‘bool torrent::DiffieHellman::compute_secret(const unsigned char*, unsigned int)’:
diffie_hellman.cc:95:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   return m_size != -1;
          ~~~~~~~^~~~~
In file included from diffie_hellman.cc:43:0:
diffie_hellman.cc: In member function ‘void torrent::DiffieHellman::store_pub_key(unsigned char*, unsigned int)’:
diffie_hellman.cc:106:39: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
   if ((int)length >= BN_num_bytes(m_dh->pub_key))
                                       ^
In file included from /usr/include/openssl/bn.h:32:0,
                 from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
diffie_hellman.cc:107:19: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
     BN_bn2bin(m_dh->pub_key, dest + length - BN_num_bytes(m_dh->pub_key));
                   ^~
In file included from /usr/include/openssl/bn.h:32:0,
                 from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
In file included from diffie_hellman.cc:43:0:
diffie_hellman.cc:107:63: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
     BN_bn2bin(m_dh->pub_key, dest + length - BN_num_bytes(m_dh->pub_key));
                                                               ^
In file included from /usr/include/openssl/bn.h:32:0,
                 from diffie_hellman.cc:43:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
Makefile:422 : la recette pour la cible « diffie_hellman.lo » a échouée
make[3]: *** [diffie_hellman.lo] Erreur 1
make[3] : on quitte le répertoire « /tmp/libtorrent/src/utils »
Makefile:573 : la recette pour la cible « all-recursive » a échouée
make[2]: *** [all-recursive] Erreur 1
make[2] : on quitte le répertoire « /tmp/libtorrent/src »
Makefile:503 : la recette pour la cible « all-recursive » a échouée
make[1]: *** [all-recursive] Erreur 1
make[1] : on quitte le répertoire « /tmp/libtorrent »
Makefile:412 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2

je suppose que je ne dois pas allez plus loin dans le tuto tant que cette lib n'est pas compiler correctement.

cordialement.

D'ac de rien, je viens de regardé et j'espère avoir trouvé une solution :

wget -c 'https://github.com/rakshasa/rtorrent/archive/feature-bind.zip' -O rtorrent_master_feature-bind.zip
wget -c 'https://github.com/rakshasa/libtorrent/archive/feature-bind.zip' -O rtorrent_master_feature-bind.zip

Cordialement.

merci pour ces autres lien mais libtorrent plante toujours sur la même erreur....

Argh je suppose que cela doit venir de l'une des dépendances mais laquelle ?
Il y a eu un souci lors de l'installation (de xmlrpc-c, etc) ? Il ne manque rien ? À moins que cela soit la version ?

voici la version de xmlrpc-c-config : 1.33.14
j'ai bien fait le update demandé et je n'ai eut aucune erreur d'installation. Juste fail2ban mais cela n'as pas d'impact sur cette installation, du moins il me semble.

Sinon je ne vois pas quel autre dépendance il manquerais.

j'ai finis mais après le reboot je me connecte bien a l'interface mais j'ai toujours cette erreur dans le journal

Lien incorrect avec rTorrent. Vérifier qu'il est bien en cours d'exécution. Vérifier la configuration de $scgi_port et de $scgi_host dans config.php et scgi_port dans le fichier de configuration de rTorrent.

pourtant rtorrent semble tourné correctement.

ps fax|grep rtorrent
  2101 pts/2    S+     0:00              \_ grep rtorrent
  1333 ?        Ss     0:00 SCREEN -dmS christr87-rtorrent rtorrent
  1336 pts/0    Ssl+   0:00  \_ rtorrent[code]

avez vous une idée. brillante ???

au temps pour moi j'ai fais une bétise sur un paramètre de port...
mais après correction + reboot => tout rentre dans l'ordre.

me reste plus qu'a. mettre en place les autres modules sickrage et radar/sonar.

merci pour le coups de pouce Wagner

Tout d'abord, un grand merci a tous les contributeurs des différents tuto et scripts de ce sites, je suis un utilisateur comblé 🙂
J'ai testé cette nouvelle version du script sur deux debian 9 ( Kimsufi + Online) et je n'ai pas rencontré de souci lors de son exécution.

C'est lors de l'utilisation du serveur que je rencontre des soucis :
Premier pb Fail2ban :
Cf mon post : https://mondedie.fr/d/5295-Discussion-Securisation-Logs-nginx-lighttpd/546
Pour résumé, lorsque dans les logs de fail2ban j'ai les lignes suivantes plus aucun blocage d'ip ne se fait. Je suis obligé de redémarré le service. Jusqu'à l'apparition des ces erreurs ;/ Et je ne trouve aucune solution.

Second pb Communication Sickrage (NAS) <==> Seedbox
Depuis l'installation de ma seedbox avec cette nouvelle version du script + Debian 9, la communication entre Mon Sickrage et ma seedbox ne se fait plus correctement. Le test de communication lors du paramétrage de la connexion sur Sickrage se fait correctement, mais lors de l'envoi du fichier torrent vers ma seedbox il y a un souci :
2017-09-18 20:23:52 WARNING SEARCHQUEUE-DAILY-SEARCH :: rTorrent: Unable to send Torrent
2017-09-18 20:23:52 WARNING SEARCHQUEUE-DAILY-SEARCH :: Error while sending torrent:

Et je ne vois pas d'erreur sur ma seedbox. Mais je cherche toujours. Par contre, entre Radarr et ma Seedbox tout marche correctement. Si quelqu'un à des idées je suis preneurs !!!!

un mois plus tard

Bonjour tout le monde,

Depuis hier je suis dans une impasse. Suite au téléchargement d'un torrent j'ai l'erreur suivante:
"No connection 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."

Le service tourne correctement et les fichiers de configuration n'ont pas été modifié au préalable.

reboot server et restart du service n'ont rien donné :/

Si quelqu'un a une piste, je suis preneur 🙂

Pour info, sur le même serveur, j'ai seedbox-manager, plex server et sickrage qui tournent sans souci (installés avec les tutos trouvés sur ce site).

Merci d'avance

ex_rat Le script "Essential" est à jour aussi, j'attends un peu pour pousser l’ensemble sur github...

Full
apt-get update && apt-get upgrade -y
apt-get install git-core -y
cd /tmp
wget http://www.ratbox.nl/md/rutorrent-bonobox.tar.gz
tar xzfv rutorrent-bonobox.tar.gz
cd rutorrent-bonobox
chmod a+x bonobox.sh && ./bonobox.sh

Je viens de relancer l'installation de mon serveur sous Debian 9, je teste ton installation @ex_rat .

Je vous tiens informé de tout.

Bon, bah @ex_rat, je te remercie, ça à l'air de fonctionner, on verra à la longue.

Merci encore pour tes scripts !

24 jours plus tard

Bonjour, j'apporte ma pièce dans le sujet, je suis bloqué après un redémarrage du serveur avec ça :

[08.11.2017 14:47:19] Lien incorrect avec rTorrent. Vérifier qu'il est bien en cours d'exécution. Vérifier la configuration de $scgi_port et de $scgi_host dans config.php et scgi_port dans le fichier de configuration de rTorrent.

Erreur très courante du coup, je cherche un peut et voilà tout ce que j'ai fait

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 "Private";
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.0-fpm.sock;
}

location ~* \.(jpg|jpeg|gif|css|png|js|map|woff|woff2|ttf|svg|eot)$ {
    expires 30d;
    access_log off;
}

    location = /BIC {
    include scgi_params;
    scgi_pass 127.0.0.1:5001;
    auth_basic "Private";
    auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_bic";
}

}

Je regarde aussi mon .rtorrent

scgi_port = 127.0.0.1:5001
encoding_list = UTF-8
port_range = 45000-65000
port_random = no
check_hash = no
directory = /home/bic/torrents
session = /home/bic/.session
encryption = allow_incoming, try_outgoing, enable_retry
schedule = watch_directory,1,1,"load.start=/home/bic/watch/*.torrent"
schedule = untied_directory,5,5,"stop_untied=/home/bic/watch/*.torrent"
trackers.use_udp.set = yes
dht.mode.set = off
protocol.pex.set = no
min_peers = 40
max_peers = 100
min_peers_seed = 10
max_peers_seed = 50
max_uploads = 15
execute = {sh,-c,/usr/bin/php /var/www/rutorrent/php/initplugins.php bic &}
schedule = espace_disque_insuffisant,1,30,close_low_diskspace=500M

-Mon dossier .session est vide
- Mon erreur dans les logs

2017/11/08 14:26:36 [error] 519#519: *1 FastCGI sent in stderr: "PHP message: PHP Notice:  Use of undefined constant buildtorrent - assumed 'buildtorrent' in /var/www/rutorrent/plugins/create/conf.php on line 4" while reading response header from upstream, client: 192.168.1.13, server: _, request: "POST /rutorrent/plugins/create/action.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "192.168.1.18", referrer: "http://192.168.1.18/rutorrent/"

2017/11/08 14:28:40 [error] 519#519: *1 FastCGI sent in stderr: "PHP message: PHP Notice:  Use of undefined constant buildtorrent - assumed 'buildtorrent' in /var/www/rutorrent/plugins/create/conf.php on line 4
PHP message: PHP Notice:  Use of undefined constant buildtorrent - assumed 'buildtorrent' in /var/www/rutorrent/plugins/create/conf.php on line 4" while reading response header from upstream, client: 192.168.1.13, server: _, request: "GET /rutorrent/php/getplugins.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "192.168.1.18", referrer: "http://192.168.1.18/rutorrent/"

2017/11/08 14:28:40 [error] 519#519: *1 FastCGI sent in stderr: "PHP message: PHP Notice:  Use of undefined constant buildtorrent - assumed 'buildtorrent' in /var/www/rutorrent/plugins/create/conf.php on line 4" while reading response header from upstream, client: 192.168.1.13, server: _, request: "POST /rutorrent/plugins/create/action.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "192.168.1.18", referrer: "http://192.168.1.18/rutorrent/"

-Mon fichier de l'erreur:

#/var/www/rutorrent/plugins/create/conf.php


<?php
// configuration parameters

$useExternal = 'buildtorrent';          // Valid choices:
                                // false - use internal realization (may be too slow for large files)
                                // "transmissioncli" - use program transmissioncli (see http://www.transmissionbt.com/)
                                // "transmissioncreate" - use program transmissioncreate (see http://www.transmissionbt.com/)
                                // "createtorrent" - use program createtorrent (see http://www.createtorrent.com)
                                // "mktorrent" - use program mktorrent (see http://mktorrent.sourceforge.net)
                                // "buildtorrent" - use program buildtorrent (see http://claudiusmaximus.goto10.org/cm/torrent.html)
$pathToCreatetorrent = '/usr/bin/buildtorrent'; // Something like /bin/createtorrent, or /bin/transmissioncli. If empty, program will be found in PATH.

$recentTrackersMaxCount = 15;
 

Voilà, j'aurais une erreur php, mais je ne vois pas d'ou elle proviens tout correspond bien. Merci pour vos aide

    bic que te renvoie

    whereis buildtorrent

    Salut coca voilà,
    buildtorrent: /usr/bin/buildtorrent /usr/share/man/man1/buildtorrent.1.gz

    Salut @Wagner voilà le résultat du tout :

    -Le Nginx

     nginx.service - nginx - high performance web server
       Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
       Active: active (running) since Wed 2017-11-08 17:04:19 CET; 3h 44min ago
         Docs: http://nginx.org/en/docs/
     Main PID: 3429 (nginx)
        Tasks: 3 (limit: 4915)
       CGroup: /system.slice/nginx.service
               ├─3429 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
               ├─3430 nginx: worker process
               └─3431 nginx: worker process
    
    nov. 08 17:04:19 ns1 systemd[1]: Starting nginx - high performance web server...
    nov. 08 17:04:19 ns1 nginx[3425]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nov. 08 17:04:19 ns1 nginx[3425]: nginx: configuration file /etc/nginx/nginx.conf test is successful
    nov. 08 17:04:19 ns1 systemd[1]: Started nginx - high performance web server.

    -Le PHP

     php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
       Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled)
       Active: active (running) since Wed 2017-11-08 15:42:15 CET; 5h 7min ago
         Docs: man:php-fpm7.0(8)
     Main PID: 1098 (php-fpm7.0)
       Status: "Processes active: 0, idle: 2, Requests: 55, slow: 0, Traffic: 0req/sec"
        Tasks: 3 (limit: 4915)
       CGroup: /system.slice/php7.0-fpm.service
               ├─1098 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
               ├─1099 php-fpm: pool www
               └─1100 php-fpm: pool www
    
    nov. 08 20:47:06 ns1 su[7733]: pam_unix(su:session): session opened for user bic by (uid=0)
    nov. 08 20:47:06 ns1 su[7742]: Successful su for bic by root
    nov. 08 20:47:06 ns1 su[7742]: + ??? root:bic
    nov. 08 20:47:06 ns1 su[7742]: pam_unix(su:session): session opened for user bic by (uid=0)
    nov. 08 20:47:06 ns1 su[7754]: Successful su for bic by root
    nov. 08 20:47:06 ns1 su[7754]: + ??? root:bic
    nov. 08 20:47:06 ns1 su[7754]: pam_unix(su:session): session opened for user bic by (uid=0)
    nov. 08 20:47:06 ns1 su[7758]: Successful su for bic by root
    nov. 08 20:47:06 ns1 su[7758]: + ??? root:bic
    nov. 08 20:47:06 ns1 su[7758]: pam_unix(su:session): session opened for user bic by (uid=0)
    

    -Le ps rtorrent: # ps -ef | grep rtorrent

    root      7786  7460  0 20:50 pts/0    00:00:00 grep rtorrent

    La conf php

    ;   '/path/to/unix/socket' - to listen on a unix socket.
    ; Note: This value is mandatory.
    listen = /run/php/php7.0-fpm.sock
    • Le /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 uniq$
      
      $topDirectory = '/';                    // Upper available directory. Absolute path with trail slash.
      $forbidUserSettings = false;
      
      $scgi_port = 5001;
      $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"   => '/usr/bin/php7.0',                   // 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 val$
      
          $tempDirectory = null;                  // Temp directory. Absolute path with trail slash. If null, then autodetect will b$
      
          $canUseXSendFile = false;               // If true then use X-Sendfile feature if it exist
      
          $locale = "UTF8";
      
        GNU nano 2.7.4                          Fichier : /var/www/rutorrent/conf/users/bic/config.php                                   
      
      <?php
      
      $pathToExternals['curl'] = '/usr/bin/curl';
      $topDirectory = '/home/bic';
      $scgi_port = 5001;
      $scgi_host = '127.0.0.1';
      $XMLRPCMountPoint = '/BIC';
      

      Voilà, j'ai fait le tour de ton topic :-/ même modifier l'user qui est dans le scripte du start restart .. J'ne vois pas où il bloque

    Il doit y avoir un souci car ce ne semble pas être le bon résultat (pour la commande ps -ef | grep rtorrent).
    Parce que normalement cela devrait plutôt ressembler à cette image : http://nsa37.casimages.com/img/2017/01/24/170124100713452581.jpg

    PS : Il faudra que je retrouve l'autre image car je crois elle était un peu plus parlante (et cela devrait être ps -faux | grep rtorrent).