[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: ruby resolv library, bind to random port permission deny

On Tue Mar 04, 2014 at 09:50:12AM -0800, Bruce Lysik wrote:


Bruce, thanks for reporting this issue. We know about this as this was
recently broken in rubygems, where gem is trying to bind on
which will fail inside the gear.

We thought the workaround would be simply replacing the with
OPENSHIFT_RUBY_IP, however it leads to other problem with DNS
resolving then.

  -- Michal

> Hi,
> Trying to setup a Ruby chat bot named ‘Lita’ on an Origin instance.  Loading the jabber adapter, the code errors out when attempting to resolve the server:
> D, [2014-03-04T09:17:50.770525 #11252] DEBUG -- : RESOLVING:
>     _xmpp-client._tcp.XXXX.XXXX.com (SRV)
> /var/lib/openshift/531517a59e7f3b3f1b00000f/app-root/data/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/resolv.rb:647:in `bind': Permission denied - bind(2) (Errno::EACCES)
> 	from /var/lib/openshift/531517a59e7f3b3f1b00000f/app-root/data/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/resolv.rb:647:in `bind_random_port’
> The code is here:
> def self.bind_random_port(udpsock, bind_host="") # :nodoc:
>       begin
>         port = rangerand(1024..65535)
>         udpsock.bind(bind_host, port)
>       rescue Errno::EADDRINUSE
>         retry
>       end
>     end
> Is there any way I can work around this?
> _______________________________________________
> users mailing list
> users lists openshift redhat com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]