Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.net.ConnectException: Connection refused: connect  RSS feed

 
Punya Pratap Singh
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
static Socket clientSocket = null;

int port_number = 8888;
String host="localhost";

clientSocket = new Socket(host, port_number);


Please help ?

 
Rob Spoor
Sheriff
Posts: 20895
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What service is listening to port 8888 on your local machine? My guess would be none at all, or your firewall is blocking access to it.
 
Deepak Chopra
Ranch Hand
Posts: 433
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A simple way to test it would be - telnet localhost 8888
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!