hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pavan kumar" <pavanku...@dellmail.com>
Subject HTTP/1.1 502 Proxy Error ( SSL port specified is not allowed.)
Date Tue, 21 Jun 2005 15:42:55 GMT
Hi team,

Can some one draw serious attention on this and let me know where am I wrong?

The below code is throwing HTTP/1.1 502 Proxy Error ( SSL port specified is not allowed.)


************** CODE ************
System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true");
System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire.header", "debug");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient",
"debug");

 Protocol easyhttps = new Protocol("https", new EasySSLProtocolSocketFactory(), 443);
 Protocol.registerProtocol("https", easyhttps);

  HttpClient httpagent = new HttpClient();
  httpagent.setTimeout(40000);
  httpagent.getState().setProxyCredentials(new AuthScope("192.168.12.28", 80),
         new NTCredentials("inter", "test123", "192.168.12.28", "192.168.12.28"));
  httpagent.getHostConfiguration().setProxy("192.168.12.28", 80); //ProxyServerIP
  httpagent.getHostConfiguration().setHost("www.verisign.com", 80, easyhttps);

GetMethod httpget = new GetMethod("/");
try {
httpagent.executeMethod(httpget);
//System.out.println(httpget.getResponseBodyAsString());
System.out.println("\n\n\t" + httpget.getStatusLine().toString());
int StatusCode=httpget.getStatusCode();
System.out.println("\n\nStatus Code" + StatusCode);
} finally {
     httpget.releaseConnection();


*************** LOG ****************
2005/06/21 20:57:55:640 GMT+05:30 [DEBUG] HttpClient - -Java version: 1.5.0_02
2005/06/21 20:57:55:640 GMT+05:30 [DEBUG] HttpClient - -Java vendor: Sun Microsystems Inc.
2005/06/21 20:57:55:640 GMT+05:30 [DEBUG] HttpClient - -Java class path: C:\Java\jdk1.5.0_02\jre\lib
;C:\Java\jdk1.5.0_02\jre\lib\rt.jar;C:\Java\jdk1.5.0_02\jre\lib\servlet.jar;C:\Java\jdk1.5.0_02\jre\
lib\classes12.zip;D:\Program Files\WebSphere\AppServer\lib\namingclient.jar;D:\Pavan\JWorks;C:\Java\
jdk1.5.0_02\lib;D:\Pavan\JWorks\Commons-codec\commons-codec-1.3.jar;D:\Pavan\JWorks\Commons-Logging\
commons-logging.jar;D:\Pavan\JWorks\commons-httpclient-3.0-rc2.jar
2005/06/21 20:57:55:656 GMT+05:30 [DEBUG] HttpClient - -Operating system name: Windows 2000
2005/06/21 20:57:55:656 GMT+05:30 [DEBUG] HttpClient - -Operating system architecture: x86
2005/06/21 20:57:55:656 GMT+05:30 [DEBUG] HttpClient - -Operating system version: 5.0
2005/06/21 20:57:55:656 GMT+05:30 [DEBUG] HttpClient - -SUN 1.5: SUN (DSA key/parameter generation;
DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValida
tor; PKIX CertPathBuilder; LDAP, Collection CertStores)
2005/06/21 20:57:55:656 GMT+05:30 [DEBUG] HttpClient - -SunRsaSign 1.5: Sun RSA signature
provider
2005/06/21 20:57:55:656 GMT+05:30 [DEBUG] HttpClient - -SunJSSE 1.5: Sun JSSE provider(PKCS12,
SunX5
09 key/trust factories, SSLv3, TLSv1)
2005/06/21 20:57:55:656 GMT+05:30 [DEBUG] HttpClient - -SunJCE 1.5: SunJCE Provider (implements
RSA,
 DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
2005/06/21 20:57:55:656 GMT+05:30 [DEBUG] HttpClient - -SunJGSS 1.0: Sun (Kerberos v5)
2005/06/21 20:57:55:656 GMT+05:30 [DEBUG] HttpClient - -SunSASL 1.5: Sun SASL provider(implements
cl
ient mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for:
DIGEST-MD
5, GSSAPI, CRAM-MD5)
2005/06/21 20:57:55:656 GMT+05:30 [DEBUG] DefaultHttpParams - -Set parameter http.useragent
= Jakart
a Commons-HttpClient/3.0-rc2
2005/06/21 20:57:55:671 GMT+05:30 [DEBUG] DefaultHttpParams - -Set parameter http.protocol.version
=
 HTTP/1.1
2005/06/21 20:57:55:671 GMT+05:30 [DEBUG] DefaultHttpParams - -Set parameter http.connection-manager
.class = class org.apache.commons.httpclient.SimpleHttpConnectionManager
2005/06/21 20:57:55:671 GMT+05:30 [DEBUG] DefaultHttpParams - -Set parameter http.protocol.cookie-po
licy = rfc2109
2005/06/21 20:57:55:671 GMT+05:30 [DEBUG] DefaultHttpParams - -Set parameter http.protocol.element-c
harset = US-ASCII
2005/06/21 20:57:55:671 GMT+05:30 [DEBUG] DefaultHttpParams - -Set parameter http.protocol.content-c
harset = ISO-8859-1
2005/06/21 20:57:55:671 GMT+05:30 [DEBUG] DefaultHttpParams - -Set parameter http.method.retry-handl
er = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@110d81b
2005/06/21 20:57:55:671 GMT+05:30 [DEBUG] DefaultHttpParams - -Set parameter http.dateparser.pattern
s = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy,
EEE, dd-M
MM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy
HH:mm:ss
 z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE
dd MMM yy
HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss
z]
2005/06/21 20:57:55:687 GMT+05:30 [DEBUG] DefaultHttpParams - -Set parameter http.socket.timeout
= 4
0000
2005/06/21 20:57:55:796 GMT+05:30 [DEBUG] HttpConnection - -Open connection to 192.168.12.28:80
2005/06/21 20:57:58:328 GMT+05:30 [DEBUG] HttpMethodDirector - -Closing the connection.
2005/06/21 20:57:58:328 GMT+05:30 [INFO] HttpMethodDirector - -I/O exception caught when processing
request: Software caused connection abort: connect
2005/06/21 20:57:58:343 GMT+05:30 [DEBUG] HttpMethodDirector - -Software caused connection
abort: co
nnect <java.net.SocketException: Software caused connection abort: connect>java.net.SocketException:
 Software caused connection abort: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
        at java.net.Socket.connect(Socket.java:507)
        at java.net.Socket.connect(Socket.java:457)
        at java.net.Socket.<init>(Socket.java:365)
        at java.net.Socket.<init>(Socket.java:238)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultP
rotocolSocketFactory.java:79)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultP
rotocolSocketFactory.java:121)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:704)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java
:382)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:16
8)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:393)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
        at Test3.main(Test3.java:33)

2005/06/21 20:57:58:406 GMT+05:30 [INFO] HttpMethodDirector - -Retrying request
2005/06/21 20:57:58:421 GMT+05:30 [DEBUG] HttpConnection - -Open connection to 192.168.12.28:80
2005/06/21 20:57:59:937 GMT+05:30 [DEBUG] header - ->> "CONNECT www.verisign.com:80
HTTP/1.1"
2005/06/21 20:57:59:937 GMT+05:30 [DEBUG] HttpMethodBase - -Adding Host request header
2005/06/21 20:57:59:937 GMT+05:30 [DEBUG] header - ->> "User-Agent: Jakarta Commons-HttpClient/3.0-r
c2[\r][\n]"
2005/06/21 20:57:59:937 GMT+05:30 [DEBUG] header - ->> "Host: www.verisign.com:80[\r][\n]"
2005/06/21 20:57:59:937 GMT+05:30 [DEBUG] header - ->> "Proxy-Connection: Keep-Alive[\r][\n]"
2005/06/21 20:57:59:937 GMT+05:30 [DEBUG] header - ->> "[\r][\n]"
2005/06/21 20:57:59:953 GMT+05:30 [DEBUG] header - -<< "HTTP/1.1 502 Proxy Error ( SSL
port specifie
d is not allowed.  )[\r][\n]"
2005/06/21 20:57:59:953 GMT+05:30 [DEBUG] header - -<< "Via: 1.1 MSTEST[\r][\n]"
2005/06/21 20:57:59:953 GMT+05:30 [DEBUG] header - -<< "Pragma: no-cache[\r][\n]"
2005/06/21 20:57:59:953 GMT+05:30 [DEBUG] header - -<< "Cache-Control: no-cache[\r][\n]"
2005/06/21 20:57:59:953 GMT+05:30 [DEBUG] header - -<< "Content-Type: text/html[\r][\n]"
2005/06/21 20:57:59:968 GMT+05:30 [INFO] HttpMethodBase - -Response content length is not
known
2005/06/21 20:57:59:968 GMT+05:30 [DEBUG] HttpMethodBase - -Force-close connection: true
2005/06/21 20:57:59:968 GMT+05:30 [DEBUG] ConnectMethod - -CONNECT status code 502
2005/06/21 20:57:59:968 GMT+05:30 [DEBUG] HttpMethodDirector - -CONNECT failed, fake the response
fo
r the original method


        HTTP/1.1 502 Proxy Error ( SSL port specified is not allowed.  )

Status Code502
2005/06/21 20:57:59:968 GMT+05:30 [DEBUG] HttpMethodBase - -Should force-close connection.
2005/06/21 20:57:59:968 GMT+05:30 [DEBUG] HttpConnection - -Releasing connection back to connection
manager.




-- 
_______________________________________________
Get your free email from http://www.dellmail.com




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


Mime
View raw message