[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: Starting XMLRPC server on virtual host returns EADDRNOTAVAIL
From: "Michel Casabianca" <michel.casabianca () gmail ! com>
Date: 2006-12-05 13:27:54
Message-ID: b5370f750612050527s49c0f33mce5fbd218f0e80d5 () mail ! gmail ! com
[Download RAW message or body]
2006/12/5, Rene Tschirley <ruby@tschirley.com>:
>
> 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.
>
Have you tried instantiating server with:
XMLRPC::Server.new(port=$server['port'])
--
Michel Casabianca
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic