DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-12-28 11:12:36

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Transmission and Clutch

I did upload a test package for transmission webui - Clutch.
http://dns323.kood.org/downloads/untest … hp.tar.bz2

This package includes:
*transmission 0.96
*php 5.2.5
*lighttpd 1.4.18
*clutch 0.1+svn282

This package misses:
*working unix.o ( which has been posted here http://dns323.kood.org/forum/t116-Server.html )
*some configuration fixes for lighttpd (for example auth module)

I would appreciate if someone could post working unix.o and test out binaries included in this package.
I dont have my DSM-G600 locally around and I run gentoo hdd boot at the moment with same version configuration.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#2 2008-01-02 10:33:22

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

http://dns323.kood.org/downloads/untest … 96.tar.bz2
Now there is working unix.o module included and auth module configured for lighttpd.
Just extract torrent directory to the root of your hard disk.
fun_plug for this pack:

Code:

#!/bin/sh
insmod /mnt/HD_a2/torrent/unix.o
/mnt/HD_a2/torrent/transmission-daemon -s /mnt/HD_a2/torrent/transmission-socket
/mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf -m /mnt/HD_a2/torrent

Last edited by sala (2008-01-05 23:37:29)


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#3 2008-01-02 21:19:05

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

People who compile transmission inside a Gentoo chroot/boot will need this patch for 0.96 version to get over some compile problems mentioned here:

Code:

--- libtransmission/platform.c.old      2008-01-02 21:10:52 +0200
+++ libtransmission/platform.c  2008-01-02 21:11:45 +0200
@@ -22,14 +22,8 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/

-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #ifdef __BEOS__
-  #include <signal.h>
+  #include <signal.h>
   #include <fs_info.h>
   #include <FindDirectory.h>
   #include <kernel/OS.h>
@@ -45,6 +39,12 @@
   #include <pthread.h>
 #endif

+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
 #include <sys/types.h>
 #include <dirent.h>
 #include <fcntl.h>

DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#4 2008-01-03 23:18:06

Jundee
New member
Registered: 2007-12-20
Posts: 2

Re: Transmission and Clutch

What went wrong?

# insmod /mnt/HD_a2/torrent/unix.o
Using /mnt/HD_a2/torrent/unix.o
# /mnt/HD_a2/torrent/transmission-daemon -s /mnt/HD_a2/torrent/transmission-socket
# /mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf
2008-01-03 22:49:16: (plugin.c.165) dlopen() failed for: /usr/local/lib/mod_indexfile.so File not found
2008-01-03 22:49:16: (server.c.621) loading plugins finally failed

Offline

 

#5 2008-01-04 00:51:08

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

Jundee wrote:

# /mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf
2008-01-03 22:49:16: (plugin.c.165) dlopen() failed for: /usr/local/lib/mod_indexfile.so File not found
2008-01-03 22:49:16: (server.c.621) loading plugins finally failed

No worry's, going to fix this by tomorrow.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#6 2008-01-04 02:27:56

SystemR89
Member
From: >>Turin<< >>Italy<<
Registered: 2006-09-19
Posts: 88

Re: Transmission and Clutch

Great Sala!
Now i'am @ Barcelona!
In the next day I'll try it

Thank You!


Free is BETTER!!
Use GNU/Linux!!

Offline

 

#7 2008-01-04 09:51:53

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

sala wrote:

Jundee wrote:

# /mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf
2008-01-03 22:49:16: (plugin.c.165) dlopen() failed for: /usr/local/lib/mod_indexfile.so File not found
2008-01-03 22:49:16: (server.c.621) loading plugins finally failed

No worry's, going to fix this by tomorrow.

Ok, now I did add couple of extra mods for lighttpd.
http://dns323.kood.org/downloads/untest … 96.tar.bz2

php is configured as cgi not fastcgi because of memory concern. And lighttpd is configured to 81 port.
Also "chmod 777 /mnt/HD_a2/torrent/transmission-socket; chmod 777 /mnt/HD_a2/torrent/www/remote/data" might be needed if you run into permission errors.

Here I got gentoo hdd boot with 3 big torrents downloading.

Code:

 09:50:02 up 23 days,  9:58,  0 users,  load average: 0.81, 0.75, 0.55

             total       used       free     shared    buffers     cached
Mem:         30232      29484        748          0       1144      16396
-/+ buffers/cache:      11944      18288
Swap:       257000       3556     253444

Filesystem    Type 1048576-blocks      Used Available Capacity Mounted on
/dev/scsi/host0/bus0/target0/lun0/part3 ext3         3853      1974      1684      54% /
/dev/scsi/host0/bus0/target0/lun0/part4 ext3        70919     60892      6425      91% /mnt/storage

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1    484    56 ?        S     2007   0:04 init
root         2  0.0  0.0      0     0 ?        S     2007   0:00 [keventd]
root         3  0.0  0.0      0     0 ?        SN    2007   0:01 [ksoftirqd_CPU0]
root         4  0.0  0.0      0     0 ?        S     2007  10:30 [kswapd]
root         5  0.0  0.0      0     0 ?        S     2007   0:01 [bdflush]
root         6  0.0  0.0      0     0 ?        S     2007   0:00 [kupdated]
root         8  0.0  0.0      0     0 ?        S     2007   0:00 [mtdblockd]
root         9  0.0  0.0      0     0 ?        S     2007   0:00 [khubd]
root        10  0.0  0.0      0     0 ?        S     2007   0:09 [kjournald]
root        43  0.0  0.1    612    56 ?        Ss    2007   0:25 /sbin/devfsd /dev
root       127  0.0  0.0      0     0 ?        S     2007   2:10 [kjournald]
root      1260  0.0  0.5    836   172 ?        Ss    2007   0:06 /usr/sbin/syslog-ng
root      1791  0.0  0.0    940    20 ?        S     2007   0:00 /usr/sbin/dropbear -p XXXXX
root      1945  0.0  0.3    492   120 ?        Ss    2007   0:02 /usr/sbin/cron
root     11609  0.0  0.4    492   136 ?        S    09:50   0:00  \_ /usr/sbin/cron
root     11611  5.0  2.6   1512   804 ?        Ss   09:50   0:00      \_ /bin/sh /etc/cron.custom/readme
root     11634  0.0  1.3    992   404 ?        R    09:50   0:00          \_ ps aufx
root      2137  0.0  0.0    472     0 tts/0    Ss+   2007   0:00 /sbin/agetty 9600 ttyS0 vt100
root     26564  0.0  0.0   2588     0 ?        Ss    2007   0:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
root      1931  0.0 17.7   8748  5372 ?        S    Jan02   0:05 transmission-daemon -s /tmp/transmission-socket
root      1932  0.0 17.7   8748  5372 ?        S    Jan02   0:00  \_ transmission-daemon -s /tmp/transmission-socket
root      1933  9.2 17.7   8748  5372 ?        R    Jan02 197:18      \_ transmission-daemon -s /tmp/transmission-socket
lighttpd  1986  0.0  0.3   3640   112 ?        S    Jan02   0:02 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf

DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#8 2008-01-05 20:35:40

jangesle
Member
Registered: 2008-01-05
Posts: 6

Re: Transmission and Clutch

Jundee wrote:

    # /mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf
    2008-01-03 22:49:16: (plugin.c.165) dlopen() failed for: /usr/local/lib/mod_indexfile.so File not found
    2008-01-03 22:49:16: (server.c.621) loading plugins finally failed


I tried to install the funplug, but alas, to no avail. And when running the funplug commands on commandline, I get the same errors as Jundee..
But looks like an excellent use for DSM G600..
Am a bit at loss how to get it running..

Offline

 

#9 2008-01-05 23:29:57

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

jangesle wrote:

Am a bit at loss how to get it running..

I don't understand, did you re-download fixed package with mod_indexfile.so present and you still get same error?

Try

Code:

/mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf -m /mnt/HD_a2/torrent

DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#10 2008-01-06 00:12:42

jangesle
Member
Registered: 2008-01-05
Posts: 6

Re: Transmission and Clutch

Thanks for quick reply!

Code:

# ls
README               mod_auth.so          php-cgi
fun_plug             mod_cgi.so           php.ini
lighttpd             mod_dirlisting.so    transmission-cli
lighttpd.conf        mod_indexfile.so     transmission-daemon
lighttpd.user        mod_proxy.so         transmission-remote
mod_access.so        mod_redirect.so      transmission-socket
mod_accesslog.so     mod_rewrite.so       unix.o
mod_alias.so         mod_status.so        www
# /mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf -m /mnt/HD_a2/torrent
2008-01-06 00:05:44: (plugin.c.165) dlopen() failed for: /mnt/HD_a2/torrent/mod_staticfile.so File not found 
2008-01-06 00:05:44: (server.c.621) loading plugins finally failed 
#

the -m switch doesn't complain about the "/usr/local/lib/mod_indexfile.so" file anymore, but mod_staticfile.so.
I tried to pull the above file from a previous version of lighttpd from the repository, but still no luck..  any ideas?

cheers!

Offline

 

#11 2008-01-06 13:25:44

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

Going to repack tomorrow. I guess my testings went wrong because I had lighttpd installed locally from portage.

Now its repacked and up.

Last edited by sala (2008-01-07 10:07:43)


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#12 2008-01-07 12:16:15

jangesle
Member
Registered: 2008-01-05
Posts: 6

Re: Transmission and Clutch

Excellent! Will test it tonite. Got it running fine remotely, but won't be able to get to the web front before the evening. But looks good!

The only little typo in the repackaged setup:
the fun_plug has the -m switch to the transmission-daemon, instead of lighttpd, where I think it ought to be.
so, from:

Code:

insmod /mnt/HD_a2/torrent/unix.o
/mnt/HD_a2/torrent/transmission-daemon -s /mnt/HD_a2/torrent/transmission-socket -m /mnt/HD_a2/torrent
/mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf

change to:

Code:

insmod /mnt/HD_a2/torrent/unix.o
/mnt/HD_a2/torrent/transmission-daemon -s /mnt/HD_a2/torrent/transmission-socket 
/mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf -m /mnt/HD_a2/torrent

But thanks! Excellent work!

Offline

 

#13 2008-01-07 12:59:05

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

Ok, now repacked again with fixed fun_plug
I did add chmod just in case smile
Also for warning I want to add that "chmod 777 /mnt/HD_a2/torrent/www/remote/data" might be needed to. But Clutch is smart enough to let you know about all permission errors if they exist.

Code:

insmod /mnt/HD_a2/torrent/unix.o
/mnt/HD_a2/torrent/transmission-daemon -s /mnt/HD_a2/torrent/transmission-socket
chmod 777 /mnt/HD_a2/torrent/transmission-socket
/mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf -m /mnt/HD_a2/torrent

Additionally I did compile transmission 1.00 and I did include Clutch 0.2.
http://dns323.kood.org/downloads/untest … 00.tar.bz2


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#14 2008-01-07 18:40:39

jangesle
Member
Registered: 2008-01-05
Posts: 6

Re: Transmission and Clutch

Hi again, now everything seems to be running fine. though the Clutch web front cannot connect to the server. just says: "Connection Failed. Could not connect to the server. You may need to reload the page to reconnect."

Is there some configuration magic beyond the lighttpd.user file?

when looking what the lighttpd is saying when trying to load the clutch from the browser, I get:

# PHP Warning:  socket_write() [<a href='function.socket-write'>function.socket-write</a>]: unable to write to socket [32]: Broken pipe in /mnt/HD_a2/torrent/www/remote/lib/TransmissionController.class.php on line 116


Any idea?

Last edited by jangesle (2008-01-07 19:30:36)

Offline

 

#15 2008-01-07 19:27:49

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

Connection will be made trough transmission-socket. Check if socket really exists and daemon is running. /mnt/HD_a2/torrent/www/remote/data contains secket.txt file which must contain transmission-socket full location.

Here are full installation how-to if you want to trace further :
http://home.unitedtelecom.be/ut6226214/ … ssion.html


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#16 2008-01-07 19:40:28

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

jangesle wrote:

# PHP Warning:  socket_write() [<a href='function.socket-write'>function.socket-write</a>]: unable to write to socket [32]: Broken pipe in /mnt/HD_a2/torrent/www/remote/lib/TransmissionController.class.php on line 116

Looks nasty. Maybe someone who has used unix.o and sockets successfully in d-link unmodified firmware have a comment.
Tomorrow I will write an a example test code for php socket use and maybe then it will be more clear where the problem is.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#17 2008-01-07 19:44:43

jangesle
Member
Registered: 2008-01-05
Posts: 6

Re: Transmission and Clutch

hmm.. doesn't look quite that bad. thanks to your link to the installation how-to, when I tried to launch the transmission-remote it seems to just point to a wrong place:

Code:

# ./transmission-remote -f /mnt/HD_a2/torrents
transmission-remote: failed to connect to socket file: //.transmission/daemon/socket: No such file or directory
#

Offline

 

#18 2008-01-07 19:59:24

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

jangesle wrote:

hmm.. doesn't look quite that bad. thanks to your link to the installation how-to, when I tried to launch the transmission-remote it seems to just point to a wrong place:

Code:

# ./transmission-remote -f /mnt/HD_a2/torrents
transmission-remote: failed to connect to socket file: //.transmission/daemon/socket: No such file or directory
#

transmission-remote does not know where your transmission-socket is. You must find a way to set correct socket location or make a socket to /root/.transmission/daemon/socket (i guess, looking error you get).

Code:

mkdir -p /root/.transmission/daemon/
/mnt/HD_a2/torrent/transmission-daemon -s /root/.transmission/daemon/socket

DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#19 2008-01-07 20:13:04

SystemR89
Member
From: >>Turin<< >>Italy<<
Registered: 2006-09-19
Posts: 88

Re: Transmission and Clutch

sala wrote:

jangesle wrote:

# PHP Warning:  socket_write() [<a href='function.socket-write'>function.socket-write</a>]: unable to write to socket [32]: Broken pipe in /mnt/HD_a2/torrent/www/remote/lib/TransmissionController.class.php on line 116

Looks nasty. Maybe someone who has used unix.o and sockets successfully in d-link unmodified firmware have a comment.
Tomorrow I will write an a example test code for php socket use and maybe then it will be more clear where the problem is.

I get the same error.
Socket is created by transmission but seem that lighttpd cannot use it.


Free is BETTER!!
Use GNU/Linux!!

Offline

 

#20 2008-01-08 14:12:40

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

Try

Code:

insmod /mnt/HD_a2/torrent/unix.o
/mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf -m /mnt/HD_a2/torrent
/mnt/HD_a2/torrent/transmission-daemon -d -f -s /mnt/HD_a2/torrent/transmission-socket
chmod 777 /mnt/HD_a2/torrent/transmission-socket

This should run transmission-daemon in debugging mode and foreground so you could capture some result as php connects to transmission-socekt.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#21 2008-01-08 16:18:58

SystemR89
Member
From: >>Turin<< >>Italy<<
Registered: 2006-09-19
Posts: 88

Re: Transmission and Clutch

sala wrote:

Try

Code:

insmod /mnt/HD_a2/torrent/unix.o
/mnt/HD_a2/torrent/lighttpd -f /mnt/HD_a2/torrent/lighttpd.conf -m /mnt/HD_a2/torrent
/mnt/HD_a2/torrent/transmission-daemon -d -f -s /mnt/HD_a2/torrent/transmission-socket
chmod 777 /mnt/HD_a2/torrent/transmission-socket

This should run transmission-daemon in debugging mode and foreground so you could capture some result as php connects to transmission-socekt.

now I get this error:

Code:

bh-3.2# /mnt/HD_a2/torrent/transmission-daemon -d -f -s /mnt/HD_a2/torrent/transmission-socket
/mnt/HD_a2/torrent/transmission-daemon: utils.c: 194: tr_msg: Assertion `((void *)0) != messageLock' failed.
Aborted

Free is BETTER!!
Use GNU/Linux!!

Offline

 

#22 2008-01-09 21:31:12

jangesle
Member
Registered: 2008-01-05
Posts: 6

Re: Transmission and Clutch

I got the following from the socket and from the server:

Code:

# /mnt/HD_a2/torrent/transmission-daemon -d -f -s /mnt/HD_a2/torrent/transmission-socket
2008-01-09 21:17:20: (log.c.75) server started 
Transmission 1.00 (4482) started

*** new client 11
>>> 78 bytes to client 11: 00000046d7:versiond5:label31:Transmission daemon 1.00 (4482)3:maxi2e3:mini1eee
<<< 52 bytes from client 11: 0000002cd1:0i1199906267e7:versiond3:maxi2e3:mini2eee
transmission-daemon: protocol parse error
transmission-daemon: error on client connection
*** client 11 went bye-bye

and from the server right after:

Code:

PHP Warning:  socket_write() [<a href='function.socket-write'>function.socket-write</a>]: unable to write to socket [32]: Broken pipe in /mnt/HD_a2/torrent/www/remote/lib/TransmissionController.class.php on line 116

Offline

 

#23 2008-07-16 08:11:41

jsleno
New member
Registered: 2008-07-16
Posts: 1

Re: Transmission and Clutch

Bump...

Is there any new news regarding this? I followed the instructions using both the .96 and 1.0 versions, and I still get the same parse errors and errors  and Broken Pipe errors that Jangesle is getting. I was unable to find anything on the Transmission or Clutch sites that would lead me to a solution either.Does anybody have an update?

Offline

 

#24 2008-07-21 23:00:40

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Transmission and Clutch

Lack of working unix sockets make this problem unresolvable. If you want and can, then you can flash custom firmware (can find info from wiki). Custom firmware does have working unix sockets and this Broken Pipe error should go way.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#25 2008-08-09 23:57:42

medlatek
Member
From: Clamart (France)
Registered: 2007-05-19
Posts: 21

Re: Transmission and Clutch

Hi,
I've follow your how-to with your custom firmware. But I've same error than jsleno.
What can I do to resolve this?
thanks

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB