hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: FW: Problem with SSL login
Date Thu, 13 Jan 2005 21:41:43 GMT
Karen,

What kind of proxy server is it? Do you have access to the proxy logs?
Apparently the SSL session was successfully established but the server
must have failed to respond due to an internal error that occurred while
processing the HTTP request. Without access to the server logs it may be
very difficult to tell what exactly caused the server to fail.

Oleg


On Wed, 2005-01-12 at 16:46 -0600, Coulter Karen wrote:
> Just throwing this back out ...
>  
> The main problem seems to be an EOFException that is being ignored and causes the response
to fail.  However, I can't figure out where the problem is.
>  
> Thanks,
> Karen
>  
> 
> main, WRITE: SSLv3 Application Data, length = 71
> 
> 2005/01/12 14:52:26:526 EST [DEBUG] EntityEnclosingMethod - Request body sent
> 
> main, received EOFException: ignored
> 
> main, called closeInternal(false)
> 
> main, SEND SSLv3 ALERT: warning, description = close_notify
> 
> 
> ________________________________
> 
> From: Coulter Karen
> Sent: Wed 1/12/2005 3:12 PM
> To: Julius Davies
> Subject: RE: Problem with SSL login (may be a server-side proxy???)
> 
> 
> Hmmm...That doesn't work either.  I got the "http:wire" logging turned on.  I copied
what I think are the relevant pieces below.
>  
> Thanks,
> Karen
>  
> 
> init context
> 
> trigger seeding of SecureRandom
> 
> done seeding SecureRandom
> 
> setSoTimeout(0) called
> 
> setSoTimeout(0) called
> 
> 2005/01/12 14:52:25:292 EST [DEBUG] header - >> "POST /proxyplugin/login.loginproc
HTTP/1.1[\r][\n]"
> 
> 2005/01/12 14:52:25:292 EST [DEBUG] HttpMethodBase - Adding Host request header
> 
> 2005/01/12 14:52:25:339 EST [DEBUG] HttpMethodBase - Default charset used: ISO-8859-1
> 
> 2005/01/12 14:52:25:355 EST [DEBUG] header - >> "content-type: application/x-www-form-urlencoded[\r][\n]"
> 
> 2005/01/12 14:52:25:355 EST [DEBUG] header - >> "User-Agent: Jakarta Commons-HttpClient/3.0-beta1[\r][\n]"
> 
> 2005/01/12 14:52:25:355 EST [DEBUG] header - >> "Host: egwxea.bellatlantic.com[\r][\n]"
> 
> 2005/01/12 14:52:25:355 EST [DEBUG] header - >> "Content-Length: 55[\r][\n]"
> 
> %% No cached client session
> 
> *** ClientHello, TLSv1
> 
> ...
> 
> main, WRITE: SSLv3 Application Data, length = 212
> 
> 2005/01/12 14:52:26:511 EST [DEBUG] header - >> "[\r][\n]"
> 
> 2005/01/12 14:52:26:511 EST [DEBUG] HttpMethodBase - Default charset used: ISO-8859-1
> 
> Plaintext before ENCRYPTION: len = 71
> 
> 0000: 72 65 64 74 75 72 6C 3D 26 75 73 72 3D 43 41 4C redturl=&usr=CAL
> 
> 0010: 4E 31 30 37 36 26 70 61 73 73 77 6F 72 64 3D 54 N1076&password=T
> 
> 0020: 41 59 4C 33 34 38 35 26 53 55 42 4D 49 54 3D 43 AYL3485&SUBMIT=C
> 
> 0030: 6F 6E 74 69 6E 75 65 3A C5 60 8F 48 31 21 8C 38 ontinue:.`.H1!.8
> 
> 0040: 67 90 84 4A 74 88 0C g..Jt..
> 
> main, WRITE: SSLv3 Application Data, length = 71
> 
> 2005/01/12 14:52:26:526 EST [DEBUG] EntityEnclosingMethod - Request body sent
> 
> main, received EOFException: ignored
> 
> main, called closeInternal(false)
> 
> main, SEND SSLv3 ALERT: warning, description = close_notify
> 
> Plaintext before ENCRYPTION: len = 18
> 
> 0000: 01 00 D5 4E 59 DA 41 87 D7 0F 22 76 0E AC 9A 3C ...NY.A..."v...<
> 
> 0010: 07 DA ..
> 
> main, WRITE: SSLv3 Alert, length = 18
> 
> 2005/01/12 14:52:26:667 EST [DEBUG] HttpMethodDirector - Closing the connection.
> 
> main, called close()
> 
> main, called closeInternal(true)
> 
> main, called close()
> 
> main, called closeInternal(true)
> 
> main, called close()
> 
> main, called closeInternal(true)
> 
> 2005/01/12 14:52:26:667 EST [INFO] HttpMethodDirector - I/O exception caught when processing
request: The server egwxea.bellatlantic.com failed to respond
> 
> 2005/01/12 14:52:26:667 EST [DEBUG] HttpMethodDirector - The server egwxea.bellatlantic.com
failed to respond <org.apache.commons.httpclient.NoHttpResponseException: The server egwxea.bellatlantic.com
failed to respond>org.apache.commons.httpclient.NoHttpResponseException: The server egwxea.bellatlantic.com
failed to respond
> 
> at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1828)
> 
> at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1588)
> 
> at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:999)
> 
> at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:382)
> 
> at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168)
> 
> at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:393)
> 
> at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
> 
> at WisorScreenScrapeMain.doVerizon(WisorScreenScrapeMain.java:94)
> 
> at WisorScreenScrapeMain.main(WisorScreenScrapeMain.java:32)
> 
> 2005/01/12 14:52:26:683 EST [INFO] HttpMethodDirector - Retrying request
> 
> 2005/01/12 14:52:26:683 EST [DEBUG] HttpConnection - Open connection to egwxea.bellatlantic.com:443
> 
> 2005/01/12 14:52:26:714 EST [DEBUG] header - >> "POST /proxyplugin/login.loginproc
HTTP/1.1[\r][\n]"
> 
> 2005/01/12 14:52:26:714 EST [DEBUG] HttpMethodBase - Adding Host request header
> 
> 2005/01/12 14:52:26:714 EST [DEBUG] header - >> "content-type: application/x-www-form-urlencoded[\r][\n]"
> 
> 2005/01/12 14:52:26:714 EST [DEBUG] header - >> "User-Agent: Jakarta Commons-HttpClient/3.0-beta1[\r][\n]"
> 
> 2005/01/12 14:52:26:714 EST [DEBUG] header - >> "Content-Length: 55[\r][\n]"setSoTimeout(0)
called
> 
> setSoTimeout(0) called
> 
> 2005/01/12 14:52:26:714 EST [DEBUG] header - >> "Host: egwxea.bellatlantic.com[\r][\n]"
> 
> %% Client cached [Session-1, SSL_RSA_WITH_RC4_128_MD5]
> 
> ...
> 
>  
> ________________________________
> 
> From: Julius Davies [mailto:juliusdavies@cucbc.com]
> Sent: Wed 1/12/2005 2:43 PM
> To: Coulter Karen
> Subject: RE: Problem with SSL login (may be a server-side proxy???)
> 
> 
> 
> Hi, Karen,
> 
> Try setting the request body like this instead:
> 
> authpost.setRequestBody( "redturl=&usr=xxxxxxxx&password=xxxxxxxx&SUBMIT=Continue"
);
> 
> Also, have you turned on the "http.wire" logging?  It's important to
> make sure the headers and content you are sending out look something
> like this:
> 
> POST /proxyplugin/login.loginproc HTTP/1.1
> Host: egwxea.bellatlantic.com
> Keep-Alive: 300
> Connection: keep-alive
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 55
> redturl=&usr=xxxxxxxx&password=xxxxxxxx&SUBMIT=Continue
> 
> "Content-Length" is especially important.  If content-length was set to
> "100" in this example, the server would never reply, and would instead
> keep waiting for the rest of the content that it thinks is coming.
> 
> yours,
> 
> Julius
> 
> 
> On Wed, 2005-12-01 at 13:08 -0600, Coulter Karen wrote:
> > I added the header and I still get the same results.
> > 
> > Thanks,
> > Karen
> >
> >
> > ______________________________________________________________________
> > From: Julius Davies [mailto:juliusdavies@cucbc.com]
> > Sent: Wed 1/12/2005 2:06 PM
> > To: HttpClient User Discussion
> > Cc: Coulter Karen
> > Subject: Re: Problem with SSL login (may be a server-side proxy???)
> >
> >
> >
> > Hi, Karen,
> >
> > Try adding this header to your request before you execute it:
> >
> > Content-Type: application/x-www-form-urlencoded
> >
> > Like so:
> >
> > authpost.setRequestHeader( "content-type",
> > "application/x-www-form-urlencoded" );
> >
> > yours,
> >
> > Julius
> >
> > On Wed, 2005-12-01 at 12:28 -0600, Coulter Karen wrote:
> > > Thanks for the help in advance.  I'm new at this.  I'm trying to log
> > on to a secure site via HttpClient.  This works through a browser, but
> > not thru HttpClient.  Below is the stack trace and code I'm trying to
> > execute.  The writeRequest is getting through but the readResponse is
> > failing.  I have attached my trace log as well as 2 files showing the
> > Ethereal trace using HttpClient and using the browser.
> > >
> > > --Karen
> > >
> > > HttpClient client = new HttpClient();
> > >
> > > PostMethod authpost = null;
> > >
> > > try {
> > >
> > > authpost = new
> > PostMethod("https://egwxea.bellatlantic.com/proxyplugin/login.loginproc");
> > >
> > > NameValuePair userName = new NameValuePair("usr", "xxxxxxxx");
> > >
> > > NameValuePair pwd = new NameValuePair("password", "xxxxxxxx");
> > >
> > > NameValuePair redturl = new NameValuePair("redturl", "");
> > >
> > > NameValuePair submit = new NameValuePair("SUBMIT", "Continue");
> > >
> > > authpost.setRequestBody(new NameValuePair[]
> > {userName,pwd,redturl,submit});
> > >
> > > client.executeMethod(authpost);
> > >
> > > } finally {
> > >
> > > authpost.releaseConnection();
> > >
> > > }
> > >
> > > org.apache.commons.httpclient.NoHttpResponseException: The server
> > egwxea.bellatlantic.com failed to respond
> > >
> > > at
> > org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1828)
> > >
> > > at
> > org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1588)
> > >
> > > at
> > org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:999)
> > >
> > > at
> > org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:382)
> > >
> > > at
> > org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168)
> > >
> > > at
> > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:393)
> > >
> > > at
> > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
> > >
> > > at WisorScreenScrapeMain.doVerizon(WisorScreenScrapeMain.java:86)
> > >
> > > at WisorScreenScrapeMain.main(WisorScreenScrapeMain.java:32)
> > >
> > > Exception in thread "main"
> > >
> >
> >
> >
> 
> 


---------------------------------------------------------------------
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