Unexpected exception in the selector loop. java.lang.Error: java.net.SocketException: Socket operation on nonsocket: getsockname ...
Trustin Lee
trustin at gleamynode.net
Wed Feb 4 00:48:54 EST 2009
You're welcome. Because I don't have a good access to a Windows
machine, I appreciate your quick response. :-)
If you look at the 204th line of NioServerSocketPipeline.java, there's
the following line:
SocketChannel acceptedSocket =
channel.socket.socket().accept().getChannel();
Could you replace it with the following and if it fixes the problem?
SocketChannel acceptedSocket = channel.socket.accept();
Thanks in advance,
— Trustin Lee, http://gleamynode.net/
On Wed, Feb 4, 2009 at 2:19 PM, Wesly smith <weslysmith0 at gmail.com> wrote:
>
> Hello Trustin,
>
> The bad thing is that the server failed to accept more connections with this
> exception.
>
> Also for the memory leak, it is very possible not netty issue. For not
> consuming too much your time, I will discuss tomorrow with someone else
> here. I will get back to you.
>
> FYI, the very original Windows platform related exception is gone after your
> code swallows the exception at revision 748 749..
>
> Thanks a lot, I appreciate your work.
>
> ===========
>
>
> I believe this exception is unrelated with Netty but related with
> Windows NIO implementation again because I have never seen this case.
> I think you are just safe to ignore this exception if the server can
> continue to accept incoming connections. Let me know if it fails to
> accept more connections.
>
> — Trustin Lee, http://gleamynode.net/
>
>
>
> On Wed, Feb 4, 2009 at 1:40 PM, Wesly smith <weslysmith0 at gmail.com> wrote:
>>
>> I saw this exception....
>>
>> osgi> Exception in thread "pool-3-thread-1"
>> java.nio.channels.ClosedSelectorException
>> at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
>> at sun.nio.ch.SelectorImpl.selectNow(Unknown Source)
>> at sun.nio.ch.Util.releaseTemporarySelector(Unknown Source)
>> at sun.nio.ch.ServerSocketAdaptor.accept(Unknown Source)
>> at
>> org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.run(NioServerSocketPipelineSink.java:204)
>> at
>> org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:72)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
>> Source)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>> Source)
>> at java.lang.Thread.run(Unknown Source)
>>
>
> --
> View this message in context: http://n2.nabble.com/Unexpected-exception-in-the-selector-loop.-java.lang.Error%3A-java.net.SocketException%3A-Socket-operation-on-nonsocket%3A-getsockname-...-tp2266877p2267270.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
>
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
More information about the netty-users
mailing list