users@grizzly.java.net

RE: Grizzly CancelledKeyException

From: Hou, Chunxiao <chunxiao.hou_at_jpmorgan.com>
Date: Mon, 10 Jun 2013 19:21:59 +0000

Hi Alexey,

https://java.net/jira/browse/GRIZZLY-1521 created to track this issue. Please keep us posted. Thank you!

Regards,
David

From: Oleksiy Stashok [mailto:oleksiy.stashok_at_oracle.com]
Sent: Monday, June 10, 2013 2:46 PM
To: users_at_grizzly.java.net
Subject: Re: Grizzly CancelledKeyException

Hi David,

can you pls. file the JIRA issue here:
https://java.net/jira/browse/GRIZZLY

We'll fix it asap.

Thanks.

WBR,
Alexey.
On 10.06.13 10:23, Hou, Chunxiao wrote:
Hi Grizzly team,

Our team is exploring Grizzly recently and quite happy with it so far.
But we have one question here: we noticed Grizzly server throws out exception below when clients have http "GET" queries:
ARNING: Error during Processor execution. Connection=TCPNIOConnection{localSocketAddress={0.0.0.0/0.0.0.0:9998}, peerSocketAddress={/*****}} ioEvent=WRITE processor=org.glassfish.grizzly.filterchain.DefaultFilterChain_at_1915eb<mailto:processor=org.glassfish.grizzly.filterchain.DefaultFilterChain_at_1915eb>
java.nio.channels.CancelledKeyException
       at sun.nio.ch.SelectionKeyImpl.ensureValid(Unknown Source)
       at sun.nio.ch.SelectionKeyImpl.interestOps(Unknown Source)
       at org.glassfish.grizzly.nio.DefaultSelectorHandler.deregisterKeyInterest(DefaultSelectorHandler.java:156)
       at org.glassfish.grizzly.nio.NIOConnection.disableIOEvent(NIOConnection.java:753)
       at org.glassfish.grizzly.strategies.SameThreadIOStrategy$InterestProcessingHandlerWhenIoEnabled.disableIOEvent(SameThreadIOStrategy.java:165)
       at org.glassfish.grizzly.strategies.SameThreadIOStrategy$InterestProcessingHandlerWhenIoEnabled.onContextManualIOEventControl(SameThreadIOStrategy.java:157)
       at org.glassfish.grizzly.Context.setManualIOEventControl(Context.java:173)
       at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.processAsync(AbstractNIOAsyncQueueWriter.java:498)
       at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:110)
       at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
       at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
       at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
       at org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:103)
       at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89)
       at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:409)
       at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:378)
       at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:342)
       at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:274)
       at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
       at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
       at java.lang.Thread.run(Unknown Source)

Can you please give us some ideas why the server throws this exception and how we can fix it please? The maven dependency is
<dependency>
                                <groupId>org.glassfish.grizzly</groupId>
                                <artifactId>grizzly-http</artifactId>
                                <version>2.3.3</version>
                </dependency>
                                <dependency>
                                <groupId>org.glassfish.grizzly</groupId>
                                <artifactId>grizzly-http-server</artifactId>
                                <version>2.3.3</version>
                </dependency>


Thanks,
David Hou


This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at http://www.jpmorgan.com/pages/disclosures/email.



This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.