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.
Ac1da5d66d51a1c3b843221032247b30?d=identicon&s=25 Eric Goodwin (Guest)
on 2006-01-27 02: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 Goodwin
http://www.ericgoodwin.com
043efdc2a79afbfec84696f50fd42163?d=identicon&s=25 Onur Turgay (Guest)
on 2006-01-27 12:04
(Received via mailing list)
where can I find a tutorial running scgi with lighty on my local
windows machine?
4520e34a40d28b21408e61e212e2a0e3?d=identicon&s=25 Paul Wright (Guest)
on 2006-01-27 12: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.
B1adb126515047b0b3a8cbe896787a17?d=identicon&s=25 Shashy (Guest)
on 2006-01-27 13:52
Onur Turgay 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 Hulbert I think.
You can track lighttpd stuff at
http://forum.lighttpd.net/forum/1
if you are inclined.

Thanks, Shashy
Ac1da5d66d51a1c3b843221032247b30?d=identicon&s=25 Eric Goodwin (Guest)
on 2006-01-27 18: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 Wright 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
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Eric Goodwin
http://www.ericgoodwin.com
96fa8d7613c85247dc0ef7826aa04435?d=identicon&s=25 Tom Jordan (Guest)
on 2006-01-27 19: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 Turgay <onurturgay@gmail.com> 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
> > Rails@lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> 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.