Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transmission-cli does not transfer, ever. #42

Open
ardentmusician opened this issue Dec 5, 2012 · 6 comments
Open

Transmission-cli does not transfer, ever. #42

ardentmusician opened this issue Dec 5, 2012 · 6 comments

Comments

@ardentmusician
Copy link

As far as I can tell, transmission-cli flat out does not work. After going through the nightmare of compiling transmission-cli for Debian (tf-ng seems to like the file), I try to set up torrents with it (I am normally quite satisfied with BitTornado, but it can't handle udp for some stupid reason), but they never pick up any seeds or transfer any data. Sometimes it will just stop the torrent with an Estimated Time of 'Torrent Stopped' (as opposed to 'Stopped', which is what it says if I stop it manually). I have even tested it using a known good torrent that downloaded extremely quickly with BitTornado, and it just sits there with:

Down Up Seeds
0.0 kB/s 0.0 kB/s 0 (0)

One strange behavior I noted in the logs is that transmission-cli does not seem to want to advance ports if I have more than one torrent running on it. (It still doesn't download if there is only one).

I tried using transmission-rpc, but that was a disaster that made it so the main page of tf-ng wouldn't load at all (and I like BitTornado for most of my needs).

Settings:

BitTorrent-Client: transmission
Max Upload Rate: 10 kB/second
Max Download Rate: 0 kB/second
Completion Activity: Keep Seeding
Percentage When Seeding should Stop: 0%
Min Port: 49160
Max Port: 49300

Log examples (ignore the disparity in datestamps - after getting the additional torrent, I stopped them all and started fresh with torrent 1):

Torrent 1 (Known FAST torrent):

[2012/12/04 - 18:13:18] transmission-start : known_FAST.torrent
[2012/12/04 - 18:13:18] setting sharekill-param to 0
[2012/12/04 - 18:13:18] executing command :
cd '/hard_drive/flux/incoming/'; HOME='/hard_drive/flux/'; export HOME;cd '/hard_drive/flux/incoming/'; nohup '/usr/local/bin/transmissioncli' -d '0' -u '10' -p '49160' -W '0' -L '0' -E 6 -O 'user' -er -v '/hard_drive/flux/.transfers/known_FAST.torrent' 1>> '/hard_drive/flux/.transfers/known_FAST.torrent.log' 2>> '/hard_drive/flux/.transfers/known_FAST.torrent.log' &
[18:13:19.347] RPC Server: Adding address to whitelist: 127.0.0.1
[18:13:19.370] DHT: Reusing old id
[18:13:19.370] DHT: Bootstrapping from 158 IPv4 nodes
[2012/12/04 - 18:13:19] transmission 2.73 (13592) starting up :
[2012/12/04 - 18:13:19] - torrent : /hard_drive/flux/.transfers/known_FAST.torrent
[2012/12/04 - 18:13:19] - owner : user
[2012/12/04 - 18:13:19] - dieWhenDone : 0
[2012/12/04 - 18:13:19] - seedLimit : 0
[2012/12/04 - 18:13:19] - bindPort : 49160
[2012/12/04 - 18:13:19] - uploadLimit : 10
[2012/12/04 - 18:13:19] - downloadLimit : 0
[2012/12/04 - 18:13:19] - natTraversal : 1
[2012/12/04 - 18:13:19] - displayInterval : 6
[2012/12/04 - 18:13:19] - downloadDir : /hard_drive/flux/incoming
transmission-cli 2.73 (13592) - patched for TorrentFlux-NG
[18:13:19.501] Saved "/hard_drive/flux/.config/transmission/torrents/known_FAST.431ba9a04764b271.torrent"
[2012/12/04 - 18:13:19] - downloadDir from torrent object, usually loaded from resume data : /hard_drive/flux/incoming
[2012/12/04 - 18:13:19] Initialized status-facility. (/hard_drive/flux/.transfers/known_FAST.torrent.stat)
[2012/12/04 - 18:13:19] Initialized command-facility. (/hard_drive/flux/.transfers/known_FAST.torrent.cmd)
[18:13:19.501] known_FAST: Pausing
[2012/12/04 - 18:13:19] Wrote pid-file: /hard_drive/flux/.transfers/known_FAST.torrent.pid (31969)
[18:13:19.501] Saved "/hard_drive/flux/.config/transmission/resume/known_FAST.431ba9a04764b271.resume"
[18:13:19.502] known_FAST: Queued for verification
[18:13:19.502] known_FAST: Verifying torrent
[18:13:19.669] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[18:13:19.669] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
[18:13:21.673] Port Forwarding (UPnP): Found Internet Gateway Device "http://172.16.0.1:5555/ctl/IPConn"
[18:13:21.673] Port Forwarding (UPnP): Local Address is "172.16.0.2"
[18:13:21.684] Port Forwarding (UPnP): Port forwarding through "http://172.16.0.1:5555/ctl/IPConn", service "urn:schemas-upnp-org:service:WANIPConnection:1". (local address: 172.16.0.2:49160)
[18:13:21.684] Port Forwarding (UPnP): Port forwarding successful!
[18:13:21.684] Port Forwarding: State changed from "Not forwarded" to "Forwarded"
[18:13:31.002] known_FAST: Starting IPv4 DHT announce (poor, 16 nodes)

Starting a second Torrent:

[2012/12/04 - 17:39:09] transmission-start : known_good_2.torrent
[2012/12/04 - 17:39:09] setting sharekill-param to 0
[2012/12/04 - 17:39:09] executing command :
cd '/hard_drive/flux/incoming/'; HOME='/hard_drive/flux/'; export HOME;cd '/hard_drive/flux/incoming/'; nohup '/usr/local/bin/transmissioncli' -d '0' -u '10' -p '49160' -W '0' -L '0' -E 6 -O 'user' -er -v '/hard_drive/flux/.transfers/known_good_2.torrent' 1>> '/hard_drive/flux/.transfers/known_good_2.torrent.log' 2>> '/hard_drive/flux/.transfers/known_good_2.torrent.log' &
[17:39:09.947] RPC Server: Adding address to whitelist: 127.0.0.1
[17:39:09.947] Couldn't bind port 49160 on 0.0.0.0: Address already in use (Is another copy of Transmission already running?)
[17:39:09.947] Couldn't bind port 49160 on ::: Address already in use (Is another copy of Transmission already running?)
[17:39:09.947] UDP: Couldn't bind IPv4 socket
[17:39:09.947] DHT: Reusing old id
[2012/12/04 - 17:39:10] transmission 2.73 (13592) starting up :
[2012/12/04 - 17:39:10] - torrent : /hard_drive/flux/.transfers/known_good_2.torrent
[2012/12/04 - 17:39:10] - owner : user
[2012/12/04 - 17:39:10] - dieWhenDone : 0
[2012/12/04 - 17:39:10] - seedLimit : 0
[2012/12/04 - 17:39:10] - bindPort : 49160
[2012/12/04 - 17:39:10] - uploadLimit : 10
[2012/12/04 - 17:39:10] - downloadLimit : 0
[2012/12/04 - 17:39:10] - natTraversal : 1
[2012/12/04 - 17:39:10] - displayInterval : 6
[2012/12/04 - 17:39:10] - downloadDir : /hard_drive/flux/incoming
[17:39:10.119] Saved "/hard_drive/flux/.config/transmission/torrents/known_good_2.b52ca598afd2a7e7.torrent"
[2012/12/04 - 17:39:10] - downloadDir from torrent object, usually loaded from resume data : /hard_drive/flux/incoming
[2012/12/04 - 17:39:10] Initialized status-facility. (/hard_drive/flux/.transfers/known_good_2.torrent.stat)
[2012/12/04 - 17:39:10] Initialized command-facility. (/hard_drive/flux/.transfers/known_good_2.torrent.cmd)
[17:39:10.119] known_good_2: Pausing
[2012/12/04 - 17:39:10] Wrote pid-file: /hard_drive/flux/.transfers/known_good_2.torrent.pid (31449)
[17:39:10.135] Saved "/hard_drive/flux/.config/transmission/resume/known_good_2.b52ca598afd2a7e7.resume"
[17:39:10.135] known_good_2: Queued for verification
[17:39:10.135] known_good_2: Verifying torrent
[17:39:10.282] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[17:39:10.282] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
[17:39:12.285] Port Forwarding (UPnP): Found Internet Gateway Device "http://172.16.0.1:5555/ctl/IPConn"
[17:39:12.285] Port Forwarding (UPnP): Local Address is "172.16.0.2"
[17:39:12.287] Port Forwarding (UPnP): Port forwarding through "http://172.16.0.1:5555/ctl/IPConn", service "urn:schemas-upnp-org:service:WANIPConnection:1". (local address: 172.16.0.2:49160)
[17:39:12.287] Port Forwarding (UPnP): Port forwarding successful!
[17:39:12.287] Port Forwarding: State changed from "Not forwarded" to "Forwarded"
[17:39:13.185] known_good_2: Could not connect to tracker
[17:39:13.185] known_good_2: Retrying announce in 312 seconds.
[17:40:15.621] known_good_2: Connection failed
[17:40:15.621] known_good_2: Retrying announce in 347 seconds.

@firesalp
Copy link

firesalp commented Dec 7, 2012

I had the same issue with transmission-cli. I tried it with the RPC method and it works great! I made a tutorial to make this work, i will post it here. I'ts in french so i hope you will understand:

#######
#Etape 1#

apt-get -y update && apt-get -y upgrade

Un peut de sécurité:

apt-get -y install fail2ban

En faire un serveur LAMP (Linux, Apache, Mysql, PHP)

apt-get -y install apache2 mysql-server php5 php5-mysql

Lors de l’installation de MySQL, entrez un mot de passe très fort et notez-vous le dans un coin.

Installer les composants nécessaires à TorrentFlux-NG

apt-get -y install php5-gd unrar-free unzip zip htop vlc cksfv uudeview

Télécharger TorrentFlux-NG

wget https://github.com/epsylon3/torrentflux/zipball/master --no-check-certificate
cp master master.zip
unzip master.zip
cp -R epsylon3-torrentflux-f4d48b2/html /var/www/tflux
chown -R www-data /var/www/tflux
mkdir /home/tflux
chmod -R 777 /home/tflux/
chown -R www-data /home/tflux/


Mise en place de HTTPS:
Activation de ssl:

a2enmod ssl
service apache2 restart

Création du certificat auto-signé: (mettez n'importe quoi, ce n'est pas important)

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -out /etc/apache2/server.crt -keyout /etc/apache2/server.key

chmod 440 /etc/apache2/server.key

Création de la clé privé: (mettre le nom de domaine ou l'ip du serveur)

make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/private/localhost.pem

Création des fichiers de configuration:

cd /etc/apache2/sites-available/
cp default ssl
sed -i '1,2s/*:80/*:443/' ssl
sed -i "3a\\tSSLEngine On\n\tSSLCertificateFile /etc/ssl/private/localhost.pem" ssl

a2ensite ssl
service apache2 restart

Pour forcer le https, éditer le fichier de configuration:

nano /etc/apache2/sites-available/default

y coller ces quelques lignes juste avant (avant dernière ligne) sans oublier de remplacer <IP_DU_SERVEUR> par le nom de domaine ou l'Ip du serveur:

RewriteEngine On
Options +FollowSymlinks
rewriteCond %{SERVER_PORT} 80
rewriteRule ^(.*)$ https://<IP_DU_SERVEUR>/$1 [R,L]

Pour sauvegarder, faire ctrl + x , O, puis entrée.

Redémarrer apache

a2enmod rewrite
service apache2 restart


Aller sur l’interface de TorrentFlux-NG :

https://<IP_du_serveur>/tflux

Et suivez l’installation du site web jusqu’aux paramètres de la base de donnée.
Sélectionner MySQL , ensuite donnez un nom à votre base de donnée (celle par défaut marche aussi), entrez root dans l’utilisateur et mettez le mot de passe que vous avez mis tout à l’heure durant l’installation de MySQL, puis cochez les deux cases.

Lors de la sélection de l’emplacement du répertoire de téléchargement, indiquer :

/home/tflux/

Une foi l’assistant fermé, on arrive sur l’interface de login.
/ !\ Le premier login sera celui du SuperAdmin ! Ne faites pas de faute de frappe dans le mot de passe, il n’y a pas de confirmation !!! (il n’est pas conseillé de télécharger avec cet utilisateur donc mettez un nom du genre « admseedbox » ou autre (évitez admin). Il sera possible d’attribuer les rôles administrateur à un second utilisateur).

Une foi logé, il indique que le chemin pour Transmissioncli n’est pas valide, ignorez et cliquez en haut à gauche (Back to site).

Nous voilà donc sur cette (superbe !) interface !! Dans le menu en haut à droite, il y a l’accès Admin. C’est là où se trouvent tous les réglages. Libre à vous de le régler à votre guise !! (Toutefois laissez le client par défaut sur BitTornado pour l’instant)

#######
#Etape 2#

Dans cette étape (facultative), je vous propose d'installer le client Torrent Transmission

Tout d'abord, installer les paquets nécessaires:

apt-get -y install php5-curl transmission-daemon

Modifier la configuration de Transmission, il faut arrêter le service:

service transmission-daemon stop

nano /etc/transmission-daemon/settings.json

Mettre les paramètres :
"download-dir" à "/home/tflux"

"download-dir": "/home/tflux",

"rpc-bind-address" à "127.0.0.1"

"rpc-bind-address": "127.0.0.1",

"rpc-password" à ""

"rpc-password": "",

Pour connaitre la signification de tout les paramètres, suivez ce lien
(Anglais) https://trac.transmissionbt.com/wiki/EditConfigFiles
(Français) http://www.bpaulin.net/blog/?p=208

Pour sauvegarder, faire ctrl + x , O, puis entrée

Il faut que transmission soit lancé avec le user www-data (apache). Editer le fichier:

nano /etc/init.d/transmission-daemon

mettre le paramètre:

USER=www-data

Autoriser l'utilisateur www-data à utiliser Transmission:

chown -R www-data /etc/transmission-daemon
chown -R www-data /var/lib/transmission-daemon

Redémarrer apache et transmission:

service apache2 restart

service transmission-daemon start

La suite se passe sur l'interface web administrative. Rendez-vous dans la rubrique "Transfer" et mettez les paramètres:

  • DEFAULT BITTORRENT CLIENT à Transmission Deamon

  • TRANSMISSION RPC METHOD à Default (Like Vuze RPC)

    Si la page "téléchargement" reste blanche, cela veut dire que l'interface web n'arrive pas à communiquer avec Transmission. Remettez TRANSMISSION RPC METHOD à Disabled et cherchez l'erreur ;)

@ardentmusician
Copy link
Author

Unfortunately, that still does not work. I have configured it as you said, and if I enable Transmission Daemon RPC as "Default (like vuze rpc)" and I return to the index, I get a blank page. If I set it to Mono-Client (deadeyes), I can get to the index page, but bringing up the transfer window for a torrent just brings up a blank window. If I click Star Transfer (the play button on the index page), it brings up the Control window, but if I select Transmissionrpc, it immediately blanks out the window. If I try to set transmissionrpc as the default client and then "quick start" a transfer, it instead just tries to use transmission-cli anyway.

This issue is also reported here: #15

@firesalp
Copy link

Hi,
My tutorial is working, i used it at least a week ago. When you get a blank page, that will say that tflux doesn't connect with transmission. Maybe you fergot to set the correct right to transmission?

service transmission-daemon stop
nano /etc/init.d/transmission-daemon

then set the line "USER=www-data"

chown -R www-data /etc/transmission-daemon
chown -R www-data /var/lib/transmission-daemon

service apache2 restart
service transmission-daemon start

@ardentmusician
Copy link
Author

I have run those exact commands before, but I tried again (twice) just to be sure. No change in behavior whatsoever.

Is there a log somewhere in TF that might be able to tell me how it is trying to connect and what error messages it may receive?

@firesalp
Copy link

Strange! I think that there are no logs. Try to take a look at /var/log/apach2/error.log

If u want i can try to install it on your server? (through teamviewer?)

@Kethryweryn
Copy link

Had the same problem with 12.04 ubuntu. Happened because transmission-cli 2.71 wasn't compatible with 12.04 (the repository version when you apt-get it is 12.51). I tried to compile the 2.12 but it wouldn't compile. I finally compiled the 1.92, and everything is working fine.

So my advice is : try to compile a previous version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants