From: Robert Klemme Date: 2007-11-17T16:45:11+09:00 Subject: Re: Questions about TCPSocket 2007/11/16, Axel Etzold : > > -------- Original-Nachricht -------- > > Datum: Sat, 17 Nov 2007 00:05:11 +0900 > > Von: "Robert Klemme" > > An: ruby-talk@ruby-lang.org > > Betreff: Re: Questions about TCPSocket > > > 2007/11/16, Axel Etzold : > > > Dear all, > > > > > > I am trying to use Ruby bindings of a software that does > > > computations by exchanging messages between competent code. > > > The details are explained here: > > > > > > > > http://www.math.kobe-u.ac.jp/OpenXM/1.2.1/html/OpenXM-en/OpenXM/node5.html > > > > > > This software can be used from the command line and there, it works as > > > expected. > > > Now, I'd like to use it from ruby. There are ruby binding scripts. > > > However, I encounter some problems when initialising > > > TCPSocket - I can't get any connection. Both ruby and OpenXM are > > > installed on the same computer. > > > What could be the problem ? > > > > Posting an exception with stack trace often goes a long way to help > > people help you. So I suggest you give that detail. > > > > Generic answer would be: configuration issue, firewall, network issues... > > > > Cheers > > > > robert > > > > -- > > use.inject do |as, often| as.you_can - without end > > > Dear Robert, > > thanks for your reply. > I now get > > dhcppc0:/usr/local/openxm-head/OpenXM/src/ruby # ruby ox.rb > Connecting to localhost, > Trying to connect to controlport 1200, > Exception: Errno::ECONNREFUSED: Connection refused - connect(2) > ox.rb:172:in `initialize' > ox.rb:172:in `new' > ox.rb:172:in `initialize' > ox.rb:315:in `new' > ox.rb:315 > > I tried to find some help in previous discussions, and was able to > identify some open ports, through which I can communicate. > Is there a way to change what ports are blocked from ruby, as root, on Linux ? Either there is nothing listening on that port or the firewall of your or the target machine blocks the connection. If you are on Linux you can most likely check with iptables or ip6tables. Chances are that there is also a GUI tool for that. Cheers robert -- use.inject do |as, often| as.you_can - without end