MINA
  1. MINA
  2. DIRMINA-718

Sometimes AbstractIoSession.toString() invoked java.net.SocketException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M6
    • Fix Version/s: 2.0.0-RC1
    • Component/s: Core
    • Labels:
      None
    • Environment:
      xp

      Description

      Sometimes AbstractIoSession.toString() method invoked java.net.SocketException.

      That was java.lang.Error. so my program was exited.

      I think this problem was continuing since 2.0M2 or 3

      =======================================================================================================

      java.lang.Error: java.net.SocketException: Socket operation on nonsocket: getsockname
      at sun.nio.ch.Net.localAddress(Net.java:125)
      at sun.nio.ch.SocketChannelImpl.localAddress(SocketChannelImpl.java:430)
      at sun.nio.ch.SocketAdaptor.getLocalAddress(SocketAdaptor.java:147)
      at java.net.Socket.getLocalSocketAddress(Socket.java:697)
      at org.apache.mina.transport.socket.nio.NioSocketSession.getLocalAddress(NioSocketSession.java:158)
      at org.apache.mina.transport.socket.nio.NioSocketSession.getLocalAddress(NioSocketSession.java:1)
      at org.apache.mina.core.session.AbstractIoSession.toString(AbstractIoSession.java:1147)
      at java.lang.String.valueOf(String.java:2827)
      at java.lang.StringBuilder.append(StringBuilder.java:115)
      at com.rontab.bake.net.ClientEventAbstract.sendServer(ClientEventAbstract.java:256)
      at com.rontab.bake.net.ClientEventAbstract.send(ClientEventAbstract.java:241)
      at com.rontab.bake.net.protocols.room.PCreateRoom.sendMakeRoom(PCreateRoom.java:193)
      at com.rontab.bake.bui.comp.roomlist.createroom.CreateRoomEventProcessor.makeRoom(CreateRoomEventProcessor.java:53)
      at com.rontab.bake.bui.comp.roomlist.createroom.CreateRoomCont.roomSetting(CreateRoomCont.java:371)
      at com.rontab.bake.bui.comp.roomlist.createroom.CreateRoomCont.createRoom(CreateRoomCont.java:383)
      at com.rontab.bake.bui.comp.roomlist.createroom.CreateRoomCont$3.mouseReleased(CreateRoomCont.java:219)
      at com.jmex.bui.event.MouseEvent.dispatch(MouseEvent.java:209)
      at com.jmex.bui.BComponent.dispatchEvent(BComponent.java:789)
      at com.jmex.bui.BRootNode.dispatchEvent(BRootNode.java:469)
      at com.jmex.bui.PolledRootNode$2.dispatchEvent(PolledRootNode.java:268)
      at com.jmex.bui.PolledRootNode$2.onButton(PolledRootNode.java:237)
      at com.jme.input.lwjgl.LWJGLMouseInput.update(LWJGLMouseInput.java:233)
      at com.jme.input.InputSystem.update(InputSystem.java:67)
      at com.rontab.bim.app.RontabGame.start(RontabGame.java:78)
      at com.rontab.bake.Bake.main(Bake.java:177)
      Caused by: java.net.SocketException: Socket operation on nonsocket: getsockname
      at sun.nio.ch.Net.localInetAddress(Native Method)
      at sun.nio.ch.Net.localAddress(Net.java:122)
      ... 24 more

        Issue Links

          Activity

          Hide
          Edouard De Oliveira added a comment -

          Seems this issue has already been addressed in DIRMINA-677

          https://issues.apache.org/jira/browse/DIRMINA-677

          Show
          Edouard De Oliveira added a comment - Seems this issue has already been addressed in DIRMINA-677 https://issues.apache.org/jira/browse/DIRMINA-677
          Hide
          ncanis2 added a comment - - edited

          Yes. I saw that

          But, this problem invoked on MINA-M6.

          Show
          ncanis2 added a comment - - edited Yes. I saw that But, this problem invoked on MINA-M6.
          Hide
          Emmanuel Lecharny added a comment -

          does it happens all the time ?

          Otherwise it might be a side effect : the session is in closing state, and is closed when we try to print data.

          Show
          Emmanuel Lecharny added a comment - does it happens all the time ? Otherwise it might be a side effect : the session is in closing state, and is closed when we try to print data.
          Hide
          Emmanuel Lecharny added a comment -

          Applied a patch : http://svn.apache.org/viewvc?rev=785102&view=rev

          to fix the issue. If the session is disconnecting, we might have had some exception while trying to accessdata from a closed socket, which are now trapped.

          Show
          Emmanuel Lecharny added a comment - Applied a patch : http://svn.apache.org/viewvc?rev=785102&view=rev to fix the issue. If the session is disconnecting, we might have had some exception while trying to accessdata from a closed socket, which are now trapped.
          Hide
          ncanis2 added a comment -

          Thanks. I applied the patch.

          Show
          ncanis2 added a comment - Thanks. I applied the patch.

            People

            • Assignee:
              Emmanuel Lecharny
              Reporter:
              ncanis2
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development