Forum: Typo Typo on mongrel + apache + ubuntu

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Pat Ferrel (Guest)
on 2008-02-16 17:35
(Received via mailing list)
I have typo running on mongrel proxied thru apache2.  But I have two
* If a page request comes in while mongrel/typo is down I get an error
when typo comes back up I see it on the port mongrel uses but
apachecontinues to give the error.  I have to restart apache to get
back in sync.  Why?
* What form should my sysv init.d scripts take?  I created the one below
get around my apache restart problem but I see other talk about starting
mongrel instead of typo on reboot.  Which is right?  Can someone point
me to
a good init.d script that can be used for typo?

# Starts the ruby mongrel server that runs the occamsmachete blog

case "$1" in
start)  cd /home/pat/blog
        typo start .
    /etc/init.d/apache2 restart
stop)   cd /home/pat/blog
        typo stop .
restart)  cd /home/pat/blog
        typo restart .
    /etc/init.d/apache2 restart
sweep_cache)  cd /home/pat/blog
        typo sweep_cache .
*)  log_action_msg "Usage: /etc/init.d/typo
        exit 2
exit 0

I guess this is a mongrel question but thought I¹d try first here in
another typo user has run into this.
Scott Likens (Guest)
on 2008-02-16 21:26
(Received via mailing list)

Unfortunately that is an Apache thing, what it does is determine that
the service it is connecting to as a proxy is down, and it remembers
that it is down.

You would see in the apache error_log (for example)

[Sat Feb 16 11:55:38 2008] [error] (111)Connection refused: proxy:
HTTP: attempt to connect to ( fad
[Sat Feb 16 11:55:38 2008] [error] ap_proxy_connect_backend disabling
worker for (
[Sat Feb 16 11:55:38 2008] [error] proxy: HTTP: disabled connection
for (

Sometimes, a hard refresh after starting/stopping typo will resolve it
without restarting apache.  However that is really a limitation of
apache and has nothing to do with mongrel or typo. :(

As far as your init script, it looks fine... you might have a case
where when you stop apache it doesn't kill all of it's children and
the restart fails... not very likely since it's a restart but I've
seen it happen.

BTW, I just did that, it disabled it, re-started typo and it started
working again without restarting apache... running Apache 2.2.8

Hope that helps.

Bill McGonigle (Guest)
on 2008-02-22 07:59
(Received via mailing list)
On Feb 16, 2008, at 15:16, Scott Likens wrote:

> [Sat Feb 16 11:55:38 2008] [error] proxy: HTTP: disabled connection
> for (

Hmm, I've had typo not start on me on more than one occasion and my
apache hasn't done this.  I wonder what's different about my config.

I'm using:

         RewriteEngine On
         RewriteRule /(.*) http://localhost:8080/$1 [P,L]
         ProxyPassReverse / http://localhost:8080/

Pat Ferrel (Guest)
on 2008-02-22 17:11
(Received via mailing list)
I¹m using the virtual host def that came with the most recent typo shown
below.  Do you have sysv init.d scripts to start typo?

<VirtualHost *>

  # Change this to your email address

  # Change these to be valid paths for your host.  The DocumentRoot path
  # isn't very important because we don't actually use it for anything.
  # For security's sake, it's best that it points to an empty directory,
  # but that's not critical.
  DocumentRoot /var/www/blog
  ErrorLog /var/log/apache2/blog_error.log
  CustomLog /var/log/apache2/blog_access.log combined

  ServerSignature On

  # This is the important part--it sets up proxying.
  ProxyRequests Off
  <Proxy *>
    Order deny,allow
    Allow from all

  ProxyPass / http://localhost:4155/
  ProxyPassReverse / http://localhost:4155/
  ProxyPreserveHost On
Bill McGonigle (Guest)
on 2008-03-04 06:21
(Received via mailing list)
Oops, sorry, missed your reply.

On Feb 22, 2008, at 11:08, Pat Ferrel wrote:

> Do you have sysv init.d scripts to start typo?

No, I have to admit to having some rc.local lines. :P

This topic is locked and can not be replied to.