Actually proxyUrl is the hostname (i.e. 'cache1.groupinfra.com', see log 
below...). I know; it's a pretty confusing name.

 

I have enabled more detailed debugging, but don't get any smarter reading the 
information. I can ping the proxy server without problem.

 

Other ideas?

 

Thanks,

Gert.

 

 

 

 

 

[Apr 03 12:04:55] INFO  (Logger.java:37) - Local proxy enabled.  Proxy URL 
cache1.groupinfra.com, proxyPort 80, proxyUser groupinfra/villemosg, 
proxyUnserPassword @@@@

[Apr 03 12:04:55] DEBUG (HttpState.java:488) - enter 
HttpState.setProxyCredentials(AuthScope, Credentials)

[Apr 03 12:04:55] DEBUG (HttpState.java:359) - enter 
HttpState.setCredentials(AuthScope, Credentials)

[Apr 03 12:04:55] INFO  (Logger.java:37) - Submitting Login form...

[Apr 03 12:04:55] INFO  (Logger.java:37) - URI 
https://www.elog.esa.int:443/loginsession.php?loggingIn=true

[Apr 03 12:04:55] INFO  (Logger.java:37) - Host www.elog.esa.int

[Apr 03 12:04:55] INFO  (Logger.java:37) - Port 443

[Apr 03 12:04:55] DEBUG (PostMethod.java:403) - enter 
PostMethod.setRequestBody(NameValuePair[])

[Apr 03 12:04:55] DEBUG (PostMethod.java:152) - enter 
PostMethod.clearRequestBody()

[Apr 03 12:04:56] DEBUG (EntityEnclosingMethod.java:150) - enter 
EntityEnclosingMethod.clearRequestBody()

[Apr 03 12:04:56] DEBUG (PostMethod.java:304) - enter 
PostMethod.addParameters(NameValuePair[])

[Apr 03 12:04:56] DEBUG (EntityEnclosingMethod.java:150) - enter 
EntityEnclosingMethod.clearRequestBody()

[Apr 03 12:04:56] DEBUG (HttpClient.java:344) - enter 
HttpClient.executeMethod(HostConfiguration,HttpMethod)

[Apr 03 12:04:56] DEBUG (HttpClient.java:374) - enter 
HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)

[Apr 03 12:04:56] DEBUG (HttpMethodDirector.java:379) - Attempt number 1 to 
process request

[Apr 03 12:04:56] DEBUG (HttpConnection.java:685) - enter HttpConnection.open()

[Apr 03 12:04:56] DEBUG (HttpConnection.java:692) - Open connection to 
www.elog.esa.int:443

[Apr 03 12:05:17] DEBUG (HttpConnection.java:1215) - enter 
HttpConnection.closeSockedAndStreams()

[Apr 03 12:05:17] DEBUG (HttpMethodDirector.java:404) - Closing the connection.

[Apr 03 12:05:17] DEBUG (HttpConnection.java:1148) - enter 
HttpConnection.close()

[Apr 03 12:05:17] DEBUG (HttpConnection.java:1215) - enter 
HttpConnection.closeSockedAndStreams()

[Apr 03 12:05:17] INFO  (HttpMethodDirector.java:439) - I/O exception 
(java.net.ConnectException) caught when processing request: Connection timed 
out: connect

[Apr 03 12:05:17] DEBUG (HttpMethodDirector.java:443) - Connection timed out: 
connect

java.net.ConnectException: Connection timed out: 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:366)

      at java.net.Socket.connect(Socket.java:520)

      at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:545)

      at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:389)

      at 
com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:121)

      at 
org.esa.eeis.elogwebcrawler.EasySSLProtocolSocketFactory.createSocket(EasySSLProtocolSocketFactory.java:155)

      at 
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)

      at 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)

      at 
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)

      at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)

      at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)

      at 
org.esa.eeis.elogwebcrawler.ElogCrawlerContext.process(ElogCrawlerContext.java:203)

      at 
org.esa.eeis.elogwebcrawler.ElogCrawlerContext.start(ElogCrawlerContext.java:152)

      at 
org.esa.eeis.elogwebcrawler.ElogCrawlerContext.main(ElogCrawlerContext.java:144)

 

 

 

 

 

 

 

 

 

-----Original Message-----
From: Oleg Kalnichevski [mailto:[email protected]] 
Sent: Donnerstag, 2. April 2009 20:17
To: HttpClient User Discussion
Subject: Re: ConnectException: HttpClient proxy settings

 

Villemos, Gert wrote:

> I have problems accessing a site through a proxy.

> 

>  

> 

> I'm connecting to a site demanding credentials (https on default port

> 443) through a local proxy (port 80) with authentication. I have read

> the documentation and it looked simple, I just cant get it to work. My

> source code is shown below;

> 

>  

> 

>  

> 

> HttpClient client = new HttpCLient();

> 

>  

> 

> if (proxyEnabled == true) {

> 

> Logger.info("Local proxy enabled.  Proxy URL " + proxyUrl + ", proxyPort

> " + proxyPort + ", proxyUser " + proxyUserName + ", proxyUserPassword "

> + proxyUserPassword);

> 

> client.getHostConfiguration().setProxy(proxyUrl, proxyPort);

> 

> client.getState().setProxyCredentials(

> 

>             new AuthScope(proxyUrl, proxyPort, AuthScope.ANY_REALM), 

> 

>             new UsernamePasswordCredentials(proxyUserName,

> proxyUserPassword)

> 

>       );    

> 

> }

> 

>  

> 

> client.getState().setCredentials(   

> 

>       new AuthScope(elogUrl, elogPort, AuthScope.ANY_REALM),

> 

>       new UsernamePasswordCredentials(userName, userPassword)

> 

> );

> 

>  

> 

>  

> 

>  

> 

> When I try to access from a place without proxy (... home in my comfy

> chair) this succeeds, i.e. the credentials works. When I try this

> through my companies proxy, I get the exception;

> 

>  

> 

>  

> 

>  

> 

> [Apr 02 17:46:17] INFO  (HttpMethodDirector.java:439) - I/O exception

> (java.net.ConnectException) caught when processing request: Connection

> timed out: connect

> 

> [Apr 02 17:46:17] INFO  (HttpMethodDirector.java:445) - Retrying request

> 

> [Apr 02 17:46:38] INFO  (HttpMethodDirector.java:439) - I/O exception

> (java.net.ConnectException) caught when processing request: Connection

> timed out: connect

> 

> [Apr 02 17:46:38] INFO  (HttpMethodDirector.java:445) - Retrying request

> 

> [Apr 02 17:46:59] INFO  (HttpMethodDirector.java:439) - I/O exception

> (java.net.ConnectException) caught when processing request: Connection

> timed out: connect

> 

> [Apr 02 17:46:59] INFO  (HttpMethodDirector.java:445) - Retrying request

> 

> java.net.ConnectException: Connection timed out: 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:366)

> 

>       at java.net.Socket.connect(Socket.java:520)

> 

>       at

> com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:54

> 5)

> 

>       at

> com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:389

> )

> 

>       at

> com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocket

> FactoryImpl.java:121)

> 

>       at

> org.esa.eeis.elogwebcrawler.EasySSLProtocolSocketFactory.createSocket(Ea

> sySSLProtocolSocketFactory.java:155)

> 

>       at

> org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:70

> 7)

> 

>       at

> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe

> thodDirector.java:387)

> 

>       at

> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho

> dDirector.java:171)

> 

>       at

> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3

> 97)

> 

>       at

> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3

> 46)

> 

>  

> 

>  

> 

>  

> 

> I have tried using URL as well as IP of the proxy, but get the same

> fault. I'm sure I use the correct use and password.

> 

>  

> 

> What am I doing wrong?

> 

>  

 

AuthScope are all wrong. Use hostnames instead of URLs

 

Oleg

 

 

> 

> Thanks,

> 

> Gert.

> 

> 

> 

> Please help Logica to respect the environment by not printing this email  /  
> Merci d'aider Logica à préserver l'environnement en évitant d'imprimer ce 
> mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica 
> dabei die Umwelt zu schuetzen  /  Por favor ajude a Logica a respeitar o 
> ambiente não imprimindo este correio electrónico.

> 

> 

> 

> This e-mail and any attachment is for authorised use by the intended 
> recipient(s) only. It may contain proprietary material, confidential 
> information and/or be subject to legal privilege. It should not be copied, 
> disclosed to, retained or used by, any other party. If you are not an 
> intended recipient then please promptly delete this e-mail and any attachment 
> and all copies and inform the sender. Thank you.

> 

> 

 

 

---------------------------------------------------------------------

To unsubscribe, e-mail: [email protected]

For additional commands, e-mail: [email protected]

 

 



Please help Logica to respect the environment by not printing this email  /  
Merci d'aider Logica ? pr?server l'environnement en ?vitant d'imprimer ce mail 
/  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei 
die Umwelt zu schuetzen  /  Por favor ajude a Logica a respeitar o ambiente não 
imprimindo este correio electrónico.



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

Reply via email to