ra88it ra88it wrote:
> Hello,
>
> I write this with some trepidation because it is probably a simple
> problem (I know next to nothing about sockets), but I've tried to find
> the answer on Google and no luck.
>
> When I do this:
>
> sock = TCPSocket.new('localhost', 8080)
>
> I get the the "connection refused" error: Errno::ECONNREFUSED
OK, that means no process is accepting connections on port 8080. What
are you trying to do?
>
> I have tried other ports, but anyway I don't think that's the problem.
> (No luck with the others, of course.)
Why are you randomly tring ports? What are you trying to do?
>
> When I do this:
>
> sock = TCPSocket.new('localhost', ftp)
Do you mean 'ftp'?
>
> it works fine.
OK, you have an FTP server running.
>
> Any idea why this doesn't work (or suggestions how I could troubleshoot)?
"Connection refused" is pretty straighforward; there isn't a process
accepting connections on the associated port. Or, you may be running tcp
wrappers or something else that is causing the connection to be refused.
In any event, it's not a Ruby issue.
|