Skip to content
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

Long-polling doesn't work on JBoss EAP 6.1 with APR (native support) #1670

Closed
gnorberti opened this issue Jul 18, 2014 · 4 comments
Closed

Comments

@gnorberti
Copy link

Running atmosphere chat example, with:
atmosphere-runtime-native 2.2.0-RC1, excluded atmosphere-compat-jbossweb
jboss-as-websockets 0.5

the websocket work properly but long-polling doesn't work.

With long-polling the server log the connection of the client:
"11:33:07,082 INFO org.atmosphere.samples.chat.Chat Browser 6c9feb57-6ef8-4005-ba1d-1c174d00017d connected."

but the client can't connect:
"Connection lost, trying to reconnect. Trying to reconnect 5000"

But if in web.xml I force JBossWebCometSupport

org.atmosphere.cpr.asyncSupport
org.atmosphere.container.JBossWebCometSupport

the long-polling work (websocket not).

My conf is:

  • win 8 (x64) (try also on Red Hat Enterprise 6.3 with linux apr connector)
  • jboss EAP 6.1 with apr connector (for win x64)
  • set native = true on standalone.xml
  • on standalone.conf set java_opt for path of native library

From Google group's discussion:
https://groups.google.com/forum/?hl=it#!topic/atmosphere-framework/kW_1YfM4NUE

jfarcand added a commit that referenced this issue Jul 18, 2014
@jfarcand jfarcand added the 2.2.0 label Jul 18, 2014
@jfarcand
Copy link
Member

Fixed, please try it and report as soon as possible any issue.

@gnorberti
Copy link
Author

After update atmosphere library and jquery to the last version on atmosphere chat example,
I'm able to connect on long-polling.

When I try to send message, the client receive it, but it goes on loop,
from the log:
17:14:58,247 INFO org.atmosphere.samples.chat.Chat Browser b93ab3a0-fcd2-4206-9ec2-dd74159e5cd0 connected.
17:14:58,247 INFO org.atmosphere.samples.chat.Chat Browser b93ab3a0-fcd2-4206-9ec2-dd74159e5cd0 connected.
17:14:58,247 INFO org.atmosphere.samples.chat.Chat Browser b93ab3a0-fcd2-4206-9ec2-dd74159e5cd0 connected.
.........................

jfarcand added a commit that referenced this issue Jul 22, 2014
@jfarcand
Copy link
Member

OK try it again. For some reason I can't reproduce but I suspect my environment.

@gnorberti
Copy link
Author

Hi,
I have same problem with long-polling on win :can connect but it goes on loop.

On Unix can't connect: the interceptor destroy the long-polling resource:

15:35:51,412 TRACE org.atmosphere.cpr.AtmosphereFramework Query String translated to headers {X-Atmosphere-Transport=long-polling, X-Atmosphere-Framework=2.2.0-javascript, X-Atmosphere-TrackMessageSize=true, _=1406036142200, X-atmo-protocol=true, X-Atmosphere-tracking-id=0, X-Cache-Date=0}
15:35:51,412 TRACE org.atmosphere.cpr.AtmosphereResourceFactory Adding: AtmosphereResource{
uuid=c77d69e4-3ac1-4bd4-9711-04570a8a9908,
transport=LONG_POLLING,
isInScope=true,
isResumed=false,
isCancelled=false,
isSuspended=false,
broadcaster=/chat size: 0,
atmosphereHandler=ManagedAtmosphereHandler proxy for org.atmosphere.samples.chat.Chat,
action=Action{timeout=-1, type=CREATED}}
15:35:51,412 TRACE org.atmosphere.cpr.AsynchronousProcessor Interceptor Atmosphere JavaScript Protocol interrupted the dispatch for c77d69e4-3ac1-4bd4-9711-04570a8a9908 with Action{timeout=-1, type=CANCELLED}
15:35:51,413 TRACE org.atmosphere.cpr.AsyncSupportListenerAdapter Closing resource AtmosphereResource{
uuid=c77d69e4-3ac1-4bd4-9711-04570a8a9908,
transport=LONG_POLLING,
isInScope=true,
isResumed=false,
isCancelled=false,
isSuspended=false,
broadcaster=/chat size: 0,
atmosphereHandler=ManagedAtmosphereHandler proxy for org.atmosphere.samples.chat.Chat,action=Action{timeout=-1, type=CREATED}} for request c77d69e4-3ac1-4bd4-9711-04570a8a9908
15:35:51,413 TRACE org.atmosphere.cpr.AtmosphereResponse 1172580967 destroyed
15:35:51,413 TRACE org.atmosphere.cpr.AsyncSupportListenerAdapter Destroyed resource AtmosphereResource{
uuid=c77d69e4-3ac1-4bd4-9711-04570a8a9908,
transport=LONG_POLLING,
isInScope=true,
isResumed=false,
isCancelled=false,
isSuspended=false,
broadcaster=/chat size: 0,
atmosphereHandler=ManagedAtmosphereHandler proxy for org.atmosphere.samples.chat.Chat,action=Action{timeout=-1, type=CREATED}} for request c77d69e4-3ac1-4bd4-9711-04570a8a9908

mvsmasiero added a commit to mvsmasiero/atmosphere that referenced this issue Jul 24, 2014
…lling fallback to use on JBoss EAP 6.2 with JBoss Native Connector

Implementation of "Async Support" for WebSocket transport and
Long-Polling fallback to use on JBoss EAP 6.2 with JBoss Native
Connector.

This is a approach to solve fix issue
Atmosphere#1670.

It's necessary configuring "init-param" for "AtmosphereServlet" in the
web.xml for use this async support:

<init-param>
<param-name>org.atmosphere.cpr.asyncSupport</param-name>

<param-value>org.atmosphere.container.JBossAsyncSupportWithWebSocket</param-value>
</init-param>
jfarcand added a commit that referenced this issue Jul 24, 2014
jfarcand added a commit that referenced this issue Jul 24, 2014
jfarcand pushed a commit that referenced this issue Jul 25, 2014
…lling fallback to use on JBoss EAP 6.2 with JBoss Native Connector

Implementation of "Async Support" for WebSocket transport and
Long-Polling fallback to use on JBoss EAP 6.2 with JBoss Native
Connector.

This is a approach to solve fix issue
#1670.

It's necessary configuring "init-param" for "AtmosphereServlet" in the
web.xml for use this async support:

<init-param>
<param-name>org.atmosphere.cpr.asyncSupport</param-name>

<param-value>org.atmosphere.container.JBossAsyncSupportWithWebSocket</param-value>
</init-param>
jfarcand pushed a commit that referenced this issue Jul 25, 2014
…lling fallback to use on JBoss EAP 6.2 with JBoss Native Connector

Implementation of "Async Support" for WebSocket transport and
Long-Polling fallback to use on JBoss EAP 6.2 with JBoss Native
Connector.

This is a approach to solve fix issue
#1670.

It's necessary configuring "init-param" for "AtmosphereServlet" in the
web.xml for use this async support:

<init-param>
<param-name>org.atmosphere.cpr.asyncSupport</param-name>

<param-value>org.atmosphere.container.JBossAsyncSupportWithWebSocket</param-value>
</init-param>
mvsmasiero added a commit to mvsmasiero/atmosphere that referenced this issue Jul 28, 2014
mvsmasiero added a commit to mvsmasiero/atmosphere that referenced this issue Jul 28, 2014
jfarcand added a commit that referenced this issue Jul 30, 2014
@jfarcand jfarcand added the 2.1.8 label Aug 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants