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