Socket connection refused exception

I've encountered a problem when doing one of simplest networking programs. The one there:

http://java.sun.com/docs/books/tutorial/networking/sockets/readingWriting.html

I get

java.net.ConnectException: Connection refused: connect

no matter which port I am trying to access and if I have my firewall up or down. I am not having a proxy.

One more thing I do not use "taranis" as the host but "localhost" or "127.0.0.1".

[456 byte] By [hellbindera] at [2007-11-26 21:35:47]
# 1
do you have an echo server running locally?
georgemca at 2007-7-10 3:16:34 > top of Java-index,Java Essentials,New To Java...
# 2
You probably don't have an echo server running.Edit: Man am I slow. That's what I get for reading my email after hitting reply.
masijade.a at 2007-7-10 3:16:34 > top of Java-index,Java Essentials,New To Java...
# 3
Thanks I thought echo services are part of a OS. Now I get response :echo = nullbut I think I'll handle that myselfThanks again
hellbindera at 2007-7-10 3:16:34 > top of Java-index,Java Essentials,New To Java...
# 4

> Thanks I thought echo services are part of a OS. Now

> I get response :

> echo = null

> but I think I'll handle that myself

> Thanks again

depends on the OS. lots of *nix's do, but not all. anyways, you're connected so that's a start. I expect you'll be ok from here, but obviously feel free to ask for help again

georgemca at 2007-7-10 3:16:34 > top of Java-index,Java Essentials,New To Java...