Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] "A non-blocking socket operation could not be completed immediately" error

Hello,
We are using jetty 9.3.6.v20151106 in our application and we have been seeing the following error, only on some windows environments. We don't know why it's happening.

2016-06-01 08:07:26,875  WARN  [org.eclipse.jetty.io.ManagedSelector] 
java.io.IOException: A non-blocking socket operation could not be completed immediately
at sun.nio.ch.SocketDispatcher.close0(Native Method) ~[?:1.8.0_91]
at sun.nio.ch.SocketDispatcher.close(SocketDispatcher.java:63) ~[?:1.8.0_91]
at sun.nio.ch.SocketChannelImpl.kill(SocketChannelImpl.java:879) ~[?:1.8.0_91]
at sun.nio.ch.WindowsSelectorImpl.implDereg(WindowsSelectorImpl.java:588) ~[?:1.8.0_91]
at sun.nio.ch.SelectorImpl.processDeregisterQueue(SelectorImpl.java:149) ~[?:1.8.0_91]
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:171) ~[?:1.8.0_91]
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) ~[?:1.8.0_91]
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) ~[?:1.8.0_91]
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:101) ~[?:1.8.0_91]
at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select(ManagedSelector.java:232) ~[jetty-io-9.3.6.v20151106patch1.jar:9.3.6.v20151106patch1]
at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:180) ~[jetty-io-9.3.6.v20151106patch1.jar:9.3.6.v20151106patch1]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:162) ~[jetty-util-9.3.6.v20151106patch1.jar:9.3.6.v20151106patch1]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147) ~[jetty-util-9.3.6.v20151106patch1.jar:9.3.6.v20151106patch1]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) ~[jetty-util-9.3.6.v20151106patch1.jar:9.3.6.v20151106patch1]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572) ~[jetty-util-9.3.6.v20151106patch1.jar:9.3.6.v20151106patch1]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]

In this case the selector seems to be closed (at line 261 at https://github.com/eclipse/jetty.project/blob/jetty-9.3.x/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java) and it does not seem to be recreated. After this error jetty becomes unresponsive and restarting the application seems to be the only solution.  
catch (Throwable x)
{
    closeNoExceptions(_selector); <<<<<====here
    if (isRunning())
    LOG.warn(x);
    else
    LOG.debug(x);
}

My questions are : 
- Can jetty recover from this error by changing some configuration settings etc? 
- Can this error be prevented (without changing windows settings etc)?

Thanks in advance

Back to the top