tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudeep Pradhan <pradh...@vmware.com>
Subject RE: Comet over HTTPS: END event recieved immeidately for the first few times
Date Mon, 11 Jul 2011 17:05:54 GMT
Hi Filip,

I have tried the app with tomcat 6.0.32 and 7.0.16, and the result is the same. I am not able
to get it working with https. Http works just fine.

The use case I am trying to address is that, I want to send notifications/events from a webapp
to another webapp asynchronously. The 2 webapps communicate using REST call for other things.
I want to have the same model for notifications. The client webapp will send a Https GET request
and the server webapp will push the notifications asynchronously as a response. The client
can be anything not just a webapp, I will be using curl as the client for testing.

Please let me know if you want to know more. 

Thanks,
Sudeep

-----Original Message-----
From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com] 
Sent: Sunday, July 10, 2011 8:12 PM
To: Tomcat Users List
Subject: Re: Comet over HTTPS: END event recieved immeidately for the first few times

try the latest version of Tomcat 6, if that doesn't work, provide a test case so we can take
a look at it

On 7/8/2011 4:07 PM, Sudeep Pradhan wrote:
> Any insights on this?
>
> -----Original Message-----
> From: Sudeep Pradhan [mailto:pradhans@vmware.com]
> Sent: Wednesday, June 29, 2011 4:54 PM
> To: users@tomcat.apache.org
> Subject: Comet over HTTPS: END event recieved immeidately for the first few times
>
> Hello,
>
> I am  using Tomcat 6.0.20 on Ubuntu 10.04 and have written a simple TomcatWeatherServlet
as presented in http://www.ibm.com/developerworks/web/library/wa-cometjava/ I modified the
servlet to stream weather feed to multiple curl clients. I am using curl 7.21.6 as my client.
>
> When I run curl -i -k -v -trace https://<IP_Addr>:8443/Weather<https://%3cIP_Addr%3e:8443/Weather>
 from the command-line I get the following response for the first few times:
>
> <code>
> $ curl -i -k -v -trace https://<IP_Addr>:8443/Weather
> * About to connect() to<IP_Addr>  port 8443 (#0)
> *   Trying<IP_Addr>... connected
> * Connected to<IP_Addr>  (<IP_Addr>) port 8443 (#0)
> * successfully set certificate verify locations:
> *   CAfile: none
>    CApath: /etc/ssl/certs
> * SSLv3, TLS handshake, Client hello (1):
> * SSLv3, TLS handshake, Server hello (2):
> * SSLv3, TLS handshake, CERT (11):
> * SSLv3, TLS handshake, Server key exchange (12):
> * SSLv3, TLS handshake, Server finished (14):
> * SSLv3, TLS handshake, Client key exchange (16):
> * SSLv3, TLS change cipher, Client hello (1):
> * SSLv3, TLS handshake, Finished (20):
> * SSLv3, TLS change cipher, Client hello (1):
> * SSLv3, TLS handshake, Finished (20):
> * SSL connection using DHE-RSA-AES256-SHA
> * Server certificate:
> *              subject: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> *              start date: 2009-02-23 23:07:18 GMT
> *              expire date: 2019-02-21 23:07:18 GMT
> *              common name: XXXXXXXXXX (does not match '<IP_Addr>')
> *              issuer: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> *              SSL certificate verify result: self signed certificate (18), continuing
anyway.
>> GET /Weather HTTP/1.1
>> User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3
libidn/1.15
>> Host:<IP_Addr>:8443
>> Accept: */*
>>
> <  HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> <  Server: Apache-Coyote/1.1
> Server: Apache-Coyote/1.1
> <  Content-Length: 0
> Content-Length: 0
> <  Date: Wed, 29 Jun 2011 23:40:17 GMT
> Date: Wed, 29 Jun 2011 23:40:17 GMT
>
> <
> * Connection #0 to host<IP_Addr>  left intact
> * Closing connection #0
> * SSLv3, TLS alert, Client hello (1):
> </code>
>
> Observe that Content-Length is 0 in the response. Also when I do get the expected response
which is,
>
> <code>
>> GET /Weather HTTP/1.1
>> User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3
libidn/1.15
>> Host:<IP_Addr>:8443
>> Accept: */*
>>
> <  HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> <  Server: Apache-Coyote/1.1
> Server: Apache-Coyote/1.1
> <  Transfer-Encoding: chunked
> Transfer-Encoding: chunked
> <  Date: Wed, 29 Jun 2011 23:46:18 GMT
> Date: Wed, 29 Jun 2011 23:46:18 GMT
>
> <
> <h2>Conditions for San Jose, CA at 3:52 pm PDT</h2>
> <img src="http://l.yimg.com/a/i/us/we/52/30.gif"/><br />
> <b>Current Conditions:</b><br />
> Partly Cloudy, 68 F<BR />
> <BR /><b>Forecast:</b><BR />
> Wed - Mostly Clear. High: 70 Low: 55<br />
> Thu - Partly Cloudy. High: 77 Low: 57<br />
> <br />
> <a href="http://us.rd.yahoo.com/dailynews/rss/weather/San_Jose__CA/*http://weather.yahoo.com/forecast/USCA0993_f.html">Full
Forecast at Yahoo! Weather</a><BR/><BR/>
> (provided by<a href="http://www.weather.com">The Weather Channel</a>)<br/>
> <br>
>
> </code>
> I get Transfer-Encoding as chunked and no Content-Length.
>
> On Server logs I get for the error are:
> 16:40:16.916  INFO http-8443-exec-3 TomcatWeatherServlet:41 - Begin for session: BDD6B1808161F1DA99D5D3207F1A719B
> 16:40:16.959  INFO http-8443-exec-4 TomcatWeatherServlet:48 - End for session: BDD6B1808161F1DA99D5D3207F1A719B
> 16:40:17.033  INFO http-8443-exec-4 TomcatWeatherServlet:48 - End for session: BDD6B1808161F1DA99D5D3207F1A719B
>
> This was working when I was on HTTP. I have tried to debug this for a lot of time w/o
success. Also I get two END events instead of one as seen in the Logs.  Any insights will
be helpful.
>
> Thanks,
> Sudeep
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message