Hi Folks!
I'm trying to insall the sheep server on my local network, but I'm not sure if I've got the most recent version. All I can find is the 2.6b1 from the old releases page. Is there a newer one, and where could I find it if there is?
tks!
m.
Hi Folks!
I'm trying to insall the sheep server on my local network, but I'm not sure if I've got the most recent version. All I can find is the 2.6b1 from the old releases page. Is there a newer one, and where could I find it if there is?
tks!
m.
Sure, I just installed the
Sure, I just installed the server, here's my server -> http://67.240.89.172/sheep/cgi/status.cgi
You have two options for your get.cgi, the c version and the get-cgi.perl, im using the get-cgi.perl, to use that one rename or copy or make a symbolic link of it to get.cgi
Also I have to edit my sheep.conf, make sure you put sheep.conf in your modules.d folder, at least thats how i did it on mine, then reset apache, you can test if apache is running your sheep.conf file by purposely misspelling one of the ScriptAlias lines and resetting the server and seeing if you get an error message.
Here's my edited sheep.conf file for your viewing
Alias /sheep/cgi/list "/var/www/localhost/htdocs/v2.6/cgi/list.txt"
ScriptAlias /sheep/cgi/get "/var/www/localhost/htdocs/v2.6/cgi/get.cgi"
ScriptAlias /sheep/cgi/put "/var/www/localhost/htdocs/v2.6/cgi/put.cgi"
ScriptAlias /sheep/cgi/set "/var/www/localhost/htdocs/v2.6/cgi/set.cgi"
ScriptAlias /sheep/cgi/frame "/var/www/localhost/htdocs/v2.6/cgi/frame.cgi"
ScriptAlias /sheep/cgi/apophysis "/var/www/localhost/htdocs/v2.6/cgi/apophysis.cgi"
ScriptAlias /sheep/cgi/best "/var/www/localhost/htdocs/v2.6/cgi/best.cgi"
ScriptAlias /sheep/cgi/dead "/var/www/localhost/htdocs/v2.6/cgi/dead.cgi"
ScriptAlias /sheep/cgi/node "/var/www/localhost/htdocs/v2.6/cgi/node.cgi"
ScriptAlias /sheep/cgi/vote "/var/www/localhost/htdocs/v2.6/cgi/vote.cgi"
ScriptAlias /sheep/cgi/status "/var/www/localhost/htdocs/v2.6/cgi/status.cgi"
ScriptAlias /sheep/cgi/submit "/var/www/localhost/htdocs/v2.6/cgi/submit.cgi"
ScriptAlias /sheep/cgi/reset "/var/www/localhost/htdocs/v2.6/cgi/reset.cgi"
ScriptAlias /sheep/cgi/login "/var/www/localhost/htdocs/v2.6/cgi/login.cgi"
ScriptAlias /sheep/cgi/logout "/var/www/localhost/htdocs/v2.6/cgi/logout.cgi"
Alias /sheep "/var/www/localhost/htdocs/v2.6/"
<Directory "/var/www/localhost/htdocs/v2.6/cgi">
SetEnv PERL5LIB /var/www/localhost/htdocs/v2.6/cgi
Options +ExecCGI
Order allow,deny
Allow from all
# stop access to perl and backup files
<FilesMatch "(.pl|~)$">
Deny from all
</FilesMatch>
</Directory>
<Directory "/var/www/localhost/htdocs/v2.6">
# need this as mpgs are links
Options SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
i had to add more ScripAlias lines for everything to work, i prolly did some overkill on it but better safe then sorry, i also added Options +ExecCGI, without that line I couldn't get the cgi to execute.
I put all the source in my /var/www/localhost/htdocs folder and chowned to apache and chmodded the cgi files to execute. The one major step to get any user to run it is this, open etc/rc.fsd then make it look like this
if [ "`id -gn`" != apache ]; then
echo "must be run as user sheep" 1>&2
# exit 1
fi
I commeted out ext 1, sort of a shitty thing to do but it made it work, you'll still get must be run as user sheep message but it wont exit.
Now go into minimal.pl change the $local=0 to $local=1
the lines following look like this for me:
# root of server state, no links
if ($local) {
$root_url = "http://localhost/sheep";
$human_root_url = $root_url;
$root_dir = "/var/www/localhost/htdocs/v2.6";
in my config.pl:
$outgoing_url_prefix = "http://67.240.89.172/sheep/gen";
in my global.pl:
line 30: $run_dir="/var/www/localhost/htdocs/v2.6";
line 39: $use_bt = 0;
line 774: print OUT "args=\"jpeg=$jpeg_quality\" ";
line 880: system("gunzip -c $anim_dir/0.spex | env qs=0.01 ss=0.25 time=0 out=$anim_dir/0.jpg $bin_dir/flam3-animate");
line 1454: print OUT "args=\"jpeg=75\" ";
the last three line edits remove the bits=32, which prevents desity estimating in the new version of flam3, make sure you get the source and install the newest version of flam3 before rendering your own sheep, its much better than the older versions.
I edited version 2.6.8 of electricsheep client, i'll put it up on my server and you can download it. Before you make it edit you Makefile there's two subdirs flags just comment them out, all you need to do is make electricsheep, not flam3 or mpeg2dec
#subdirs = mpeg2dec flam3
#SUBDIRS = flam3 mpeg2dec
dont know why there's two but thats the way it was.
here's my revised electricsheep client http://67.240.89.172/electricsheep-2.6.8-revised.tar.gz
just ./configure, edit the Makefile as i said above then make, you shouldn't make install since im sure you have a newer version of electricsheep installed already. Just run it locally from a terminal with ./electricsheep, make sure you set the --server option for ./electricsheep, this is how my commandline looks:
./electricsheep --server 67.240.89.172/sheep --display-anim 0 --tryagain .1 --nick Johnathon --nice 0
and then to view your rendered sheep with the server:
./electricsheep --standalone 1 --mplayer 1 --frame-rate 23 --nrepeats 1
uh.... just reply again if you need more help, im not sure if i got everything in this message
EDIT: btw URL in electricsheep-preferences is the URL that people will be redirected to if the click your name in the credit page at http://v2d7c.sheepserver.net/cgi/status.cgi?&detail=credit not the server url, there's no way that i see to change the server url in the new 2.7 version except editing the code at
utils.c char *dream_server = "v2d7c.sheepserver.net";
but i prefer to not change that so that i can run the 'real' server and mine at the same time. Anyway good luck and ask as many questions as you like.
Thanks!
Wow, thanks for the thorough reply (:
Thanks to your writeup, I've got my sheepserver running properly. Or almost, anyways...
Permissions are all sorted, no more errors in the logs etc, all seems fine.
Except there's still a problem:
./electricsheep --server 192.168.1.61/sheep --display-anim 0 --tryagain .1 --nick emmdub --nice 0
this runs, and seems to be rendering sheep, however:
[Thu Oct 08 13:14:14 2009] [error] [client 192.168.1.61] exec djpeg: No such file or directory
[Thu Oct 08 13:14:14 2009] [error] [client 192.168.1.61] [Thu Oct 8 13:14:14 2009] electricsheep-2.6: put: djpeg error (192.168.1.61.AB7AD9846AD73D5C 0/15): Broken pipe
If traced the source of the error down to put.cgi somewhere around line 166-185.
I do have netpbm (10.0-12), libjpeg-progs (6b-14), mjpegtools (1.9.0) installed.
www-data (user apache runs as) can execute djpeg for sure.
not sure what's going on there....
Once I've got that, I shold be good to go...
...on to other issues (:
The customized linux client isn't going to do me any good, since our renderfarm is all windows. However, I still need to be able to specify the server the client will use. I can't use the official server for a couple of reasons; one is that our renderfarm isn't connected to the world, and the other is that I'm trying to render high def sheep.
So I guess I'm either going to have to use an older client, or recompile the windows client from src, which I have noo clue about.
The other interesting problem I'm going to have is figureing out a way to limit the client so that it only renders when CPU usage is below, say, 10%. I can't be having the farm neglecting it's official duties (;
Thanks for your help so far!
m.
you gotta copy all programs
you gotta copy all programs used by the server to the bin directory. For example my bin directory contains these files:
/var/www/localhost/htdocs/v2.6/bin/blendjpg
/var/www/localhost/htdocs/v2.6/bin/djpeg
/var/www/localhost/htdocs/v2.6/bin/dot
/var/www/localhost/htdocs/v2.6/bin/flam3-genome
/var/www/localhost/htdocs/v2.6/bin/fsd
/var/www/localhost/htdocs/v2.6/bin/fsd-client
/var/www/localhost/htdocs/v2.6/bin/fsd-dequeuer
/var/www/localhost/htdocs/v2.6/bin/pnmmultipaste
/var/www/localhost/htdocs/v2.6/bin/.cvsignore
and you can use and older version and use --server localhost/sheep or --server 127.0.0.1/sheep one of those should work. I also have no idea on how to compile programs from source on windows, you can prolly install a windows c compiler, but the bash ./configure wont work so i dunno.
Also you can port foward on your router to foward port 80 traffic to your local IP, then you can access your server on the net. just use your IP address
no, that wasn't it...
I actually did have djpeg in bin/ so that wasn't the problem...
There's a problem in put.cgi, at least on my system:
my $djpeg = open(DJPEG, "|-");
unless (defined($djpeg)) {
eslog("put: unable to fork: $!");
exit(0);
}
if ($djpeg == 0) {
open(STDOUT, '>&', $pnm_fh) or die "unable to re-open STDOUT";
if (0) {
exec('djpeg');
}
else {
$ENV{'LD_LIBRARY_PATH'} = "/opt/intel/ipp/5.0/ia32/sharedlib:/opt/intel/ipp/5.0/ia32/sharedlib:/usr/local/intel-jpeg";
exec('/usr/local/intel-jpeg/djpeg-intel', '/proc/self/fd/0', '/proc/self/fd/1');
}
die "exec djpeg: $!\n";
}
It was trying to use the djpeg-intel instead of djpeg.
I changed:
if (0) {
exec('djpeg');
}
to:
if (1) {
exec('djpeg');
}
which got it a bit further... but ended up barfing on:
if (($multi == 1 and ($client_x != 2*$width or $client_y != 2*$height))
or ($multi == 4 and ($client_x != $width or $client_y != $height))) {
eslog("put: client $fsd_userid supplied bad dimensions ($client_x, $client_y) for $id/$real_frame");
exit(0);
}
which I fixed by commenting out that block of code.
I'm now happily rendering sheeps (:
m.
cool, do you have your router
cool, do you have your router port fowarded? I.E. can I see your server?
found it, now other problems...
K, so I found the server at http://electricsheep.svn.sourceforge.net/viewvc/electricsheep/trunk/server/ and installed it using http://electricsheep.wikispaces.com/Server+Installation as a guideline, but I'm experiencing some issues...
It seems that fsd is not running as user sheep according to my apache error log:
[Wed Oct 07 14:08:44 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:44 2009] electricsheep-2.6: reset server!
[Wed Oct 07 14:08:44 2009] [error] [client 192.168.1.61] mkdir: cannot create directory `/home/sheep/bt/torrents/0': No such file or directory
[Wed Oct 07 14:08:44 2009] [error] [client 192.168.1.61] must be run as user sheep
[Wed Oct 07 14:08:44 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:44 2009] electricsheep-2.6: about to start fsd
[Wed Oct 07 14:08:44 2009] [error] [client 192.168.1.61] must be run as user sheep
[Wed Oct 07 14:08:44 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:44 2009] electricsheep-2.6: started
[Wed Oct 07 14:08:44 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:44 2009] electricsheep-2.6: more crap
[Wed Oct 07 14:08:44 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:44 2009] electricsheep-2.6: qlee 0
[Wed Oct 07 14:08:49 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:49 2009] electricsheep-2.6: q_spex id=0
[Wed Oct 07 14:08:49 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:49 2009] electricsheep-2.6: q_fsd start genome loop 0
[Wed Oct 07 14:08:56 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:56 2009] electricsheep-2.6: q_fsd finished genome loop
[Wed Oct 07 14:08:56 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:56 2009] electricsheep-2.6: get unable to open fsd-socket: No such file or directory
[Wed Oct 07 14:08:56 2009] [error] [client 192.168.1.61]
[Wed Oct 07 14:08:56 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:56 2009] electricsheep-2.6: patching cbase
[Wed Oct 07 14:08:56 2009] [error] [client 192.168.1.61] [Wed Oct 7 14:08:56 2009] electricsheep-2.6: reset complete
That's the log output when I run: http://192.168.1.61/sheep/cgi/reset.cgi
When I run electricsheep-preferences, I enter http://192.168.1.61/sheep/ into URL, and the Test Connection button returns good, registered.
And finally, /home/sheep/docroot/v2.6/cgi/get.cgi doesn't seem to exist.
My system specs:
Linux Mint 7, Apache/2.2.11 (Ubuntu), perl v5.10.0
Could somebody point me in the right direction?
Tks!
m,.