From owner-freebsd-ports@FreeBSD.ORG Thu Aug 11 20:30:51 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 447891065672 for ; Thu, 11 Aug 2011 20:30:51 +0000 (UTC) (envelope-from rsc@admadic.de) Received: from wp135.webpack.hosteurope.de (wp135.webpack.hosteurope.de [IPv6:2a01:488:42::50ed:848e]) by mx1.freebsd.org (Postfix) with ESMTP id C7E578FC13 for ; Thu, 11 Aug 2011 20:30:50 +0000 (UTC) Received: from p5b2b4c9d.dip.t-dialin.net ([91.43.76.157] helo=srvms.intra.admadic.com); authenticated by wp135.webpack.hosteurope.de running ExIM with esmtpa id 1Qrbtu-0000lj-31; Thu, 11 Aug 2011 22:30:49 +0200 Received: (qmail 69995 invoked by uid 98); 11 Aug 2011 20:19:19 -0000 Received: from 192.168.1.56 by srvms.intra.admadic.com (envelope-from , uid 89) with qmail-scanner-2.01 ( Clear:RC:1(192.168.1.56):. Processed in 0.009368 secs); 11 Aug 2011 20:19:19 -0000 Received: from unknown (HELO ?192.168.1.56?) (192.168.1.56) by srvms.lpz.q-17.de.local with SMTP; 11 Aug 2011 20:19:19 -0000 Message-ID: <4E44394E.1050605@admadic.de> Date: Thu, 11 Aug 2011 22:19:26 +0200 From: Rainer Schwarze User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <4E42F7BD.4000105@admadic.de> <20110811013130.GF262@magic.hamla.org> <4E438787.4050503@admadic.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;rsc@admadic.de;1313094650;8b447183; Subject: Re: lighttpd/moinmoin/fastcgi: child exited with status 127 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2011 20:30:51 -0000 On 8/11/2011 7:35 PM, Olivier Duchateau wrote: > Hi, > > MoinMoin wiki is written in Python, so lighttpd must be configured > either wscgi (fastcgi) or cgi. Hi, fastcgi is activated and does work. I spent some more time on that and looked into the sources and inserted some debug output statements (error.log and code snippet below). I'd say that during manual start 6 child processes are started, during jail startup only 1 is started. The line "xxx child 4" is written just before the call to execve which starts the cgi. The line "xxx child 5" does not appear - it would, if execve would return - so that seems ok. The lines "child 6" and "child 7" are written before the call to waitpid. They appear only once, so I guess, the first child fails. (in contrast to a second child causing errors) My next steps will be to look into the moin.fcgi script and try to add some debugging statements. I'd assume that this goes belly up at some point. However, maybe in a few hours - for now I have to get back to the work which pays my bills :-) Does this provide some hints where my problem could be? Thanks and best regards, Rainer The error.log: ( -------- when jail starts: ------------) 2011-08-11 19:55:35: (log.c.166) server started 2011-08-11 19:55:35: (mod_fastcgi.c.1098) xxx child 6 2011-08-11 19:55:35: (mod_fastcgi.c.1007) xxx child 1 2011-08-11 19:55:35: (mod_fastcgi.c.1015) xxx child 2 2011-08-11 19:55:35: (mod_fastcgi.c.1076) xxx child 3 2011-08-11 19:55:35: (mod_fastcgi.c.1079) xxx child 4 2011-08-11 19:55:35: (mod_fastcgi.c.1101) xxx child 7 2011-08-11 19:55:35: (mod_fastcgi.c.1114) the fastcgi-backend /usr/local/www/wiki/admadic/moin.fcgi failed to start: 2011-08-11 19:55:35: (mod_fastcgi.c.1118) child exited with status 127 /usr/local/www/wiki/admadic/moin.fcgi 2011-08-11 19:55:35: (mod_fastcgi.c.1121) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version. If this is PHP on Gentoo, add 'fastcgi' to the USE flags. 2011-08-11 19:55:35: (mod_fastcgi.c.1409) [ERROR]: spawning fcgi failed. The source snippet from mod_fastcgi.c: ... /* father */ /* wait */ log_error_write(srv, __FILE__, __LINE__, "s", "xxx child 6"); select(0, NULL, NULL, NULL, &tv); log_error_write(srv, __FILE__, __LINE__, "s", "xxx child 7"); switch (waitpid(child, &status, WNOHANG)) { case 0: /* child still running after timeout, good */ log_error_write(srv, __FILE__, __LINE__, "s", "xxx child 8"); break; case -1: /* no PID found ? should never happen */ log_error_write(srv, __FILE__, __LINE__, "ss", "pid not found:", strerror(errno)); return -1; default: log_error_write(srv, __FILE__, __LINE__, "sbs", "the fastcgi-backend", host->bin_path, "failed to start:"); /* the child should not terminate at all */ if (WIFEXITED(status)) { log_error_write(srv, __FILE__, __LINE__, "sdb", "child exited with status", WEXITSTATUS(status), host->bin_path); log_error_write(srv, __FILE__, __LINE__, "s", "If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI- enabled version.\n" "If this is PHP on Gentoo, add 'fastcgi' to the USE flags."); ... thanks and best regards, Rainer > > 2011/8/11 Rainer Schwarze : >> On 8/11/2011 3:31 AM, Sahil Tandon wrote: >>> On Wed, 2011-08-10 at 23:27:25 +0200, Rainer Schwarze wrote: >>> >>>> I want to run a moinmoin wiki in a jail via lighttpd. When I start the >>>> jail, lighttpd logs an error and stops. When I run it manually, it >>>> starts without problems and I can access the wiki in the browser. >>>> >>>> It looks like there are certain differences between starting when the >>>> jail starts and starting manually. Which of those would influence this >>>> issue? Can you give me any hints where I should start looking? (I asked >>>> google but didn't get useful results.) >>> >>> What is the output of the following command, inside the jail, as the >>> user that runs lighttpd? >>> >>> % php-cgi -v >> >> srvks# php-cgi -v >> php-cgi: Command not found. >> >> :-) php is not needed there (at least I hope so). >> >>> >>>> 2011-08-10 20:54:54: (mod_fastcgi.c.1108) child exited with status 127 >>>> /usr/local/www/wiki/admadic/moin.fcgi >>> >>> Without more information, my WAG is that certain files (libraries, >>> perhaps) used by fcgi cannot be found by lighttpd from inside the jail. >> >> The confusing part is, I can start it in the jail manually with >> >> /usr/local/etc/rc.d/lighttpd start >> >> So all the required things should be there. >> >> Are there any debug flags which I could activate to get more output from >> lighttpd? I probably don't need those which log requests etc. There >> don't seem to be any as command line parameter? >> >> best regards, >> Rainer >> -- >> Rainer SCHWARZE (Mr.) >> _______________________________________________ >> freebsd-ports@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-ports >> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" >> > > > -- Rainer SCHWARZE (Mr.)