Grizzly CancelledKeyException

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Grizzly CancelledKeyException

Hou, Chunxiao

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 [hidden email]

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.

Reply | Threaded
Open this post in threaded view
|

Re: Grizzly CancelledKeyException

oleksiys
Administrator
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 [hidden email]

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.


Reply | Threaded
Open this post in threaded view
|

RE: Grizzly CancelledKeyException

Hou, Chunxiao

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:[hidden email]]
Sent: Monday, June 10, 2013 2:46 PM
To: [hidden email]
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 [hidden email]

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.

Reply | Threaded
Open this post in threaded view
|

Re: Grizzly CancelledKeyException

oleksiys
Administrator
Hi David,

the issue has to be fixed now,
can you pls. try the latest 2.3.4-SNAPSHOT from this [1] maven repository?

Thank you.

WBR,
Alexey.

[1] https://maven.java.net/content/repositories/snapshots/

On 10.06.13 12:21, Hou, Chunxiao wrote:

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 [[hidden email]]
Sent: Monday, June 10, 2013 2:46 PM
To: [hidden email]
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 [hidden email]

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.