Skip to main content

Glassfish 3.1.2.2 warning GRIZZLY0024 and SelectorFactory, with atmosphere and Primefaces 3.4

8 replies [Last post]
fylex.182
Offline
Joined: 2012-09-16
Points: 0

Hi all!

My environment is Glassfish 3.1.2.2 (enable Comet and websocket), JDK 1.7.0_07, Atmosphere 1.0.0.RC1, JSF 2.1.10, and PrimeFaces 3.4 on Windows 7.

I have enabled the comet with the steps follow :

  • Start GlassFish Server, navigate to Web Admin Console (default: http://localhost:4848/) in browser.
  • At "Common Task" pan on left hand side, select "Configuration" "> "Network Config" "> "Network Listeners" "> "http-listener-1"
  • At "Edit Network Listener", select tab "HTTP".
  • Under tab "HTTP", select the checkbox of "Comet Support"
  • Click "Save" button (at top of frame)
  • I am trying out the Counter example (primefaces 3.4 counter)
    I followed the steps for manual PF3.4 and I enabled Comet support in my domain.

    But this example, not works, because haven't comunication between the browsers.
    Also, I have the following warnings

    WARNING: GRIZZLY0024: Terminate process interrupted.

    java.lang.InterruptedException
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1325)
    at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:414)
    at com.sun.grizzly.http.ProcessorTask.terminateProcess(ProcessorTask.java:1021)
    at com.sun.grizzly.arp.DefaultAsyncExecutor.finishResponse(DefaultAsyncExecutor.java:186)
    at com.sun.grizzly.arp.DefaultAsyncExecutor.finishExecute(DefaultAsyncExecutor.java:210)
    at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:133)
    at com.sun.grizzly.comet.CometEngine.flushPostExecute(CometEngine.java:426)
    at com.sun.grizzly.comet.CometEngine.interrupt0(CometEngine.java:405)
    at com.sun.grizzly.comet.CometEngine.interrupt(CometEngine.java:383)
    at com.sun.grizzly.comet.CometContext.resumeCometHandler(CometContext.java:442)
    at org.atmosphere.container.GrizzlyCometSupport.resume(GrizzlyCometSupport.java:172)
    at org.atmosphere.container.GrizzlyCometSupport.action(GrizzlyCometSupport.java:184)
    at org.atmosphere.container.GrizzlyCometSupport.action(GrizzlyCometSupport.java:81)
    at org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:317)
    at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:146)
    at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:853)
    at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:768)
    at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:801)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

    WARNING: SelectorFactory. Can not create a selector

    java.io.IOException: Unable to establish loopback connection
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:125)
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:69)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:141)
    at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
    at java.nio.channels.Pipe.open(Pipe.java:150)
    at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:126)
    at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
    at java.nio.channels.Selector.open(Selector.java:227)
    at com.sun.grizzly.util.Utils.openSelector(Utils.java:99)
    at com.sun.grizzly.util.SelectorFactory.getSelector(SelectorFactory.java:113)
    at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:140)
    at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:76)
    at com.sun.grizzly.http.SocketChannelOutputBuffer.flushChannel(SocketChannelOutputBuffer.java:426)
    at com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:498)
    at com.sun.grizzly.http.SocketChannelOutputBuffer.endRequest(SocketChannelOutputBuffer.java:489)
    at com.sun.grizzly.http.ProcessorTask.action(ProcessorTask.java:1127)
    at com.sun.grizzly.tcp.Response.action(Response.java:268)
    at com.sun.grizzly.tcp.Response.finish(Response.java:412)
    at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:341)
    at org.apache.catalina.connector.Response.finishResponse(Response.java:582)
    at org.apache.catalina.connector.CoyoteAdapter.afterService(CoyoteAdapter.java:375)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.afterService(ContainerMapper.java:483)
    at com.sun.grizzly.http.ProcessorTask.finishResponse(ProcessorTask.java:792)
    at com.sun.grizzly.http.ProcessorTask.postResponse(ProcessorTask.java:782)
    at com.sun.grizzly.arp.DefaultAsyncExecutor.postExecute(DefaultAsyncExecutor.java:198)
    at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:114)
    at com.sun.grizzly.comet.CometEngine.flushPostExecute(CometEngine.java:426)
    at com.sun.grizzly.comet.CometEngine.interrupt0(CometEngine.java:405)
    at com.sun.grizzly.comet.CometEngine.interrupt(CometEngine.java:383)
    at com.sun.grizzly.comet.CometContext.resumeCometHandler(CometContext.java:442)
    at org.atmosphere.container.GrizzlyCometSupport.resume(GrizzlyCometSupport.java:172)
    at org.atmosphere.container.GrizzlyCometSupport.action(GrizzlyCometSupport.java:184)
    at org.atmosphere.container.GrizzlyCometSupport.action(GrizzlyCometSupport.java:81)
    at org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:317)
    at org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:146)
    at org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:853)
    at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:768)
    at org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:801)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: java.nio.channels.ClosedByInterruptException
    at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:634)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:184)
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:97)

    I've asked in 2 forums (primefaces-forum and atmosphere)and they have told me is a problem in glassfish.

    Reply viewing options

    Select your preferred way to display the comments and click "Save settings" to activate your changes.
    benjaminvnelson
    Offline
    Joined: 2012-09-22
    Points: 0

    I have exactly the same problem (except am using Ubuntu 12.04 rather than Windows 7). Have tried both Glassfish 3.1.2 and 3.1.2.2. I have also tried both the PrimeFaces 3.4 implementation of Push and the RichFaces 4.2.2 implementation but both lead to the same error.

    oleksiys
    Offline
    Joined: 2006-01-25
    Points: 0

    Hi,

    I did couple of tests myself and looks like your issues is related to [1].

    WBR,
    Alexey.

    [1] https://github.com/Atmosphere/atmosphere/issues/651

    On 09/22/2012 05:04 PM, forums@java.net wrote:
    > I have exactly the same problem (except am using Ubuntu 12.04 rather than
    > Windows 7). Have tried both Glassfish 3.1.2 and 3.1.2.2. I have also
    > tried
    > both the PrimeFaces 3.4 implementation of Push and the RichFaces 4.2.2
    > implementation but both lead to the same error.
    >
    > --
    >
    > [Message sent by forum member 'benjaminvnelson']
    >
    > View Post: http://forums.java.net/node/890277
    >
    >

    oleksiys
    Offline
    Joined: 2006-01-25
    Points: 0

    Looking into this.
    Will let you know asap.

    WBR,
    Alexey.

    On 09/22/2012 05:04 PM, forums@java.net wrote:
    > I have exactly the same problem (except am using Ubuntu 12.04 rather than
    > Windows 7). Have tried both Glassfish 3.1.2 and 3.1.2.2. I have also
    > tried
    > both the PrimeFaces 3.4 implementation of Push and the RichFaces 4.2.2
    > implementation but both lead to the same error.
    >
    > --
    >
    > [Message sent by forum member 'benjaminvnelson']
    >
    > View Post: http://forums.java.net/node/890277
    >
    >

    oleksiys
    Offline
    Joined: 2006-01-25
    Points: 0

    fylex.182
    Offline
    Joined: 2012-09-16
    Points: 0

    oleksiys wrote:
    Hi,

    can you pls. try to set this system property in Glassfish:
    |asadmin create-system-properties java.net.preferIPv4Stack=true|

    if it doesn't help - can you pls. try to disable ipv6 support in Windows
    and check if it makes any difference?

    Thanks.

    WBR,
    Alexey.
    >

    I set preferIPv4Stack, but i have the same problem.
    then, i disabled the ipv6,and equal, i have this warning, and not works this example.

    tvaana
    Offline
    Joined: 2012-10-05
    Points: 0

    Hi!

    I am running into this same problem when using richfaces 4.2 a4j push component for listening topic publications. Topic publication via jms works nicely. Only after I need to redeploy my app it throws timeout exception. java.exe process must be killed manually. Looks like it doesn't effect my apps functionality.

    Using

    Richfaces 4.2.0
    Glassfish 3.1.1(build 12)
    Atmosphere libraries:

    atmosphere-runtime-0.8.4
    atmosphere-compat-weblogic-0.8.4
    atmosphere-compat-tomcat7-0.8.4
    atmosphere-compat-tomcat-0.8.4
    atmosphere-compat-jetty-0.8.4
    atmosphere-compat-jbossweb-0.8.4

    Other Glassfish settings have been done like the starter has mentioned

    oleksiys
    Offline
    Joined: 2006-01-25
    Points: 0

    Here is a patch for GF 3.1.2.2.
    I'm still not understanding why Atmosphere is interrupting threads so aggressively, but there might be a reason.
    We reworked the code a bit so when Atmosphere interrupts a thread - the InterruptedException will not be thrown in the code reported above.

    WBR,
    Alexey.

    oleksiys
    Offline
    Joined: 2006-01-25
    Points: 0

    Should be related to atmosphere issue
    https://github.com/Atmosphere/atmosphere/issues/651

    WBR,
    Alexey.