I''ve been googling and searching for this solution for hours, but am not finding it. Having trouble running latest Rails/LighTTPD 1.3.13/ruby-fcgi 0.8.6 on FreeBSD 5.3. I had a configuration that worked a couple months ago for LighTTPD, but now it returns errors like: 2005-05-10 17:08:56: (mod_fastcgi.c.1921) unexpected end-of-file (perhaps the fastcgi process died): pid: 97156 fcgi-fd: 8 remote-fd: 6 2005-05-10 17:08:56: (mod_fastcgi.c.2743) child exited, pid: 97156 status: 0 2005-05-10 17:08:56: (mod_fastcgi.c.2782) response not sent, request sent: 1494 connection-fd: 6 fcgi-fd: 8 I then tried running dispatch.fcgi from the command line. on my Debian desktop, this places me in "offline mode" as I would expect, but under FreeBSD it silently dies without an error or anything, even in my Rails logs. What I find even *more* interesting is that I just removed all traces of fcgi.rb and its supporting libraries from my system and dispatch.fcgi still behaves the exact same way (I.e. fails silently.) I would have expected a load error, as happened on Debian. Yet, when I run a "find . -name ''*fcgi*''" from /usr/local/lib/ruby I only get: ./gems/1.8/gems/rails-0.12.1/dispatches/dispatch.fcgi ./gems/1.8/gems/actionpack-1.8.1/examples/address_book_controller.fcgi ./gems/1.8/gems/actionpack-1.8.1/examples/benchmark_with_ar.fcgi Thoughts?
I was having this problem a couple days ago as well. The problem was that my rails library was updated to 0.12.1, but I hadn''t upgraded the app to use it yet. Have you done that? If not, check out http://manuals.rubyonrails.com/read/book/15 That''s for going from 0.9-0.10, but it ought to work for 12. That worked for me...if it doesn''t help out, I''ve got no clue. Check out #lighttpd on freenode, somebody there will be able to help. On 5/10/05, Nolan J. Darilek <nolan-BEppJtBJOObp4W7C3Lsfgg@public.gmane.org> wrote:> I''ve been googling and searching for this solution for hours, but am > not finding it. > > Having trouble running latest Rails/LighTTPD 1.3.13/ruby-fcgi 0.8.6 on > FreeBSD 5.3. I had a configuration that worked a couple months ago for > LighTTPD, but now it returns errors like: > > 2005-05-10 17:08:56: (mod_fastcgi.c.1921) unexpected end-of-file (perhaps the fastcgi process died): pid: 97156 fcgi-fd: 8 remote-fd: 6 > 2005-05-10 17:08:56: (mod_fastcgi.c.2743) child exited, pid: 97156 status: 0 > 2005-05-10 17:08:56: (mod_fastcgi.c.2782) response not sent, request sent: 1494 connection-fd: 6 fcgi-fd: 8 > > I then tried running dispatch.fcgi from the command line. on my Debian > desktop, this places me in "offline mode" as I would expect, but under > FreeBSD it silently dies without an error or anything, even in my > Rails logs. > > What I find even *more* interesting is that I just removed all traces > of fcgi.rb and its supporting libraries from my system and > dispatch.fcgi still behaves the exact same way (I.e. fails silently.) > I would have expected a load error, as happened on Debian. Yet, when I > run a "find . -name ''*fcgi*''" from /usr/local/lib/ruby I only get: > > ./gems/1.8/gems/rails-0.12.1/dispatches/dispatch.fcgi > ./gems/1.8/gems/actionpack-1.8.1/examples/address_book_controller.fcgi > ./gems/1.8/gems/actionpack-1.8.1/examples/benchmark_with_ar.fcgi > > Thoughts? > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On Tue, May 10, 2005 at 05:10:57PM -0600, Pat Maddox wrote:> I was having this problem a couple days ago as well. The problem was > that my rails library was updated to 0.12.1, but I hadn''t upgraded the > app to use it yet. Have you done that? If not, check outThis is a brand new 0.12.1 app, generated yesterday. I also just generated a fresh app, theorizing that perhaps the shebangs were off (I uploaded the app to my server) but even a freshly-generated app on the target system exhibits the exact same behavior.> That worked for me...if it doesn''t help out, I''ve got no clue. Check > out #lighttpd on freenode, somebody there will be able to help.Thanks. I think this is a ruby-fcgi issue, though, or possibly a Rails one, as I''m running the script from the command line and not being placed in offline mode as I should be. Incidentally, I''m using something that requires iconv (salted_login?) and dispatch.fcgi didn''t complain about missing iconv, either. Running script/server did, and I fixed the problem, but that hasn''t resolved the larger issue. Somewhere, fcgi is silently dying on my 5.3 system, before even reaching a point where it requires iconv, even with fresh, unmodified applications, and without any trace of an fcgi library installed. Should at least be good for a LoadError, I''d think.
Are you using the ruby-fcgi port or the gem? From the initial post, it looked like you''re using the port. Not sure if that''s the case, but if it''s not, try installing from ports rather than the gem. I had a bunch of problems with the gem, but the port worked fine for me. Someone in the (#lighttpd) IRC would definitely know though. On 5/10/05, Nolan Darilek <nolan-BEppJtBJOObp4W7C3Lsfgg@public.gmane.org> wrote:> On Tue, May 10, 2005 at 05:10:57PM -0600, Pat Maddox wrote: > > I was having this problem a couple days ago as well. The problem was > > that my rails library was updated to 0.12.1, but I hadn''t upgraded the > > app to use it yet. Have you done that? If not, check out > > This is a brand new 0.12.1 app, generated yesterday. I also just > generated a fresh app, theorizing that perhaps the shebangs were off > (I uploaded the app to my server) but even a freshly-generated app on > the target system exhibits the exact same behavior. > > > That worked for me...if it doesn''t help out, I''ve got no clue. Check > > out #lighttpd on freenode, somebody there will be able to help. > > Thanks. I think this is a ruby-fcgi issue, though, or possibly a Rails > one, as I''m running the script from the command line and not being > placed in offline mode as I should be. > > Incidentally, I''m using something that requires iconv (salted_login?) > and dispatch.fcgi didn''t complain about missing iconv, either. Running > script/server did, and I fixed the problem, but that hasn''t resolved > the larger issue. Somewhere, fcgi is silently dying on my 5.3 system, > before even reaching a point where it requires iconv, even with fresh, > unmodified applications, and without any trace of an fcgi library > installed. Should at least be good for a LoadError, I''d think. > >
This is from the rails wiki. I thought I read something about silently failing. Make sure you are running the C-based fcgi driver. Especially after you update Ruby you usually have to recompile all C-based extensions. However fcgi ships with a totally broken Ruby-based version which silently takes over. If you have odd problems on your FastCGI page, like pages which only load half and finish 15 seconds later, just reinstall fcgi with gem install fcgi _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Tue, May 10, 2005 at 05:47:01PM -0600, Pat Maddox wrote:> Are you using the ruby-fcgi port or the gem? From the initial post, > it looked like you''re using the port. Not sure if that''s the case, > but if it''s not, try installing from ports rather than the gem. I had > a bunch of problems with the gem, but the port worked fine for me.Tried the port, the gem and downloading a tarball of 0.86 which is patched but not available in ports. No luck. I get the following error after gem initialization. Did you get something like this? Successfully installed fcgi-0.8.5 Installing RDoc documentation for fcgi-0.8.5... No definition for fcgi_s_accept No definition for fcgi_s_each No definition for fcgi_s_each No definition for fcgi_s_iscgi No definition for fcgi_in No definition for fcgi_out No definition for fcgi_err No definition for fcgi_env No definition for fcgi_finish No definition for fcgi_stream_putc No definition for fcgi_stream_write No definition for fcgi_stream_print No definition for fcgi_stream_printf No definition for fcgi_stream_puts No definition for fcgi_stream_addstr No definition for fcgi_stream_flush No definition for fcgi_stream_getc No definition for fcgi_stream_ungetc No definition for fcgi_stream_gets No definition for fcgi_stream_read No definition for fcgi_stream_eof No definition for fcgi_stream_eof No definition for fcgi_stream_close No definition for fcgi_stream_closed No definition for fcgi_stream_binmode No definition for fcgi_stream_isatty No definition for fcgi_stream_isatty No definition for fcgi_stream_sync No definition for fcgi_stream_setsync
I''m running here with Apache2+mod_fastgci without problems. You can try to update the ruby-fcgi port with my patch located here: http://blog.innerewut.de/articles/2005/05/06/ruby-on-rails-and-the-freebsd-ports It updates ruby-fcgi from 0.8.5 to 0.8.6. I contacted the maintainer, but so long no reaction. You than do not need the fgci gem. Greets, Jonathan -- Jonathan Weiss jw-eM0Q5iXcOashFhg+JK9F0w@public.gmane.org http://blog.innerewut.de
Ok, I have no idea what''s up. Perhaps it''s the phase of the moon or something, but it seems to work now. I tried with the port, the gem, an install of the tarball directly. I made sure that the C version was loading, and tried a number of other things. Seems to work now, however, and I have no clue why. Thanks for the help.