• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exception Connection Refused

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm currently doing some server-related exercises, but can't make my localhost accept connections.

I'm using a MacBook Pro running Snow Leopard, the apache is turned on, firewall was off (I did try to turn it on and tell it to enable incoming connections, but didn't work) and I have Growl installed (tried disabling it already).

Here's the code I'm using:

And here's the exception stack

Searching around I found this command line to test the connection, but it gives me a connection refused too.
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So do you actually have anything listening for port 5000?
 
Pedro Fonseca
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess I don't...?

Gotta be honest, I'm yet to properly wrap my head around everything regarding connections, I understand the very basic bare bones (if that much).

EDIT: How can I add a listener to that code so it allows me to test it?

Something like printing the sent message on the terminal window, but anything will do.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic