Welcome,
Guest
. Please
login
or
register
.
07-03-2009, 19:04:32
TorrentFlux Home
|
TorrentFlux Hosting
TorrentFlux Forums
TorrentFlux Support
Linux Installations Support
Solaris installation Example!
« previous
next »
Pages:
[
1
]
2
All
Author
Topic: Solaris installation Example! (Read 17193 times)
ykanello
Newbie
Offline
TF Base: Linux 2.x
Posts: 6
Solaris installation Example!
«
on:
11-08-2006, 09:28:28 »
Hi I have the lastest version of torrentflux on a SPARC solaris 9 system.
apache version: 2.0.52
php: 5.0.4
mysql: 4.0.21
python: 2.4.2
After I start the torrent, at the first refresh, i get this: INCOMPLETE Torrent died.
I cannot find errors in the access.log file of the apache, nor at the error.log.
There is not a real information on the .torrent/<filename>.stat file either.
Is there a way I can find a log or something to find out why the torrents fail?
BTW i put a small torrent and it download, but I cannot seed it.
Please advise.
Thanx.
Yiannis.
«
Last Edit: 01-18-2007, 05:53:18 by ykanello
»
Logged
ykanello
Newbie
Offline
TF Base: Linux 2.x
Posts: 6
Re: Solaris installation Help!
«
Reply #1 on:
11-08-2006, 13:54:02 »
after further investigation, I notice that the torrent runs, as long as I don't refresh the page.
the moment I refresh the torrent dies.
Looking at the error log I see the is trying to do a ps command, but the options are not correct for this OS. Does anyone knows what is the output of the command in a linux os?
Code:
"ps x -o pid='' -o ppid='' -o command='' -ww | gr
ep btphptornado | grep ".$cfg["torrent_file_path"]." | grep -v grep"
I would really appreciate any help
Logged
bluebird
Newbie
Offline
TF Base: Linux 2.x
Posts: 23
Re: Solaris installation Help!
«
Reply #2 on:
11-08-2006, 16:19:53 »
the grep commands should be equal, only ps differs...
here's what the ps parameters do(from the man page)
Quote
x Lift the BSD-style "must have a tty" restriction, which is imposed upon the set of all processes when some
BSD-style (without "-") options are used or when the ps personality setting is BSD-like. The set of processes
selected in this manner is in addition to the set of processes selected by other means. An alternate description
is that this option causes ps to list all processes owned by you (same EUID as ps), or to list all processes
when used together with the a option.
Quote
-o format user-defined format.
format is a single argument in the form of a blank-separated or comma-separated list, which offers a way to
specify individual output columns. The recognized keywords are described in the STANDARD FORMAT SPECIFIERS
section below. Headers may be renamed (ps -o pid,ruser=RealUser -o comm=Command) as desired. If all column
headers are empty (ps -o pid= -o comm=) then the header line will not be output. Column width will increase as
needed for wide headers; this may be used to widen up columns such as WCHAN
(ps -o pid,wchan=WIDE-WCHAN-COLUMN -o comm). Explicit width control (ps opid,wchan:42,cmd) is offered too. The
behavior of ps -o pid=X,comm=Y varies with personality; output may be one column named "X,comm=Y" or two columns
named "X" and "Y". Use multiple -o options when in doubt. Use the PS_FORMAT environment variable to specify a
default as desired; DefSysV and DefBSD are macros that may be used to choose the default UNIX or BSD columns.
Code:
-ww
isn't in the man page, but the short help says
Quote
-w,w wide output
but I can't see any difference
ps
Code:
PID TTY TIME CMD
21140 pts/3 00:00:00 bash
23865 pts/3 00:00:00 ps
ps -ww
Code:
PID TTY TIME CMD
21140 pts/3 00:00:00 bash
23899 pts/3 00:00:00 ps
And here's how the output of the command looks like:
Quote
1395 1 /usr/bin/python -OO /var/www/localhost/tfQManager.py /exports/torrentflux/.torrents/queue/ 5 5 10 cd /exports/torrentflux/; HOME=/exports/torrentflux/; export HOME; nohup /usr/bin/python -OO /var/www/localhost/btphptornado.py
1520 1 /usr/bin/python -OO /var/www/localhost/btphptornado.py True -1 /exports/torrentflux/.torrents/*****.stat bluebird --responsefile /exports/torrentflux/.torrents/*****.torrent --display_interval 5 --max_download_rate 0 --max_upload_rate 1 --max_uploads 1 --minport 49160 --maxport 49300 --rerequest_interval 1800 --super_seeder 0
1749 1 /usr/bin/python -OO /var/www/localhost/btphptornado.py True -1 /exports/torrentflux/.torrents/*****.stat cde --responsefile /exports/torrentflux/.torrents/*****.torrent --display_interval 5 --max_download_rate 0 --max_upload_rate 1 --max_uploads 1 --minport 49160 --maxport 49300 --rerequest_interval 1800 --super_seeder 0
7519 1 /usr/bin/python -OO /var/www/localhost/tfQManager.py /exports/torrentflux/.torrents/queue/ 5 5 10 cd /exports/torrentflux/; HOME=/exports/torrentflux/; export HOME; nohup /usr/bin/python -OO /var/www/localhost/btphptornado.py
18323 1 /usr/bin/python -OO /var/www/localhost/btphptornado.py True -1 /exports/torrentflux/.torrents/*****.stat cde --responsefile /exports/torrentflux/.torrents/*****.torrent --display_interval 5 --max_download_rate 0 --max_upload_rate 1 --max_uploads 1 --minport 49160 --maxport 49300 --rerequest_interval 1800 --super_seeder 0
851 1 /usr/bin/python -OO /var/www/localhost/tfQManager.py /exports/torrentflux/.torrents/queue/ 5 5 10 cd /exports/torrentflux/; HOME=/exports/torrentflux/; export HOME; nohup /usr/bin/python -OO /var/www/localhost/btphptornado.py
11316 1 /usr/bin/python -OO /var/www/localhost/btphptornado.py False 0 /exports/torrentflux/.torrents/*****.stat bluebird --responsefile /exports/torrentflux/.torrents/*****.torrent --display_interval 5 --max_download_rate 0 --max_upload_rate 20 --max_uploads 2 --minport 49160 --maxport 49300 --rerequest_interval 1800 --super_seeder 0 --security 0
Give this command a try(no guarantee):
Code:
"ps -A -o pid,ppid,args' | grep btphptornado | grep ".$cfg["torrent_file_path"]." | grep -v grep"
(I think ppid is worng, seems to be 1 always)
«
Last Edit: 11-08-2006, 16:32:51 by bluebird
»
Logged
Code:
while (!$job) {
$money--;
}
ykanello
Newbie
Offline
TF Base: Linux 2.x
Posts: 6
Re: Solaris installation Help!
«
Reply #3 on:
11-09-2006, 09:55:06 »
Thanx for the reply.
Actually the code does ... kinda work
the big difference between the /usr/bin/ps and the /usr/ucb/ps is that the latter, bsd style, accepts the -ww, which shows the whole command executed, where the /usr/bin/ps (gnu ps), doesn't.
This is creates a problem to the queue script because it cannot find the torrents running!
I have submitted some part of the code to a college who wrote the original ps for linux, for ideas.
Otherwise, I have to write some extra code to produce the same output I guess.
I will update the posting, once i failed or succeded
Thanx for the help!
Y.
Logged
ykanello
Newbie
Offline
TF Base: Linux 2.x
Posts: 6
Re: Solaris installation Help!
«
Reply #4 on:
11-09-2006, 10:41:03 »
FIXED FIXED FIXED FIXED!
Ok I had to change 2 files at the end.
First the functions.php.
There i changed all ps commands to /usr/ucb/ps with the correct options to have same output as the gnu ps, EXCEPT the line with the the
Code:
"ps x -o pid='' -o ppid='' -o command='' -ww | gr
ep btphptornado | grep ".$cfg["torrent_file_path"]." | grep -v grep"
there i put the following ps command:
Code:
/usr/ucb/ps axlww |cut -c10-20,67-
I also changed the TF_BitTornado/tfQManager.py (it had few ps 's in there as well).
Thank you all, people who just read, bluebird who replied, Branko Lancaster for help with the ps options,
and all the people who wrote and maintain TF. AWSOME
Logged
mkstalen
Newbie
Offline
Posts: 7
Re: Solaris installation Help!
«
Reply #5 on:
11-16-2006, 17:33:44 »
can I suggest that a global variable is added for OS type (linux, OSX, SunOS, BSD etc). Default it to linux, but that way you can add a simple check for sections of code which require differences for different OS's...
Logged
ykanello
Newbie
Offline
TF Base: Linux 2.x
Posts: 6
Re: Solaris installation Example!
«
Reply #6 on:
01-18-2007, 06:07:01 »
Hi all.
I am posting here the whole torrentflux port for solaris.
It is not official, but I needed it for solaris 9 on sparc so I made all changes I needed to make it working.
Please check the config.php. I am using a remote database so prolly you need to fix the settings there.
I also have a screen of the tf2.3 on sparc sol9 when its working. The server load shows the 3 values of the uptime.
The files are a tarball gziped.
They are here. I dont know if I can upload code here, so as the image comes from external site sorry.
http://www.ykanello.info/TorrentFlux2.3_solarisMod.tar.gz
Please if you use it, leave some feedback. Maybe we can improve it a little more.
Logged
Siegfried
Newbie
Offline
Posts: 4
Re: Solaris installation Example!
«
Reply #7 on:
02-10-2007, 03:15:57 »
Quote from: ykanello on 01-18-2007, 06:07:01
Please if you use it, leave some feedback. Maybe we can improve it a little more.
This is very nice, thanks for the modifications. I plan on deploying this on a Solaris 10 update 3 machine that's x86-64.
I am coming from a Linux background with not a whole lot of Solaris experience, so I need to setup all the necessary stuff first like mysql, apache, php, etc. The new secure by default installation is something I have to read up on to make sure all my services work as well.
Logged
t1ck
Newbie
Offline
Posts: 3
Re: Solaris installation Example!
«
Reply #8 on:
04-29-2007, 18:40:41 »
the file doesnt exist on the server anymore
im trying to get tf 2.3 up on my nexenta(opensolaris/ubuntu mix) system, i think its kinda the same problem with ps, already went trou all that code and i think ps calls are ok now... but i still get an error.
sees to be ps related, but i have absolutely no clue how to fix this atm
Traceback (most recent call last):
File "/www/TF_BitTornado/btphptornado.py", line 451, in ?
run(argv[1],argv[2],argv[3],argv[4],argv[5:])
File "/www/TF_BitTornado/btphptornado.py", line 430, in run
remove(statusFile+".pid")
OSError: [Errno 2] No such file or directory: '/incoming/.torrents/_kuro_hana_death_note_28_x264_1024x576_e3056758__mkv.stat.pid'
Logged
Siegfried
Newbie
Offline
Posts: 4
Re: Solaris installation Example!
«
Reply #9 on:
06-17-2007, 17:24:45 »
Quote from: t1ck on 04-29-2007, 18:40:41
Traceback (most recent call last):
File "/www/TF_BitTornado/btphptornado.py", line 451, in ?
run(argv[1],argv[2],argv[3],argv[4],argv[5:])
File "/www/TF_BitTornado/btphptornado.py", line 430, in run
remove(statusFile+".pid")
OSError: [Errno 2] No such file or directory: '/incoming/.torrents/_kuro_hana_death_note_28_x264_1024x576_e3056758__mkv.stat.pid'
I am getting the same error. After starting the torrent, it immediately goes to the STOPPED state and this error message is produced in the log. I am still attempting to fix it, but no luck yet. Is there a way I can run with verbose debugging output?
«
Last Edit: 06-18-2007, 00:09:54 by Siegfried
»
Logged
Siegfried
Newbie
Offline
Posts: 4
Patch for Solaris 10 [patch]
«
Reply #10 on:
06-18-2007, 00:20:10 »
Hello, I have fixed the issues and it is running great on Solaris 10 now.
The problems were with the ugly cut'ing of the /usr/ucb/ps version. I had to change it from cut -c10-20,67- to cut -c10-20,75- to remove an extra column.
The real problem, though, was TorrentFlux's assumption that the parent PID is always 1 (ie. init). Well, this is fine if you're in regular Linux, or a global Solaris zone. But if you're in a non-global zone, it is the zsched process that is the parent, and it's PID is never 1. This assumption might work, but really it should not be made because there are scenarios where your parent process might not be init or have PID 1, even in Linux.
The correct approach would be to determine who the parent process really is by examining the PPID of a command known to be launched by the parent (ie. a command launched by TF) and use that to check for the PPID.
The patch I made does not do this, it is more of a hack that determines the PID of zsched. In the ps command it simply replaces the zsched PID of the PPID column with 1 using sed. I based it off modifications provided by ykanello.
Anyway, for those who want to run TorrentFlux on Solaris 10 inside a non-global zone, here is the
patch
.
«
Last Edit: 06-18-2007, 00:22:08 by Siegfried
»
Logged
t1ck
Newbie
Offline
Posts: 3
Re: Solaris installation Example!
«
Reply #11 on:
06-18-2007, 12:40:52 »
if u wonder why i dont reply: im using mldonkey now(again) and stopped fiddling around with TF, it compiled fine and runs well (except for the fact that i have to restart it with a cronjob twice a day because the performance goes down after a while).
i thought tf would be easier because its "just" an php application that should run fine with an apache, but ive been wrong
.
Logged
Siegfried
Newbie
Offline
Posts: 4
Re: Solaris installation Example!
«
Reply #12 on:
06-18-2007, 23:26:03 »
Quote from: t1ck on 06-18-2007, 12:40:52
if u wonder why i dont reply: im using mldonkey now(again) and stopped fiddling around with TF, it compiled fine and runs well (except for the fact that i have to restart it with a cronjob twice a day because the performance goes down after a while).
i thought tf would be easier because its "just" an php application that should run fine with an apache, but ive been wrong
.
Interesting. TF has been working fine for me on Linux, and so far it is running great on Solaris. I don't really see performance going down that much after a while. It does seem a bit slower than other clients because each torrent is a python process, but on my systems it's fine.
I did find heavy RAM usage until I changed the defaults to do less caching and connecting to fewer peers. Other than that, it runs great on a Pentium 3 733mhz with 320MB of RAM, serving a lot of other stuff as well. I never had much luck with mldonkey + torrents.
Logged
t1ck
Newbie
Offline
Posts: 3
Re: Solaris installation Example!
«
Reply #13 on:
06-19-2007, 13:25:26 »
its a bit more complicated.
im not using sun solaris,
im using nexenta, which is a opensolaris with some debian style(apt-get and such stuff).
and it has to work in a zone. hardware is 466 mhz and 256 mb ram.
but performance is ok, its always at max (if u put torrents in with enough sources of course
)
as a client side gui i use sancho, which has pretty every feature i could imagine.
Logged
Toaster
Newbie
Offline
Posts: 1
Re: Patch for Solaris 10 [patch]
«
Reply #14 on:
12-21-2007, 20:36:55 »
Quote from: Siegfried on 06-18-2007, 00:20:10
Hello, I have fixed the issues and it is running great on Solaris 10 now.
The problems were with the ugly cut'ing of the /usr/ucb/ps version. I had to change it from cut -c10-20,67- to cut -c10-20,75- to remove an extra column.
The real problem, though, was TorrentFlux's assumption that the parent PID is always 1 (ie. init). Well, this is fine if you're in regular Linux, or a global Solaris zone. But if you're in a non-global zone, it is the zsched process that is the parent, and it's PID is never 1. This assumption might work, but really it should not be made because there are scenarios where your parent process might not be init or have PID 1, even in Linux.
The correct approach would be to determine who the parent process really is by examining the PPID of a command known to be launched by the parent (ie. a command launched by TF) and use that to check for the PPID.
The patch I made does not do this, it is more of a hack that determines the PID of zsched. In the ps command it simply replaces the zsched PID of the PPID column with 1 using sed. I based it off modifications provided by ykanello.
Anyway, for those who want to run TorrentFlux on Solaris 10 inside a non-global zone, here is the
patch
.
Ah good! thanks a lot man
I tried every modif from your diff file and it works!! I am using a non-global zone too, my download is working now
If someone wants those modified file i can package it and put it somewhere to be downloaded...
thanks again!
Toaster.
Logged
Pages:
[
1
]
2
All
« previous
next »
Jump to:
Please select a destination:
-----------------------------
TorrentFlux
-----------------------------
=> TorrentFlux News
=> TorrentFlux Search Engine Modules and Updates
=> Forum/Website Problems
-----------------------------
TorrentFlux Support
-----------------------------
=> Linux Installations Support
=> Windows Installations (Limited Support)
=> International Support
-----------------------------
Bugs, Fixes, and Feature Requests
-----------------------------
=> Linux Bugs
=> Windows Bugs
=> Feature Requests
-----------------------------
Code Hacks and Tools
-----------------------------
=> TorrentFlux Tools
=> TorrentFlux 2.3 Hacks
=> TorrentFlux 2.1 Hacks
=> TorrentFlux 2.0 Hacks
=> TorrentFlux 1.x Hacks
=> TorrentFlux Themes (skins)
-----------------------------
Off The Wall
-----------------------------
=> Off Topic Discussion
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.1
|
SMF © 2006, Simple Machines LLC