mimtek / rutorrent

Automatically exported from code.google.com/p/rutorrent
0 stars 0 forks source link

Datadir not changin location of torrent data files #216

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start torrent
2. Right click Torrent "Save to..."
3. Selkect newl ocation and click on.

What is the expected output? What do you see instead?

Move the files to the new dir and resume downloading/seeding.

Nothing happens.

I have tried different steps:

Stopped torrent, tried a new save to location and checked "move data files"

Stopped torrent, tried a new save to location and unchecked "move data files"

While torrent was running, tried a new save to location and checked "move
data files"

While torrent was running, tried a new save to location and unchecked "move
data files"

I waited for torrent to completely finish dowloading (100%), Stopped
torrent, tried a new save to location and checked "move data files"

I waited for torrent to completely finish dowloading (100%), Stopped
torrent, tried a new save to location and unchecked "move data files"

I waited for torrent to completely finish dowloading (100%)While torrent
was running, tried a new save to location and checked "move data files"

I waited for torrent to completely finish dowloading (100%), While torrent
was running, tried a new save to location and unchecked "move data files"

I tried Firefox, IE, Google chrome.

What version of the product are you using? On what operating system?
Slackware 12.2
RUTorrent2.8
Datadir1.1
getdir1.0

rtorren0.8.6

Are some errors present in the web-server log?
No

Are some errors present in the browser console?
No

Please provide any additional information below.

Datadir 1.0 worked sometimes for me (othertimes it would shut down
rtorrent). this version doesn't work at all.

Original issue reported on code.google.com by Fli...@gmail.com on 21 Dec 2009 at 2:33

GoogleCodeExporter commented 9 years ago

Original comment by novik65 on 21 Dec 2009 at 2:48

GoogleCodeExporter commented 9 years ago
are you by chance using a unix socket for rtorrent?

also, do you have a valid php-cli install.

Original comment by Wonslung@gmail.com on 21 Dec 2009 at 11:23

GoogleCodeExporter commented 9 years ago
are you by chance using a unix socket for rtorrent?

also, do you have a valid php-cli install.

Original comment by Wonslung@gmail.com on 21 Dec 2009 at 11:23

GoogleCodeExporter commented 9 years ago
I don't understand, how can I check what you asked?

Original comment by Fli...@gmail.com on 21 Dec 2009 at 11:29

GoogleCodeExporter commented 9 years ago
well one of them is a simple yes or no question.

DID you use a unix socket for rtorrent?
(if you set scgi_local you used a unix socket)
if you used an ip socket (scgi_port) then this doesn't apply.

do you have php-cli installed?

another simple question.

DO you have it installed or not?

type php -v 

if you see something like this:
PHP 5.2.11 with Suhosin-Patch 0.9.7 (cli) (built: Oct 30 2009 23:37:01) 

then you have php-cli

if you DON'T then you need to install it.

Original comment by Wonslung@gmail.com on 22 Dec 2009 at 12:43

GoogleCodeExporter commented 9 years ago
I use scgi_port;

scgi_port = 127.0.0.1:5000

PHP cli is installed;

PHP 5.2.8 (cli) (built: Dec  8 2008 04:38:12)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Original comment by Fli...@gmail.com on 22 Dec 2009 at 3:26

GoogleCodeExporter commented 9 years ago
then i'm not sure what the problem is.  Does the new dir have the correct 
privelages?

Original comment by Wonslung@gmail.com on 23 Dec 2009 at 7:07

GoogleCodeExporter commented 9 years ago
yeah all the directories are rwxr-xr-x. 

what is the process u use to move the data in rutorrent?

I'd like to point out that datadir1.0 worked most of the time.

Original comment by Fli...@gmail.com on 24 Dec 2009 at 12:16

GoogleCodeExporter commented 9 years ago
>yeah all the directories are rwxr-xr-x. 

As result, only directory owner can write to it. Is the rtorrent user is owner 
of
that directory?

Original comment by novik65 on 24 Dec 2009 at 8:32

GoogleCodeExporter commented 9 years ago
do you have the latest svn version of rutorrent?

update to latest svn then make sure you have the logfile setup
  $log_file = '/tmp/errors.log';  

then go to the plugin dir for datadir and set it to log by changing this line:
    $datadir_debug_enabled = false;

to
    $datadir_debug_enabled = true;

THEN
try to move something.  post the log.

Original comment by Wonslung@gmail.com on 24 Dec 2009 at 10:04

GoogleCodeExporter commented 9 years ago
I'm having the same issue:

I have scgi_port enabled and php5-cli installed

here is my log:

[06.01.10 19:45:16] DataDir: --- begin ---
[06.01.10 19:45:16] DataDir: /media/shared/music/Various Artists - Body Language
 Vol. 8 mixed by Modeselektor [V2], don't move files
[06.01.10 19:45:16] DataDir: run mode: "rtorrent"
[06.01.10 19:45:16] DataDir: script dir  : /var/www/rtorrent/plugins/datadir/
[06.01.10 19:45:16] DataDir: path to php :
[06.01.10 19:45:16] DataDir: hash        : F3A08F99328C6B8CA31BABD599BA9EE86F662
95E
[06.01.10 19:45:16] DataDir: data dir    : /media/shared/music/Various Artists -
 Body Language Vol. 8 mixed by Modeselektor [V2]
[06.01.10 19:45:16] DataDir: move files  : 0
[06.01.10 19:45:16] rtExec: execute
[06.01.10 19:45:16] DataDir: --- end ---

As you can see the path to php is blank ... is this the problem???

Original comment by philha...@gmail.com on 6 Jan 2010 at 8:48

GoogleCodeExporter commented 9 years ago
do you have php set in your config.php for rutorrent?

Original comment by Wonslung@gmail.com on 6 Jan 2010 at 1:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Delete comment
Comment 13 by FliXxX, Today (14 minutes ago)

My config.php looked like this:

    $pathToPHP = '';                        // Something like /bin/php. If empty,
will be founded in PATH.
    $pathToCurl = '';                   // Something like /bin/curl. If empty, will
be founded in PATH.

I just updated $pathToPHP with /usr/bin/php (that's where mine is located) and 
it
seems to have worked. 

I'm going to test moving data files as well. I belive the wiki for datadir 
would need
to be updated. Users would need to know that in some instances they'll need to 
update
their config.php file.

BTW where do I put:
 $log_file = '/tmp/errors.log';  ?

Is that in the config.php file or what file would I put it in?

Thanks.

Original comment by Fli...@gmail.com on 6 Jan 2010 at 11:15

GoogleCodeExporter commented 9 years ago
Adding path to php in rutorrent's config.php worked for me also.

/tmp/errors.log is default location for rutorrents debug output.

use something like:

$ watch tail /tmp/errors.log

to see what rutorrent is up to.

Original comment by philha...@gmail.com on 7 Jan 2010 at 5:51

GoogleCodeExporter commented 9 years ago
I can confirm this. Setting the path to /usr/bin/php fixed the issue.

By the way, the comment in config.php mentions "/bin/php". Is it where it looks 
by 
default? It's obviously wrong and should be /usr/bin/php or /usr/local/bin/php 
depending 
on the distribution used.

Original comment by alexander+google@kojevnikov.com on 17 Jan 2010 at 2:43

GoogleCodeExporter commented 9 years ago
Hello, I'm revisiting this problem as it is still giving me problems.

Although the data_dir is now moving the files, it fails at MKV files. I have 
attached the logs of an attempted data_dir move.

Original comment by Fli...@gmail.com on 20 Jan 2010 at 2:50

Attachments:

GoogleCodeExporter commented 9 years ago
I guess, plugin can't manage files >= 2G. This is a php restriction. I guess, 
author
must rewrite this procedure on the shell, not on the php.

Original comment by novik65 on 20 Jan 2010 at 5:15

GoogleCodeExporter commented 9 years ago
This plugin works fine on my pc with all file sizes.

Perhaps it is due to the fact me and the author both use FreeBSD.

(not sure how this would change things.....)

Original comment by Wonslung@gmail.com on 21 Jan 2010 at 9:49

GoogleCodeExporter commented 9 years ago
2FliXxX: can you give me this .torrent file or link to where I can get it?
I'll try to repeat this on my comp.

Original comment by dmrom00 on 21 Jan 2010 at 12:19

GoogleCodeExporter commented 9 years ago
dmrom00: I can't provide that file as it belongs to a private tracker. This 
happens 
with all of my torrents that are big in size. most of them are 6-10Gb in size.

Only the MKV file fail to move over, the rest of the files in the torrent get 
moved 
properly.

Original comment by Fli...@gmail.com on 21 Jan 2010 at 1:26

GoogleCodeExporter commented 9 years ago
2dmrom00 - как написал уже выше, php без резьбы по 
нему не умеет работать с файлами
более 2G. Вообще. Т.е. is_file на таком файле 
будет возвращать false, fopen работать
не будет и т.п. Ты сам можешь все это 
воспроизвести, создав торрент содержащий 
файл в
3G и попробовав плагин на нем. 

Original comment by novik65 on 21 Jan 2010 at 1:36

GoogleCodeExporter commented 9 years ago
Читать тут - http://news.php.net/php.bugs/127970

Original comment by novik65 on 21 Jan 2010 at 1:40

GoogleCodeExporter commented 9 years ago
Thanks Novik,

according to the article you posted, they also submitted a patch but apparently 
it's
only to double the size... Maybe we can start from there and I can test it.

Here is the link to that patch:

http://news.php.net/php.internals/32767

Original comment by Fli...@gmail.com on 21 Jan 2010 at 3:11

GoogleCodeExporter commented 9 years ago
Be careful with that. Read full discussion about this:
http://news.php.net/php.internals/32770
http://news.php.net/php.internals/32775
http://news.php.net/php.internals/32782
http://news.php.net/php.internals/32783
http://news.php.net/php.internals/32786
http://news.php.net/php.internals/32804
http://news.php.net/php.internals/32818
http://news.php.net/php.internals/32819
http://news.php.net/php.internals/32820
http://news.php.net/php.internals/32822
http://news.php.net/php.internals/32823
http://news.php.net/php.internals/32824
http://news.php.net/php.internals/32838

Original comment by novik65 on 21 Jan 2010 at 3:32

GoogleCodeExporter commented 9 years ago
2novik65: спасибо за диагноз, не ожидал в 
современных системах такого подвоха :)
2FliXxX: problem is solved, update plugin from svn.

Original comment by dmrom00 on 21 Jan 2010 at 7:10

GoogleCodeExporter commented 9 years ago
I grabbed the datadir from the SVN site, this is the error I get when I try it 
in
rutorrent:

[21.01.2010 20:29:44] Bad response: (404) <?xml version="1.0" 
encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  <head>  
<title>404 -
Not Found</title>  </head>  <body>  <h1>404 - Not Found</h1>  </body> </html> 

I restarted the whole computer, and it sitll gives me that error. all the lang 
files
are located in the lang directory of datadir.

Original comment by Fli...@gmail.com on 22 Jan 2010 at 1:34

GoogleCodeExporter commented 9 years ago
2dmrom00 - 
1) About pcntl_fork - process control support in PHP is not enabled by default. 
This
function may be absent.
2) About posix_setsid - posix* function in PHP is enabled by default, but many 
admins
are disable it (its disabled in my system, for example). This function may be 
absent.

Original comment by novik65 on 22 Jan 2010 at 8:26

GoogleCodeExporter commented 9 years ago
FliXxX: that's something strange. are you sure that datadir plagin is the 
reason?
novik65: thanks, I've understood that. that function is not used anywhere. just 
for
my tests :)

Original comment by dmrom00 on 22 Jan 2010 at 5:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
You're right ... I forgot to download the action.php file from the svn. I just 
moved
a 4.36 GB file with your script and it worked fine :) Thank you

Original comment by Fli...@gmail.com on 22 Jan 2010 at 10:22

GoogleCodeExporter commented 9 years ago
Migrated to 3.0 branch and applied these changes into it.
2novik65: I'm really grateful for my plugins adaptation. Many thanks!

Original comment by dmrom00 on 23 Jan 2010 at 12:29

GoogleCodeExporter commented 9 years ago
Я дописал в beta3 соотв. функциональность в 
файле php/lfs.php. Есть предложение
использовать его, там соотв. функции (is_file, 
stat, filesize) реализованы с лучшей
производительностью.

Original comment by novik65 on 24 Jan 2010 at 2:21

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Аха, использовал :)

Original comment by dmrom00 on 6 Mar 2010 at 5:55