PDA

Bekijk de volledige versie : Transmission Setup Help



SScorpio
18-01-2007, 03:39
I'm trying to get Transmission working on my WL-500gx. I have a flash drive setup as /opt and installed the transmission package off of ipkg.

I also setup thttpd; however, when I try to access the CGI I receive the following error message: "The requested URL '/cgi-bin/transmission.cgi' resolves to a file which is marked executable but is not a CGI file; retrieving it is forbidden."

I also copied a file into the configured source directory and processing never occurs.

Can anyone give me insight on getting this working?

SScorpio
18-01-2007, 15:47
I think I'm a little farther. I updated transmission today which placed a nice index in the www root. I also noticed that this package uses busybox_httpd so I didn't need to install and setup thttpd.

I've uninstalled thttpd and am now trying to access the CGI script from the busybox_httpd server which now appears to be running the script. However, I'm now receiving the following error:

/opt/share/www/cgi-bin/transmission.cgi: /opt/share/www/cgi-bin/transmission.cgi: 224: Syntax error: redirection unexpected


Any help would be appreciated.

CountZero
18-01-2007, 23:46
Do you have your work directory and configuration file set up properly?

SScorpio
19-01-2007, 02:16
I've attached my config I'm using.


# Configuration
# NOTE: no spaces around the = sign
# the config will be sourced (eg. . transmission.conf)

SOURCE=/opt/torrents/source
WORK=/opt/torrents/work
TARGET=/opt/torrents/target
#MAILTO=torrent@somedomain.com
#MAILFROM=torrent@somedomain.com
MAILOPT="-smail.somedomain.com -f"
USER=admin
GROUP=root
DATE_FORMAT="%d %h %H:%M"

# Transmission daemon variables
PIDFILE=/opt/var/run/transmission.pid
ACTIVE=/opt/torrents/active-torrents.txt
HOME=/opt/torrents
WATCHDOG=300
LISTENING_PORT=65534
# set SPEED in kB/s or -1 for unlimited
UPLOAD_SPEED=-1
DOWNLOAD_SPEED=-1
#UPLOAD_SPEED=41
#DOWNLOAD_SPEED=180
# change SYSLOG from /tmp/syslog.log to
SYSLOG=/opt/var/log/messages

#Uncomment the following for UPNP NAT traversal
#NAT_TRAVERSAL=--nat-traversal

# Seed torrent after completition (YES or NO)
AUTOSEED="YES"

# Creating graphical log of transfer with gnuplot
# can be very site specific issue. See transmission.cgi
# how this variables are used.
GNUPLOT=/opt/bin/gnuplot
GNUPLOT_COMMAND=${WORK}/transfer.gnuplot
GNUPLOT_DATA=${WORK}/transfer.data
GNUPLOT_OUTPUT=/opt/share/www/transfer.png
HTTP_IMG_LOCATION=../transfer.png
#TZ offset in seconds. Use +- sign. DST manually
TIMEZONE_OFFSET=+3600

#Colors for command line. # comment out if not needed
GREEN="\033[32;1m"
#NC="\033[0m"
#BACK_UP="\033[1K\033[0G"
NORMAL="\033[0m"
WARN="\033[33;1m"
BAD="\033[31;1m"
BOLD="\033[1m"
GOOD="\033[32;1m"

I'm using a new install of the 1.9.2.7-7f firmware. I have a usb flash drive setup and mapped to /opt and also used for swap that I'm testing this with before I get an enclosure.

I'm using the default unslung ipkg feed from: http://ipkg.nslu2-linux.org/feeds/unslung/wl500g

I also have the following packages installed.

expat - 2.0.0-6 - XML Parser library
fontconfig - 2.3.2-4 - Font configuration library
freetype - 2.1.10-4 - Free truetype library
gconv-modules - 2.2.5-6 - Provides gconv modules missing from the firmware. These are used by glibc's iconv() implementation.
gnuplot - 4.2.rc2-5 - Command-line driven interactive data and function plotting utility
ipkg - 0.99.149-2 - lightweight package management system
libgd - 2.0.33-3 - An ANSI C library for the dynamic creation of images
libjpeg - 6b-2 - collection of jpeg tools
libpng - 1.2.15-2 - Portable Network Graphics Libraries
libstdc++ - 0.2.0-6 - =Standard C++ library, wrapped for uClibc++
libuclibc++ - 0.1.12-4 - C++ standard library designed for use in embedded systems
nano - 2.0.2-1 - A pico like editor
ncurses - 5.6-1 - NCurses libraries
openssl - 0.9.7l-3 - Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librari
readline - 5.2-2 - The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are
transmission - 0.6+r1378-4 - lightweight BitTorrent client and daemon with WWW interface
zlib - 1.2.3-2 - zlib is a library implementing the 'deflate' compression system.


Any idea on what the problem could be?

drwxr-xr-x 5 admin root 4096 Jan 18 19:30 torrents

drwxr-xr-x 2 admin root 4096 Jan 18 19:30 source
drwxr-xr-x 2 admin root 4096 Jan 18 19:30 target
drwxr-xr-x 2 admin root 4096 Jan 18 19:30 work

oleo
19-01-2007, 08:14
you need to add cgipat


$ cat /opt/etc/thttpd.conf
dir=/opt/share/www
port=80
user=admin
nochroot
nosymlink
charset=iso-8859-2
cgipat=cgi-bin/*
novhost
logfile=/opt/var/log/thttpd.log
pidfile=/opt/var/run/thttpd.pid

maros
19-01-2007, 12:22
/opt/share/www/cgi-bin/transmission.cgi: /opt/share/www/cgi-bin/transmission.cgi: 224: Syntax error: redirection unexpected


Any help would be appreciated.

I've got the same error after upgrade from transmission_0.6+r1320-1 to transmission_0.6+r1378-4.

SScorpio
19-01-2007, 23:18
Thanks maros,

I just rolled back to 1320 rather than 1378 and everything appears to be functioning correctly.

maros
20-01-2007, 08:45
Thanks maros,

I just rolled back to 1320 rather than 1378 and everything appears to be functioning correctly.

Transmission-0.6+r1378-5 fixes this bug (http://wl500g.info/showthread.php?p=46306#post46306).

SScorpio
20-01-2007, 21:07
Yes Transmission-0.6+r1378-5 is now running the CGI interface like it should.

I place torrents in the source folder via samba and do a push on them to active and they are moved to the working folder.

At this point it never appears that they start. I see three processes of "transmissiond -p 58431 -w 300 -u -1 -d -1 -i /opt/var/run/transmission.pid /opt/torrents/active-torrents"; however, the .status files are never created and the log only contains:

Jan 20 15:57:10 transmission_watchdog: Transmission daemon restarted!
Jan 20 15:57:10 transmissiond[278]: Transmission daemon 0.7-svn (1378) started - http://transmission.m0k.org/

The transmissiond processes stay active; however, it does not appear that anything ever downloads and transfer.data file is always empty.

I am using public trackers that shouldn't care about the client and I have the port forwarded correctly.

oleo
20-01-2007, 22:20
Snipet from help file:

Known bugs:
* There is a problem with fork and pthreads in uclibc 0.9.19
See http://www.busybox.net/lists/uclibc/2003-March/005825.html
This affect only users of Oleg firmware on Asus routers with
http://ipkg.nslu2-linux.org/feeds/optware/wl500g/cross/stable/
package feed. Users are instructed to switch to
http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/
which uses newer uClibc 0.9.28 and NLPT or change transmission_watchdog
daemon startup code to

nohup transmissiond -v 1 -p ${LISTENING_PORT} \
-w ${WATCHDOG} \
-u ${UPLOAD_SPEED} \
-d ${DOWNLOAD_SPEED} \
-i ${PIDFILE} ${ACTIVE} 2> /dev/null &

which will spawn daemon in foreground mode and trash error messages.


7. Tried manually pressing watchdog for nothing. Im still having that text under the buttons on the script page : /opt/share/www/cgi-bin/transmission.cgi: kill: 624: (249) - No such process .
It looks like daemon died for some reason. Take a look into syslog messages.
The recommended way for running is using "Oleg" feed and not default "wl500g".

maros
20-01-2007, 22:25
Yes Transmission-0.6+r1378-5 is now running the CGI interface like it should.

I place torrents in the source folder via samba and do a push on them to active and they are moved to the working folder.

At this point it never appears that they start. I see three processes of "transmissiond -p 58431 -w 300 -u -1 -d -1 -i /opt/var/run/transmission.pid /opt/torrents/active-torrents"; however, the .status files are never created and the log only contains:

Jan 20 15:57:10 transmission_watchdog: Transmission daemon restarted!
Jan 20 15:57:10 transmissiond[278]: Transmission daemon 0.7-svn (1378) started - http://transmission.m0k.org/

The transmissiond processes stay active; however, it does not appear that anything ever downloads and transfer.data file is always empty.

I am using public trackers that shouldn't care about the client and I have the port forwarded correctly.

Can't confirm. It works for me.

Try to kill the transmissiond, then run "sh -x /opt/sbin/transmission_watchdog" and check the output for errors.

SScorpio
21-01-2007, 07:31
Manually running the watchdog did not produce any errors.

I took oleo's advice and switched over to the oleg branch rather than the default wl500g branch and installed the new uLibC. After messing around to get everything setup correctly again I am now downloading torrents using the latest version of Transmission.

Everyone, thank you for all of the help.

greengreen
30-01-2007, 14:03
Hi,
I installed lighttpd and php along this tutorial
http://wl500g.info/showthread.php?t=5247 and this works.
Now I would like to use transmission how-to start it.I installed it but what's now how can i to run web-gui and how to start download torrents.
Can someone to write little tutorial please?

thanks very much

oleo
30-01-2007, 15:15
You can improve wiki at http://www.nslu2-linux.org/wiki/Optware/Transmission with your comments.

For Oleg firmware there is no need for other httpd as busybox_httpd is enough.

dccharacter
11-03-2007, 20:56
I have read everything many many times and reinstalled everything several times. Still can't get it running. Can't access the page at the transmission address.

Haven't find a clear installation instruction...

oleo
11-03-2007, 23:08
Maybe we can help you. I have installed Transmission many many times.
Whats the problem dude?

dccharacter
12-03-2007, 16:54
Well, for now it seems that the only problem I have is that my web broser can't find anything at the address (http://192.168.1.1:8008/..../transmission.cgi). How do I diagnoze the problem? Was the installation successful? And do I need to set up the built-in web server or should it work right out of the box? Thanks in advance.

oleo
12-03-2007, 19:51
I you edit /opt/etc/init.d/S80busybox_httpd you will see at the top the line which should be uncommented to enable startup, like:

# Uncomment path to busybox httpd to enable startup
BUSYBOX_HTTPD=/usr/sbin/busybox_httpd

dccharacter
13-03-2007, 21:03
wow. did it. took me a while.

the line was uncommeted. I went a little bit further and inspected the rest of the file and also took a look at the heading comment in the transmission cgi itself. So, edited the user and password (got it finally! replaced in so many places, but none was correct before), and started with the line:

busybox_httpd -p 8008 -c /opt/etc/httpd.conf -h /opt/share/www

It said there's no httpd.conf, so I thought - not a big deal and made it like this:

busybox_httpd -p 8008 -h /opt/share/www

It started (I thought it started as it said nothing), i went to my.router:8008/cgi-bin/transmission.cgi and saw the page.

Hoorray! I'm not sure it works (haven't tried yet), but it's something at list. Gonna put the start line as is in post-mount and expect it will go up when the disk inserted. Please let me know if I'm on a wrong way.

Many thanks, your help is much appreciated.

dccharacter
13-03-2007, 21:47
how do I download anything? I tried some links found over INet; it says however they are not http nor ftp nor torrents. All of those ends with .torrent.

Oh, feel stupid

oleo
14-03-2007, 10:14
save .torrent file into source directory and pres watchdog button.
How to save file is desctibet at http://www.nslu2-linux.org/wiki/Optware/Transmission

dccharacter
14-03-2007, 20:06
Seems I found the problem. When I use samba or ftp to save the file it is saved in 8.3 format.

My setup is:
HDD formatted in FAT32
There's 256Mb file on it formatted to ext3 and mounted to /opt/

I think the problem was when the script tried to save the file to source, the filename was cut and the link was not actually the link anymore.

Dunno how to fix it.

oleo
14-03-2007, 20:28
use ext3 and not fat32.

dccharacter
14-03-2007, 20:47
Not an option - I use this disk from time to time to carry files with me...

oleo
15-03-2007, 07:19
then you can create virtual filesystem in a file large enough to hold /opt and source and work dir for transmission and leave target as vfat.

For example 6GB virtual filestystem on top of vfat:

dd if =/dev/null of=/tmp/harddisk/opt.ext3 count=12582912
mke2fs -j /tmp/harddisk/opt.ext3
mount -o loop /tmp/harddisk/opt.ext3 /opt

Similar goest to swap except that you use mkswap and swapon commands.

Elect
22-03-2007, 14:06
Also can't get it running :(

Deinstalled Ctorrent (and extras), which worked btw and installed Tranmission and syslog en gnuplot.

Things did: configured the transmission.conf and syslogd and syslogd is running
Things that not work :P:
- Transmission.cgi says: .status not found for... and tail: read: Is a directory and ofcourse Unable to find recent transfer stats in syslog

But it stupidly doesn't work. Whatever I try. Can't find out what is causing the error. For installation of the Transmission client I used this manual: http://87.239.14.2/~d02042/showpost.php?p=48593&postcount=42. Who can point me in the correct direction? :)

oleo
22-03-2007, 14:18
/opt/etc/transmission.conf should be



SYSLOG=/opt/var/log/messages



[admin@oleo init.d]$ cat S10cron
#!/bin/sh
#
# Startup script for cron
#
# Stop myself if running
PIDFILE=/opt/var/run/cron.pid
[ -f ${PIDFILE} ] && kill `cat ${PIDFILE}`
/opt/sbin/cron


But anyway, you need transmissiond to get running before anything else!

Elect
22-03-2007, 14:36
That setting was correct, used a couple of installation guides combined, but that one the most.
Transmissiond only runs when using the transmission_watchdog and still it gives the same messages then? But the .Status could not be found is gone now. Don't know why, didn't change much..

Transmissiond runs kinda much though for downloading only one torrent.


5233 admin R N 5664 5230 0.0 18.7 transmissiond
5219 admin S N 5664 1 0.0 18.7 transmissiond
5232 admin R N 5664 5230 0.0 18.7 transmissiond
5230 admin S N 5664 5219 0.0 18.7 transmissiond
5231 admin S N 5664 5230 0.0 18.7 transmissiond


You have any idea what can be wrong with the other errors?


tail: read: Is a directory
Unable to find recent transfer stats in syslog

oleo
22-03-2007, 15:00
There is only one line in transmission.cgi that uses tail command:

SPEED=`tail ${SYSLOG} | sed -n '/transmissiond/s/.*\dl \([0-9.]\{1,\}\) ul \([0-9.]\{1,\}\).*/DOWNLOAD="\1";UPLOAD="\2"/p' | tail -1`

I suspect that you have /opt/var/log/messages directory instead of file. Do this:

killall crond
rm -rf /opt/var/log/messages
touch /opt/var/log/messages
/opt/etc/init.d/S10cron start

Showing multiple threads of transmisiond for one torrent only is normal.

Elect
23-03-2007, 09:18
Thnx for your help! Making messages a file instead of a folder *ahum :cool: * did the trick.

wannaplay
02-04-2007, 19:24
How do I configure my router to access transmission from WAN on port 80?

oleo
02-04-2007, 21:15
First move router web interface to some other port. Eg. 8001 with

nvram set http_lanport=8001
nvram commit
reboot

Then change /opt/etc/init.d/S80busybox_httpd and change
port to 80.
This will give you acces from inside. Then configure NAT and
virtual server to accept connections from WAN.

wannaplay
06-05-2007, 18:35
I cannot get any torrent to download. I am using a pppoe connection.

The cgi interface is working ok. I put a torrent in the 'source' directory and push it to active. Then I see in the 'work' directory a folder with the name of the torrent file and transfer.data and transfer.gnuplot. But there is no download activity.

When I use the update button I get the message: "Unable to find recent transfer stats in syslog" When I look at the syslog there is no transfer data and I only see:

May 6 12:53:26 pppoe-relay[86]: PADI packet from 00:0d:52:68:e5:36 on interface eth1 not permitted

"netstat -ln" gives no LISTEN on 65534
"telnet my.outside.ip 65534" gets reply:

Connecting To my.outside.ip...Could not open connection to the host, on port 65534: Connect failed

My post-firewall looks like this:

#!/bin/sh

#SSH and FTP access from WAN
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 21 -j ACCEPT
iptables -t nat -A PREROUTING -i vlan1 -p tcp --dport 22 -j DNAT
--to-destination $4:22
iptables -t nat -A PREROUTING -i vlan1 -p tcp --dport 21 -j DNAT
--to-destination $4:21
iptables -I INPUT 2 -p tcp --syn --dport 443 -j ACCEPT

#Bittorrent
iptables -A INPUT -i $1 -p tcp --syn --dport 65534 -j ACCEPT
iptables -t nat -A PREROUTING -i $1 -p tcp --dport 65534 -j DNAT
--to-destination $4:65534
iptables -t nat -A PREROUTING -i vlan1 -p tcp --dport 8008 -j DNAT
--to-destination $4:8008

iptables -A INPUT -j DROP

The log in the cgi interface shows:

May 6 16:37:07 transmission_watchdog: Transmission daemon restarted!
May 6 16:37:07 transmissiond[309]: Transmission daemon 0.70-svn (1692) started - http://transmission.m0k.org/

Creating graph...

plot '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):2 title 'download' axis x1y1 with impulses, '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):3 title 'upload' with impulses, '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):4 axis x1y2 title 'load' with lines ^ "/opt/ext/torrent/work/transfer.gnuplot", line 13: warning: Skipping data file with no valid points plot '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):2 title 'download' axis x1y1 with impulses, '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):3 title 'upload' with impulses, '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):4 axis x1y2 title 'load' with lines ^ "/opt/ext/torrent/work/transfer.gnuplot", line 13: warning: Skipping data file with no valid points plot '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):2 title 'download' axis x1y1 with impulses, '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):3 title 'upload' with impulses, '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):4 axis x1y2 title 'load' with lines ^ "/opt/ext/torrent/work/transfer.gnuplot", line 13: warning: Skipping data file with no valid points plot '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):2 title 'download' axis x1y1 with impulses, '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):3 title 'upload' with impulses, '/opt/ext/torrent/work/transfer.data' using ($1+86400++3600):4 axis x1y2 title 'load' with lines ^ "/opt/ext/torrent/work/transfer.gnuplot", line 13: x range is invalid

oleo
07-05-2007, 09:26
check with "ps" if transmisisond is running.

Note that you must use oleg package feed and not wl500g!


]$ cat /opt/etc/ipkg.conf
#Uncomment the following line for native packages feed (if any)
#src/gz native http://ipkg.nslu2-linux.org/feeds/optware/oleg/native/stable
src/gz optware http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable
dest /opt/ /

wannaplay
07-05-2007, 18:05
I have checked with "ps" and transmissiond is not running.

I have also made the described changes tot ipkg.conf and reinstalled transmission with the oleg package feed. Unfortunately still no success.

oleo
07-05-2007, 21:12
It is not enough to reinstall transmission onlyu. You need to reinstall all packages and ipkg-opt and uclibc-opt too!

wannaplay
10-05-2007, 14:06
It is not enough to reinstall transmission onlyu. You need to reinstall all packages and ipkg-opt and uclibc-opt too!

When I give the command
ipkg install ipkg-opt I get two errors:


Installing ipkg-opt (0.99.163-9) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ipkg-opt_0.99.163-9_mipsel.ipk
An error ocurred, return value: 2.
Collected errors:
Package ipkg-opt wants to install file /opt/bin/ipkg
But that file is already provided by package ipkg
Package ipkg-opt wants to install file /opt/bin/update-alternatives
But that file is already provided by package ipkg

oleo
10-05-2007, 14:17
follow instructions on how to upgrade at http://www.nslu2-linux.org/wiki/FAQ/Optware-uClibcBuild

mistraller
22-08-2007, 18:14
I also ran into problems with upgrading to new oleg feed:
After installing uclibc-opt from new feed, my connection went down suddenly. Transmission was working fine I saw. But lateron I found out that I couldn't get into my asus anymore, the bash shell was giving me severe errors. The only way to get access to my box was using the "system command" in the webinterface, by removing uclibc-opt.

Now it's working fine, but not transmission of course. My router does a lot of jobs, like monitoring my solar panels, write rrdgraphs, webcam server, so that's more important than torrents.
Can you asure that reinstalling all packages will leave my settings as they are now?