You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Sez <se...@yahoo.es> on 2004/06/18 07:48:53 UTC

httpclient --> java.net.ConnectException: Connection Refused

Hi people,

I have this code
////////////////////////////////////////////////////	
		Protocol easyhttps = new Protocol("https", new
EasySSLProtocolSocketFactory(), 443);
		 
		 HttpClient client = new HttpClient();
		 client.getHostConfiguration().setHost("www.verisign.net",
443, easyhttps);
		 // use relative url only
		 GetMethod httpget = new GetMethod("/");
		try{
			 client.executeMethod(httpget);
		}catch (java.io.IOException e)
		{
			System.out.println(e);
			e.printStackTrace();
		}
	    finally {
	        // release any connection resources used by the method
	        httpget.releaseConnection();
	    }
////////////////////////////////////////////////////

This code fails in client.executeMethod with java.net.ConnectException:
Connection refused.

>From my server i can connect to verisign with my netscape. So, it isn't
problem with firewall.
I inspect the traffic with ethereal and i didn't see a connection to
verisign site...

I am with deseperated...
Some ideas?


Thanks
SERGI


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org