[ 
https://issues.apache.org/jira/browse/DIRMINA-273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Lecharny closed DIRMINA-273.
-------------------------------------


> Session created with non-existent service
> -----------------------------------------
>
>                 Key: DIRMINA-273
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-273
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.9.4, 0.9.5, 1.0.0
>         Environment: Windows 2000 SP4, Java 1.5.0_08
>            Reporter: Raman Gupta
>            Assignee: Trustin Lee
>             Fix For: 1.0.1
>
>         Attachments: MinaConnectTest.java, MinaConnectTest10.java, 
> MinaConnectTestNew.java
>
>
> On Windows 2000, when attempting to connect to a service on a port where no 
> service is running (either locally or remotely), Mina will sometimes create 
> and open a session instead of throwing an IoException. This session is of 
> course unusable, and when attempting to use it an exception is thrown (the 
> following exception from Mina 0.9.4):
> java.nio.channels.NotYetConnectedException
>        at 
> sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:129)
>        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:294)
>        at 
> org.apache.mina.transport.socket.nio.SocketIoProcessor.doFlush(SocketIoProcessor.java:480)
>        at 
> org.apache.mina.transport.socket.nio.SocketIoProcessor.doFlush(SocketIoProcessor.java:412)
>        at 
> org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProcessor.java:41)
>        at 
> org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:568)
> This is reproducible within a few seconds with the attached test case on 
> Windows 2000 on Mina 0.9.4 and Mina 1.0.0.  I also attempted to reproduce 
> this on Linux 2.6.17 but was unable to.
> I have attached two test cases, one MinaConnectTest and one 
> MinaConnectTest10, the former is for 0.9.4 and the latter is for 1.0.0 -- the 
> only change is the exception caught.
> Though the attached test case fails uses only localhost (to avoid DNS 
> complications), the test case also fails if a remote host is used. I tested 
> with a remote host running Solaris 8 from a Windows client.
> Lastly, netcat in a tight loop was used concurrently with the test to verify 
> that the port was indeed refusing connections.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to