You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sudeep Pradhan <pr...@vmware.com> on 2011/07/09 00:07:41 UTC

RE: Comet over HTTPS: END event recieved immeidately for the first few times

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


Re: Comet over HTTPS: END event recieved immeidately for the first few times

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
why dont you
1. package up a sample application and configuration
2. open a bugzilla issue
3. https://issues.apache.org/bugzilla/enter_bug.cgi

that way we can take a look ait it.

Filip


On 7/13/2011 2:54 PM, Sudeep Pradhan wrote:
> Hi Filip,
>
> Thanks for the reply.
>
> I don't think that I am using BIO connector for SSL. I don't see any such option in the server.xml. The connector is as follows:
>
> <Connector
> 	protocol="org.apache.coyote.http11.Http11NioProtocol"
> 	port="8443" minSpareThreads="5" maxSpareThreads="75"
> 	enableLookups="true" disableUploadTimeout="true"
>        acceptCount="100"  maxThreads="200"
> 	scheme="https" secure="true" SSLEnabled="true"
> 	keystoreFile="/path/to/file/keystore"
> 	keystorePass="**********"
> 	clientAuth="false" sslProtocol="TLS"/>
>
> Also, It does *work sometimes*. I get a proper streaming output of the weather feeds when it works.
>
> Hope this helps you understand the scenario better.
>
> Thanks,
> Sudeep
>
>
>
> -----Original Message-----
> From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com]
> Sent: Wednesday, July 13, 2011 1:43 PM
> To: Tomcat Users List
> Subject: Re: Comet over HTTPS: END event recieved immeidately for the first few times
>
> is it possible that when you turn on SSL, you are using the regular BIO connector when you use SSL and Comet is not supported by that connector.
> best
> Filip
>
> On 7/11/2011 11:05 AM, Sudeep Pradhan wrote:
>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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


RE: Comet over HTTPS: END event recieved immeidately for the first few times

Posted by Sudeep Pradhan <pr...@vmware.com>.
Hi Filip,

Thanks for the reply.

I don't think that I am using BIO connector for SSL. I don't see any such option in the server.xml. The connector is as follows:

<Connector 
	protocol="org.apache.coyote.http11.Http11NioProtocol"
	port="8443" minSpareThreads="5" maxSpareThreads="75"
	enableLookups="true" disableUploadTimeout="true" 
      acceptCount="100"  maxThreads="200"
	scheme="https" secure="true" SSLEnabled="true"
	keystoreFile="/path/to/file/keystore"
	keystorePass="**********"
	clientAuth="false" sslProtocol="TLS"/>

Also, It does *work sometimes*. I get a proper streaming output of the weather feeds when it works.

Hope this helps you understand the scenario better.

Thanks,
Sudeep



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

is it possible that when you turn on SSL, you are using the regular BIO connector when you use SSL and Comet is not supported by that connector.
best
Filip

On 7/11/2011 11:05 AM, Sudeep Pradhan wrote:
> 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
>
>


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


Re: Comet over HTTPS: END event recieved immeidately for the first few times

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
is it possible that when you turn on SSL, you are using the regular BIO connector when you use SSL and Comet is not supported by that connector.
best
Filip

On 7/11/2011 11:05 AM, Sudeep Pradhan wrote:
> 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
>
>


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


RE: Comet over HTTPS: END event recieved immeidately for the first few times

Posted by Sudeep Pradhan <pr...@vmware.com>.
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


Re: Comet over HTTPS: END event recieved immeidately for the first few times

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
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