New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Glassfish] [HTTPS] Сonnection breaks every few seconds #744
Comments
Looks like there is more than one thread referencing the Buffer. Have you been able to confirm the same behavior on GlassFish 3.1.2.2? Is this something you can reproduce using the standard Atmosphere examples? |
Such use is prohibited? For example can I have list of broadcasters and thread that will periodically call them broadcast method?
I will try to do that. |
@freeflyer Can you try with Tomcat or Jetty? From your stack trace I don't see anything wrong. Are you sharing AtmosphereResource amongst threads? If yes you need to make sure the write operation is executed inside a synchronous block. |
I have the same issue when I am trying to broadcast messages with interval up to 100ms between messages. |
Today I have tried standard chat atmosphere example (with streaming transport) with the similar results as for our application. Over HTTP it's working fine but over HTTPS behaviour very unstable. Periodically the connection breaks, and some messages are lost. And these errors periodically appears in the log: [#|2012-12-05T18:05:19.023+0200|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|ThreadID=31;ThreadName=Thread-2;|Response Error during finishResponse [#|2012-12-05T18:05:19.027+0200|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=30;_ThreadName=Thread-2;|org.apache.catalina.connector.ClientAbortException: java.io.IOException: SSLOutputWriter: BUFFER_OVERFLOW |
Anybody has used this framework via HTTS? What do you think - this is a problem of the atmospere or streaming via https in general? Or it's just my local issues? |
I'll be checking into this today. Stay tuned.
|
Yes. Today I have tried to deploy both our application and standard atmosphere chat example. |
I have tried this. It seems it works! |
I believe I may have a fix for this (at least it appears that way on my end). The fix is against Grizzly 1.9.50/GlassFish 3.1.2.2. You can download the updated JAR here [1]. Replace the existing jar in $GF_HOME/modules, restart the server, and test. Let me know how it goes. [1]https://dl.dropbox.com/s/b7iv8dhh6rmp029/grizzly-http-1.9.50.jar?dl=1 |
It seems it does not work. I have tested today this jar witht the GlassFish 3.1.2.2 and standard atmosphere chat example (streaming transport, https). There are following exceptions in the log periodically appears (see below). [#|2012-12-10T16:41:24.024+0200|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=46;_ThreadName=Thread-2;|Response Error during finishResponse |
And test with the our atmosphere application: [#|2012-12-10T16:52:22.381+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=113;_ThreadName=Thread-2;|16:52:22,379 DEBUG DefaultBroadcaster:880 : onException() |
@freeflyer Can you add in your web.xml the following init-param: <init-param>
<param-name>org.atmosphere.useNative</param-name>
<param-value>false</param-value>
</init-param> It will disable Grizzly Comet and use Servlet 3.0, which I suspect possibly work. |
I have tried with our application but obtained following exceptions: [#|2012-12-10T17:38:22.386+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=152;_ThreadName=Thread-2;|17:38:22,382 DEBUG DefaultBroadcaster:880 : onException() |
When you installed the patch jar, did you see a message in the log pertaining to OSGi updating a bundle? You did rename the jar from the download link to replace the existing jar, yes? With this fix in place, I've been unable to reproduce the issue. Maybe you're doing something different? Can you describe how you're triggering the problem? |
Can you tell please what the exact message I should look for in the log?
Yes, I have stopped server, then removed previous grizzly-http.jar, and renamed new jar from the download link.
I have noticed that more hard to reproduce problem when server started at the local host. But when server started at the other host in our local network these connection problems occurs much more often. If I test with standard chat example I enable comet support for https listener on port 8181. Then I change application.js chat file to use streaming transport. Then I open first chat window via https in the Chrome browser and second chat window in the IE browser. Then I start chating in both windows and wait for the hang. Periodically I try to send a large messages (few hundreds letters). |
The log message will look something like:
You may also wish to delete the OSGi cache if you're not seeing a message like the above. The osgi-cache directory is in $GF_HOME/domains/. |
I have tried, it seems it works now! |
Ok, that's good to hear! Will work on getting a new Grizzly release out that includes the fix. Will follow up here when it's ready. |
For future reference, here is the issue within the Grizzly tracker: http://java.net/jira/browse/GRIZZLY-1376. |
Thanks Ryan!! |
I've released Grizzly 1.9.55 which includes a finalized version of the fix. I've uploaded [1] a simple shell script to obtain all of the Grizzly 1.9.55 jars necessary to upgrade a GlassFish 3.1.2.2 installation. You may want to backup the grizzly jars in your modules directory, then run the script and copy the jars over to your GF installation. You'll probably want to delete the OSGi cache again before starting the server. NOTE: That if you have a support contract, this may raise the hackles of any support engineers you talk to. If you wish to avoid that situation, use your support channel to get an office GF release that includes 1.9.55. [1] https://dl.dropbox.com/s/yl0zwt9k4p7orrp/getjars.sh?dl=1 |
I've tried Glassfish 3.1.2.2 with these jars but the following exception occurs during start domain: [#|2012-12-13T12:49:33.262+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=10;_ThreadName=Thread-2;|java.lang.reflect.InvocationTargetException |
OSGi can be such a pain at times. I'll give it shot on this end as soon as I get some free time. |
Thanks, I will wait for news. |
OK, it wasn't OSGi, it was me and a typo in the script. I've pushed a new version [1] to dropbox. [1] https://dl.dropbox.com/s/yl0zwt9k4p7orrp/getjars.sh?dl=1 |
I'm going to go ahead and close this out at this point - not really an atmosphere issue anyway. The Grizzly issue, if any additional follow up is necessary, is here [1]. |
I am new to atmosphere framework and facing same issue. I am using atmosphere spade server 0.7.1 with atmosphere 1.0.0. Will it get solved using latest jars of spade server. |
@abhisoni96 The Spade Server is no longer supported. I recommend you use Grizzly 2 implementation instead. |
Sorry for late reply. |
@abhisoni96 Your configuration is not supported and you are mixing artifacts and version. Either you use 0.8.7 completely, or migrate to 1.0.12. The Spade server is not supported anymore/ |
So my question is there any updated plugin "atmosphere-grizzly-adapter" for atmosphere-jersey 1.0.0. |
I migrate to 1.0.0 and it is working fine with ServletAdapter . Thank you. |
We are using Glassfish 3.1.2 and Atmosphere 1.0.4 in our application.
It's works fine via usual HTTP. But when we trying to work via HTTPS it's working only few first seconds (at most a few tens of seconds). Then we get the following exception:
The text was updated successfully, but these errors were encountered: