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

ruby resolv library, bind to random port permission deny



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="0.0.0.0") # :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?



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