Page 1 of 1

problem with ftdaemon

Posted: 03 Jun 2011, 11:00
by canonjon
Hello

When I or the other user on the B3 login through the web interface and press the Downloads, we enter the Download section but this message appears:

Downloads
A PHP Error was encountered
Severity: Warning
Message: stream_socket_client(): unable to connect to unix:///tmp/ftdaemon (connection refused)
Filename: ftd/ipc.php
Line Number: 33

What does this mean?
What can I do too correct this?

Best Regards
Jon

Re: problem with ftdaemon

Posted: 03 Jun 2011, 12:41
by pcrene
Hello

This is a problem that is easily solved:

1) In the webinterface goto the admin and stop the download service
2) use putty or asn other tool to go to shell
3) su (excito as password)
4) rm -r torrents
5) mkdir torrents

4 and 5 at all users that use the downloader.

6) In the webinterface start the download service again.

Rene

Re: problem with ftdaemon

Posted: 03 Jun 2011, 12:41
by pcrene
Hello

This is a problem that is easily solved:

1) In the webinterface goto the admin and stop the download service
2) use putty or asn other tool to go to shell
3) su (excito as password)
4) rm -r torrents
5) mkdir torrents

4 and 5 at all users that use the downloader.

6) In the webinterface start the download service again.

Rene

Re: problem with ftdaemon

Posted: 04 Jun 2011, 03:07
by Ubi
that sounds like a weird recipe. What does this effectively achieve apart from cleaning the torrents folder and possible altering it's permissions?

Re: problem with ftdaemon

Posted: 04 Jun 2011, 04:06
by pcrene
this was the tip excito gave me.

i know that when this error happens something is wrong with the files
in that folder.

Rene

Re: problem with ftdaemon

Posted: 04 Jun 2011, 05:07
by canonjon
Hello

Thanks for your help, Rene. I tried what you suggested and it worked. The error message is gone.

Best Regards
Jon

Re: problem with ftdaemon

Posted: 05 Jun 2011, 16:32
by tor
@ubi, it effectively cleans out all stored torrent files. The reason for the error is that the downloader barfs heavily on some torrents (Bug). Deleting all torrent files removes the culprits.

/Tor

Re: problem with ftdaemon

Posted: 05 Jun 2011, 16:35
by Ubi
so would "rm -rf /home/*/torrents/*" be better as it does not mess with the folder itself (and you're done in a single command)?

Re: problem with ftdaemon

Posted: 05 Jun 2011, 16:44
by tor
No unfortunately not. The downloader keeps some of the torrents, the ones added with an URL in the UI, as dot files I.e .torrentfile which won't be removed in this scenario.

/Tor

Re: problem with ftdaemon

Posted: 05 Jun 2011, 17:02
by Ubi
rm -ir $(for i in $(ls -dA /home/*/torrents); do find $i | egrep -v "$i$"; done)

howaboutthat?

Re: problem with ftdaemon

Posted: 05 Jun 2011, 17:30
by tor
Hmm, i don't think so. I have problems with the -a for ls when wildcarding.

Perhaps something like:

find /home/*/torrents -type f -exec rm -i {} \;

(Totally untested)

(Ubi, just noted that you are soon passing me as top no1 poster at this forum :) )

/Tor

Re: problem with ftdaemon

Posted: 05 Jun 2011, 17:46
by Ubi
there's a difference between -a and -A . The difference is whether or not to show the "." and ".."
TO be honest I never really mastered the --exec section of find. The escaping always gets me...

--edit-- some dumb remark removed --edit--

Re: problem with ftdaemon

Posted: 05 Jun 2011, 17:51
by tor
Hmm, are you sure it really deletes the folder?

1. find only returns files found nothing else (the type f option)
2. rm is not issued with the -r thus not removing any folders.

But as said previously, i havn't actually tested it, thus no guarantees :)

/Tor

Re: problem with ftdaemon

Posted: 06 Jun 2011, 02:07
by pcrene
Hello All,

Nice discussion about scripts. It happend to me on the B2 once or twice a year.
On the B3 it has never happend to me.
So i'll keep it to the manual removal as i am the only downloader here

Rene