[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Starting XMLRPC server on virtual host returns EADDRNOTAVAIL
From:       Rene Tschirley <ruby () tschirley ! com>
Date:       2006-12-05 11:50:44
Message-ID: 45755D11.3060103 () tschirley ! com
[Download RAW message or body]

Dear ruby experts,


I tried to start a Ruby XMLRPC server on a linux-based virtual host
(using OpenVZ).

Here is the code:

$server = {
  "host" => "my.host.name",
  "port" => 73726
}

XMLRPC::Server.new(port=$server['port'],host=$server['host'])

While the code works on a non-virtual host, bind returns EADDRNOTAVAIL
when the server is started on the virtual host:

[2006-12-05 11:35:24] INFO  WEBrick 1.3.1
[2006-12-05 11:35:24] INFO  ruby 1.8.5 (2006-08-25) [i486-linux]
[2006-12-05 11:35:24] WARN  TCPServer Error: Cannot assign requested
address - bind(2)
/usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize': Cannot assign
requested address - bind(2) (Errno::EADDRNOTAVAIL)
        from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'
        from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'
        from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'
        from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'
        from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
        from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
        from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
        from /usr/lib/ruby/1.8/xmlrpc/server.rb:635:in `new'
        from /usr/lib/ruby/1.8/xmlrpc/server.rb:635:in `initialize'
        from /net/usr/lib/libversand.rb:53:in `new'

I tried to define the host by giving the numeric address. I checked that
the host can resolve the hostname. The server can ping the server
address. The above code is started as superuser. Linux kernel version is
2.6.16, OpenVZ patch is version 026test015.

Any suggestions?


Thanks in advance,
Rene



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic