Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #6524

Re: Ruby Socket Programming: No connection could be made error

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.ruby
Subject Re: Ruby Socket Programming: No connection could be made error
Date 2012-04-28 12:53 +0200
Message-ID <a020hfF4scU1@mid.individual.net> (permalink)
References <20233599.660.1335609938128.JavaMail.geo-discussion-forums@vbq19>

Show all headers | View raw


On 28.04.2012 12:45, Merhawi Fissehaye wrote:
> I am a beginner and I wanted to see how network programs are written in Ruby and I tried a sample Ruby code I found on the internet. There are two programs server.rb running in the background and client.rb trying to connect to my server program at the port number specific to the server program.
> I found the following error when running client.rb :
>
> client.rb:6:in 'initialize' : No connection could be made because the target machine actively refused it. - connect(2) (Errno::ECONNREFUSED)
>              from client.rb:6:in 'open'
>              from client.rb:6:in '<main>'

Could be any number of reasons from that you have misconfigured ports or 
the server is listening on 127.0.0.1 only which cannot be connected from 
a different machine or firewall blocking access...

Can you give more details, show the code?

> I am running the program from DOS

Are you serious about that?

Kind regards

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Ruby Socket Programming: No connection could be made error Merhawi Fissehaye <merhawifissehaye@gmail.com> - 2012-04-28 03:45 -0700
  Re: Ruby Socket Programming: No connection could be made error Robert Klemme <shortcutter@googlemail.com> - 2012-04-28 12:53 +0200
    Re: Ruby Socket Programming: No connection could be made error Merhawi Fissehaye <merhawifissehaye@gmail.com> - 2012-04-28 04:07 -0700
      Re: Ruby Socket Programming: No connection could be made error Robert Klemme <shortcutter@googlemail.com> - 2012-04-28 15:35 +0200
        Re: Ruby Socket Programming: No connection could be made error Merhawi Fissehaye <merhawifissehaye@gmail.com> - 2012-04-28 06:41 -0700
          Re: Ruby Socket Programming: No connection could be made error Robert Klemme <shortcutter@googlemail.com> - 2012-04-28 20:30 +0200
            Re: Ruby Socket Programming: No connection could be made error Simon Krahnke <overlord@gmx.li> - 2012-04-28 21:59 +0200
            Re: Ruby Socket Programming: No connection could be made error Merhawi Fissehaye <merhawifissehaye@gmail.com> - 2012-05-02 07:31 -0700
              Re: Ruby Socket Programming: No connection could be made error Simon Krahnke <overlord@gmx.li> - 2012-05-03 17:19 +0200
  Re: Ruby Socket Programming: No connection could be made error Merhawi Fissehaye <merhawifissehaye@gmail.com> - 2012-04-28 03:58 -0700

csiph-web