Forum: Ruby on Rails Multiple Apps running under Lighttpd with scgi on a Windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eric G. (Guest)
on 2006-01-27 03:37
(Received via mailing list)
I've run into a problem on one of my development machines. I'm trying to
run multiple rails apps on one dev machine that runs Windows. Problem is
that is seems that I can only run one scgi_service at a time, meaning
that only one of my apps will function at a time. Anyone know how I can
get around this, other than getting a *nix box (which I should have
soon, hopefully) ?

Lighttpd.conf (part of it):

var.test= "C:/Rails/Test"

$HTTP["host"] == "test" {
    server.document-root = var.test+ "/public"
    server.errorlog = var.test+ "/log/lighttpd-errors.log"
    accesslog.filename = var.test+ "/log/lighttpd-access.log"
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
    server.error-handler-404   = "/dispatch.scgi"
    scgi.server = ( "dispatch.scgi" => ((
        "host" => "127.0.0.1",
        "port" => 1001,
        "check-local" => "disable"
    )) )
}

var.test2= "C:/Rails/Test2"

$HTTP["host"] == "test2" {
    server.document-root = var.test2+ "/public"
    server.errorlog = var.test2+ "/log/lighttpd-errors.log"
    accesslog.filename = var.test2+ "/log/lighttpd-access.log"
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
    server.error-handler-404   = "/dispatch.scgi"
    scgi.server = ( "dispatch.scgi" => ((
        "host" => "127.0.0.1",
        "port" => 1000,
        "check-local" => "disable"
    )) )
}

Scgi.yaml #1
---
:host: 127.0.0.1
:password: **********
:port: 1001
:logfile: log/scgi.log
:config: config/scgi.yaml
:control_url: druby://127.0.0.1:8999
:disable_signals: true
:env: production

Scgi.yaml #2
---
:host: 127.0.0.1
:password: **********
:port: 1000
:logfile: log/scgi.log
:config: config/scgi.yaml
:control_url: druby://127.0.0.1:8999
:disable_signals: true
:env: production


Heres the error I get:

c:/ruby/lib/ruby/1.8/drb/drb.rb:853:in `initialize': Only one usage of
each sock
et address (protocol/network address/port) is normally permitted. -
bind(2) (Err
no::EADDRINUSE)
        from c:/ruby/lib/ruby/1.8/drb/drb.rb:853:in `open'
        from c:/ruby/lib/ruby/1.8/drb/drb.rb:853:in `open_server'
        from c:/ruby/lib/ruby/1.8/drb/drb.rb:747:in `open_server'
        from c:/ruby/lib/ruby/1.8/drb/drb.rb:745:in `each'
        from c:/ruby/lib/ruby/1.8/drb/drb.rb:745:in `open_server'
        from c:/ruby/lib/ruby/1.8/drb/drb.rb:1286:in `initialize'
        from c:/ruby/lib/ruby/1.8/drb/drb.rb:1549:in `new'
        from c:/ruby/lib/ruby/1.8/drb/drb.rb:1549:in `start_service'
        from
c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:402:in
`run'
        from
c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:61

        from c:/ruby/bin/scgi_service:18:in `load'
        from c:/ruby/bin/scgi_service:18

Thanks.

Eric

--
Eric G.
http://www.ericgoodwin.com
Onur T. (Guest)
on 2006-01-27 13:04
(Received via mailing list)
where can I find a tutorial running scgi with lighty on my local
windows machine?
Paul W. (Guest)
on 2006-01-27 13:13
(Received via mailing list)
Hi Eric,

I'm still running the 0.3 version of SCGI on our boxes but I think the
problem may well be that you have the same port configured for
admistration for both apps (:control_url).  Try changing the port
number (8999) and see if that helps.

Paul.
Shashy (Guest)
on 2006-01-27 14:52
Onur T. wrote:
> where can I find a tutorial running scgi with lighty on my local
> windows machine?

http://wiki.rubyonrails.org/rails/pages/HowToDeplo...

Created by Chris H. I think.
You can track lighttpd stuff at
http://forum.lighttpd.net/forum/1
if you are inclined.

Thanks, Shashy
Eric G. (Guest)
on 2006-01-27 19:27
(Received via mailing list)
Hi,
Thanks for the help Paul. Worked like a charm. I should have tried a
couple more things before posting.
Cheers,
Eric

Paul W. wrote:
>
>>
>>     )) )
>>     scgi.server = ( "dispatch.scgi" => ((
>> :port: 1001
>> :port: 1000
>> each sock
>>         from c:/ruby/lib/ruby/1.8/drb/drb.rb:1549:in `start_service'
>>
>>
>>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Eric G.
http://www.ericgoodwin.com
Tom J. (Guest)
on 2006-01-27 20:46
(Received via mailing list)
http://wiki.rubyonrails.org/rails/pages/HowToDeplo...
http://www.kevinworthington.com:8181/?p=104

-- Tom.

On 1/27/06, Onur T. <removed_email_address@domain.invalid> wrote:
> >
> >     scgi.server = ( "dispatch.scgi" => ((
> >     server.errorlog = var.test2+ "/log/lighttpd-errors.log"
> > Scgi.yaml #1
> > Scgi.yaml #2
> >
> >         from c:/ruby/lib/ruby/1.8/drb/drb.rb:745:in `each'
> >         from c:/ruby/bin/scgi_service:18:in `load'
> > _______________________________________________
> > Rails mailing list
> > removed_email_address@domain.invalid
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
"Nothing will ever be attempted, if all
 possible objections must first be
 overcome." - Samuel Johnson

"Luck is what happens when
 preparation meets opportunity." - Seneca
This topic is locked and can not be replied to.