OpenWrt Forum Archive

Topic: web gui for ctorrent

The content of this topic has been archived between 15 Mar 2018 and 2 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Oconnor wrote:

So I do have to restart my torrents again every day. Or could you implement that feature? Or is it possiple to start "CTRESTART" via ssh?

you have to restart torrents but if you are using the -f option for ctorrent it wont take too much time (i hope).
it is not possible via ssh (you should send this command to ctorrent directly)

Small info about old bug, which was removed in 6.02.
I have currently latest version 0.7.0.1 and I have this "Untranslated key"... Could there be any other reason als internal bug?

sirfalo wrote:

Small info about old bug, which was removed in 6.02.
I have currently latest version 0.7.0.1 and I have this "Untranslated key"... Could there be any other reason als internal bug?

yes a really untranslated key if you are using a non-English version, because of the new elements.
i mentioned it earlier that the translations need to be upgraded.

Hi,
I have a new Problem using Kamikaze Revision 10433 Kernel 2.6 and using your dctcs-kam. I dont know what is wrong now. Your webgui is working but shows that my torrents are stopped. I'm able to upload a torrent and it starts downloading the torrent. I can see via ssh that ctorrent uses CPU time and is actually downloading the torrent but I'm getting no feedback from the webgui. There is written that the status of my torrent is Stopped.

Here is my output:

Mar 24 16:30:43 AsusP daemon.debug dctcs: stat file read
Mar 24 16:30:43 AsusP daemon.debug dctcs: setting alarm to check torrent-directory after: 0 sec
Mar 24 16:33:13 AsusP daemon.debug dctcs: stat file wrote, ret: 32
Mar 24 16:33:52 AsusP daemon.err dctcs: can not bind to client port
Mar 24 16:34:00 AsusP daemon.debug dctcs: stat file wrote, ret: 32
Mar 24 16:34:52 AsusP daemon.debug dctcs: stat file read
Mar 24 16:34:52 AsusP daemon.debug dctcs: setting alarm to check torrent-directory after: 0 sec
Mar 24 16:34:56 AsusP daemon.debug dctcs: request from gui: GET / HTTP/1.1^M Host: XXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/xml,application/xml,application/xhtml+xml,
Mar 24 16:34:57 AsusP daemon.debug dctcs: request from gui: GET /favicon.ico HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: image/png,*/*;q=0.5^M Accept-Language
Mar 24 16:34:57 AsusP daemon.debug dctcs: request from gui: GET /darkside.ctcs.gui.nocache.js HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXXXx:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: */*^M Accept-Languag
Mar 24 16:34:57 AsusP daemon.debug dctcs: request from gui: GET /gui.css HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXXXXXXx:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/css,*/*;q=0.1^M Accept-Language: en-
Mar 24 16:34:57 AsusP daemon.debug dctcs: request from gui: GET /C9671341924D6DDD3C66ADB1F031E09A.cache.html HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text
Mar 24 16:34:59 AsusP daemon.debug dctcs: request from gui: GET /messages.properties HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXx:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/xml,application/xml,app
Mar 24 16:35:02 AsusP daemon.debug dctcs: request from gui: AUTH /0 HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXx:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/xml,application/xml,application/xhtml+xm
Mar 24 16:35:02 AsusP daemon.debug dctcs: request from gui: AUTH /1?a1ceaf6ad89e15bdc99653e461e3942e HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/xml,app
Mar 24 16:35:02 AsusP daemon.debug dctcs: request from gui: GET /logo.gif HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: image/png,*/*;q=0.5^M Accept-Language: e
Mar 24 16:35:02 AsusP daemon.debug dctcs: request from gui: GETCLIENTSINFO /SOENgnrIOFIXvXWQbbIEABKdobKnCJcV HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text
Mar 24 16:35:02 AsusP daemon.debug dctcs: stat file wrote, ret: 32
Mar 24 16:35:03 AsusP daemon.debug dctcs: request from gui: GETLIMITS /SOENgnrIOFIXvXWQbbIEABKdobKnCJcV HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/xml,
Mar 24 16:35:03 AsusP daemon.debug dctcs: request from gui: GETTORRENTS /SOENgnrIOFIXvXWQbbIEABKdobKnCJcV HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/xm
Mar 24 16:35:03 AsusP daemon.debug dctcs: request from gui: GETWGETS /SOENgnrIOFIXvXWQbbIEABKdobKnCJcV HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/xml,a
Mar 24 16:35:13 AsusP daemon.debug dctcs: request from gui: POST /upload?SOENgnrIOFIXvXWQbbIEABKdobKnCJcV?0 HTTP/1.1^M Host: XXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/
Mar 24 16:35:14 AsusP daemon.debug dctcs: adding new torrent file
Mar 24 16:35:14 AsusP daemon.debug dctcs: stat file wrote, ret: 32
Mar 24 16:35:14 AsusP daemon.debug dctcs: starting torrent
Mar 24 16:35:14 AsusP daemon.info dctcs: new file uploaded
Mar 24 16:35:14 AsusP daemon.debug dctcs: request from gui: GETCLIENTSINFO /SOENgnrIOFIXvXWQbbIEABKdobKnCJcV HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text
Mar 24 16:35:14 AsusP daemon.debug dctcs: request from gui: GETTORRENTS /SOENgnrIOFIXvXWQbbIEABKdobKnCJcV HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/xm
Mar 24 16:35:14 AsusP daemon.debug dctcs: request from gui: GETLIMITS /SOENgnrIOFIXvXWQbbIEABKdobKnCJcV HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/xml,
Mar 24 16:35:14 AsusP daemon.debug dctcs: request from gui: GETWGETS /SOENgnrIOFIXvXWQbbIEABKdobKnCJcV HTTP/1.1^M Host: XXXXXXXXXXXXXXXXXXXXXXXXX:18000^M User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.12^M Accept: text/xml,a

I guess the error is

Mar 24 16:33:52 AsusP daemon.err dctcs: can not bind to client port

But how do I fix that?

(Last edited by Oconnor on 24 Mar 2008, 17:52)

the problem is that something is running on the clinet-port (netstat can help you if you dont know what is it) so you can stop that or you can change the setting:
client-host=localhost:15000
in dctcs.conf

Thanks that did it! I had to change for Samba my file
/etc/host to

127.0.0.1 AsusP

without that samba does not run! So I just changed my
/etc/dctcs.conf to

client-host=127.0.0.1:15000

and it worked!

Thanks!

Hi,
I have troubles running YODCTCS it works fine for some time but later I get in YODCTCS sth like this:

1st torrent:  Downloading 80% error, read failed at 2915259 on file "torrent name.r62": No space left on device
2nd torrent: Seeding error, read failed at 592501277 on file "thecottage.x264-nina.mp4": Input/output error
DF gives:

Filesystem           1k-blocks      Used Available Use% Mounted on
none                     15256        60     15196   0% /tmp
/dev/mtdblock/4           6016      1056      4960  18% /mnt/jffs
mini_fo:/jffs             1344      1344         0 100% /mnt
/dev/scsi/host0/bus0/target0/lun0/part1    829727    407419    380150  52% /
/dev/scsi/host1/bus0/target0/lun1/part1 236426848 121078276 103138772  54% /hdd1
Router is running from pendrive and torrents are downloaaded to /hdd1/torrenty/ and both devices have available storage space

free:
              total         used         free       shared      buffers
  Mem:        30512        26044         4468            0         2076
Swap:       159704         1024       158680
Total:       190216        27068       163148

Swap installed.
What can cause the problem of no space left msg?
Thanks in advance for reply

Hi,

dctcs is not writing data to the disk itsel ctorrent does this. so the error messages are coming from ctorrent.
about the errors both are "read failed" you may try fsck to check for file system errors.

Hi
i have problem with dctcs in whiterussina (x-wrt).
When i upload torrent file it show is STOPPED.
I can't it started. I see in this forum solutions and:
I uncommenting this in my /etc/dctcs.conf:

#ctorrent-args=-a

When I started ctorrent in command line with [ ctorrent -S localhsot:15000 ] it show
- Must specify one torrent file

DCTCS doesnt work !! sad

Bronas wrote:

Hi
i have problem with dctcs in whiterussina (x-wrt).
When i upload torrent file it show is STOPPED.
I can't it started. I see in this forum solutions and:
I uncommenting this in my /etc/dctcs.conf:

#ctorrent-args=-a

When I started ctorrent in command line with [ ctorrent -S localhsot:15000 ] it show
- Must specify one torrent file

DCTCS doesnt work !! sad

if you are using ctorrent-args=-a and the torrent is big you may have to wait long time to start (preallocating the data). you can check on the router wheter it started or not with ps command. if you want to start ctorrent manually you have to specify the torrent which you want to download.
if it is not working please send me some log.

Ok anothe problem occured, torrents are aded via YODCTCS webpage correctly, they are starting and writing properly. BUT...
After some time of working router stops responding, webpages doesnt load on my pc, router doesnt respond on pings, ssh ir ftp requests. When I check status of my connection and it shows that speed of my connection dropped to 1Mb/s. Before that router is downloading torrents with average speed of about 400-500kB. This is way lower than my connection speed as on PC i Download files with speed up to 1.8mB, I understant that i wont receive such speeds and I will be satisfied with about 500-700kB so its ok, but I cant reboot device manually every 30-40minutes.
If any logs would be needed please give me step by step ionstructions as I am beginner with linux smile
I use asus wl500gP device with 7.09 kamikaze installed with ctorrent from kamikaze repository and download torrents to USB drive.

A new ctorrent Version dnh3.3 is released. I will compile that version and test it with your YODCTCS to see if it is working.
And I hope that the bug is fixed that ctorrent does not download much more as the filesize is.

edit:
The Version ctorrent dnh3.3 seems to work with YODCTCS. There are a few bugs.
YODCTCS showes wrong seeders and leecher numbers, they are changing every 15 seconds.
I'm seeding one torrent and Status shows "Seeding warn, send torrent to CTCS failed: Inappropriate ioctl for device".

I openned a ticket 3325 with a patch for the new Version.

(Last edited by Oconnor on 10 Apr 2008, 17:26)

eme wrote:

Ok anothe problem occured, torrents are aded via YODCTCS webpage correctly, they are starting and writing properly. BUT...
After some time of working router stops responding, webpages doesnt load on my pc, router doesnt respond on pings, ssh ir ftp requests.
...
If any logs would be needed please give me step by step ionstructions as I am beginner with linux smile
I use asus wl500gP device with 7.09 kamikaze installed with ctorrent from kamikaze repository and download torrents to USB drive.

if the router stops responding there is little chance to get usable log files but anyway you have to start dctcs with -v -v -v options:

/usr/bin/dctcs -v -v -v

then you can see the logs with
logread
you can write the logs to your usb drive with something like:
logread -f > /your/usb/drive/log.txt

Oconnor wrote:

A new ctorrent Version dnh3.3 is released. I will compile that version and test it with your YODCTCS to see if it is working.
And I hope that the bug is fixed that ctorrent does not download much more as the filesize is.

edit:
The Version ctorrent dnh3.3 seems to work with YODCTCS. There are a few bugs.
YODCTCS showes wrong seeders and leecher numbers, they are changing every 15 seconds.
I'm seeding one torrent and Status shows "Seeding warn, send torrent to CTCS failed: Inappropriate ioctl for device".

Its interesting i made a short test with 3.3 and it seems everything is all right.

(Unfortunately my usb disk is wrecked so i can hardly test anything. i have only a small mp3 player connected)

hello... nice stuff you got here, i got it working on mips platform but i gave up on that due to slowness . (openvpn stuff very heavy very many clients)
so now i'm running customized openwrt 2.6 for x86.
i also compiled ctorrent and i want a gui for it.

is it possible to compile your source for x86?
a little start would make me happy smile

i've compiled YODCTCS for x86 (thx everybody for answers.... it seems that i'm on some kind of ignore list, even though i ask very polite and nicely....)  So, i managed to do this on my own again, but i get  "Inappropriate ioctl for device if I stop/start an already seeding torrent.  I can see Oconnor patched this but i don't really understand the patch. it has no .patch extension.

oh... i just saw that i'm suppose to have the already patched version (ctorrent 3.3 or smthg. anyway much newer svn compilation then the one that said it was fixed  in)

how come i'm still having the ioctl error

roadranger wrote:

Also curious if anyone here has tried to run BTPD as it is similar but needs only one instance to run multiple torrents? There seems not to be a precompiled binary available but there are patches for OpenWRT...

I am running btpd and being very happy about it. I've had problems with ctorrent with big and/or many torrents. btpd handles very nicely restarting the torrents if they are stopped. it's instant (even after rebooting server). It's very fast and it seems it's a lot less CPU hog then ctorrent at least when checking a torrent.

i am running openwrt on an x86 platform but this should not matter. it has a very small footprint as well as ctorrent.

the  main problem is that i've not found a web frontend for it. (does anybody know anything?) i'm planning to build one myself if it's to no avail. Though, it has a very fast and easy to use console administration client, but ... we're living in 2008...

(Last edited by dlbogdan on 20 Apr 2008, 14:47)

dske wrote:
sirfalo wrote:

Small info about old bug, which was removed in 6.02.
I have currently latest version 0.7.0.1 and I have this "Untranslated key"... Could there be any other reason als internal bug?

yes a really untranslated key if you are using a non-English version, because of the new elements.
i mentioned it earlier that the translations need to be upgraded.

Thank you for answer.
I've just noticed that in truth I'm using normal, english version (without any translations). From my local PC I have those "untranslated key" but when I'm logging from other, remonte PC (firefox on Vista) this error not exist.
I can't log from Opera because "Authentification failed", but this is something which is already known.

dlbogdan wrote:

...So, i managed to do this on my own again, but i get  "Inappropriate ioctl for device if I stop/start an already seeding torrent.  ...

I'm getting the same warning, like I wrote:

I'm seeding one torrent and Status shows "Seeding warn, send torrent to CTCS failed: Inappropriate ioctl for device".

But as soon as someone is downloading from my torrent this message disapears and the status shows "seeding". So the torrent just gives wrong output but the torrent is seeding alride without problems.

Excuse me dlbogdan, can you share you x86 version?
I want to try it.

Thank you

dlbogdan wrote:

oh... i just saw that i'm suppose to have the already patched version (ctorrent 3.3 or smthg. anyway much newer svn compilation then the one that said it was fixed  in)

how come i'm still having the ioctl error

I ran into the same issue.  strace revealed this:

    ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbeffe220) = -1 ENOTTY (Inappropriate ioctl for device)
    ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbeffe1f4) = -1 ENOTTY (Inappropriate ioctl for device)

That is, because ctorrent tries to write out its status information but doesn't have a proper TTY.

An easy fix for this is to add the '-d' switch to the ctorrent-args (/etc/dctcs.conf):

    ctorrent-args=-d

Hope that helps.

Hi there,
I installed dctcs (really great gui), made all necessary configuration in dctcs.conf and i ran into the following problem (as I saw it was discussed earlier but i didn't find an answer). If I upload a torrent file through gui or I copy the file through samba, dctcs recognize the torrent but is unable to start the torrent.
On the other hand, if i start the torrent manually
ctorrent -s filename torrent_file -S localhost:15000
the torrent starts , is visible in dctcs and can be controlled by web gui. In this case I can pause/stop/start it without any problems.
Do you have any idea why I cannot start a torrent directly from gui ?
I have an Asus WL500g preminum, kamikaze 7.09 (kernel 2.4 - squashfs), and using a 100GB USB HDD (2 partitions: 1-swap 500MB, 2-ext3 partition), all packages installed to root.
Please help!
Kind regards,
Ibrahim

(Last edited by ibrahim on 26 Aug 2008, 11:03)

Someone should port this to UCI and LuCI UI.

(Last edited by Yanira on 26 Aug 2008, 11:20)

When I try to start downloading a torrent (i.e. start ctorrent from YDCTCS) the dctcs-daemon dies, but ctorrent is started...

I'm running DCTCS 0.7.0-1 and Enhanced CTorrent dnh3.3.2. I've also tried changing the DCTCS binary into this one: http://yodctcs.googlepages.com/dctcs-kam.
It partly solved the problem, as I can now start a torrent which has been previously downloaded, to seed it. But if I try to start a new download DCTCS dies.

Anyone with a solution to this problem?

Thanks,
Alexander