1 Reply Latest reply on Aug 30, 2006 11:46 AM by tom.elrod

    Connector - InvokerRegistery not cleared when stop is called

    sarbu

      Hi,

      Jboss remoting version - 1.4.1

      I noticed a problem that happens sometimes when I start a connector. The sequence of steps that I do is
      a) Create teh connector (succeeds correctly).
      b) Start the connector (Fails with a JVM_BIND).

      When I get the above exception, I call the connector.stop() expecting the connector context to be cleared out properly. However, when I call connector.create() again for the locatorURI, I get an exception stating that this URI is already connected to another connector.

      When I stepped through the jboss remoting code, I noticed that the InvokerRegistry still has the entry for the ServerSocketInvoker object. It looks like the stop method does not clear the Registry correctly. The stop method clears out the registry entries only if the connector is started. However, in the above case, the connector is created, but not started.

      I have attached the thread stack trace along with this. I downloaded the candidate release code and it looks like this has not been addressed yet.

      Please let me know if you want me to file this as an issue (or) even better, it this has been addressed already.


      Thanks
      Saravanan

      15.29.53 [] main ERROR [transport.socket.SocketServerInvoker] Error starting ServerSocket. Bind port: 6450, bind address: /172.16.1.101
      15.29.53 [] main ERROR [remoting.transport.Connector] Error starting connector.
      java.net.BindException: Cannot assign requested address: JVM_Bind
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
      at java.net.ServerSocket.bind(ServerSocket.java:318)
      at java.net.ServerSocket.(ServerSocket.java:185)
      at org.jboss.remoting.transport.socket.SocketServerInvoker.createServerSocket(SocketServerInvoker.java:189)
      at org.jboss.remoting.transport.socket.SocketServerInvoker.start(SocketServerInvoker.java:139)
      at org.jboss.remoting.transport.Connector.start(Connector.java:315)
      at com.zforce.rain.remotedb.DbGateway.init(DbGateway.java:94)
      at com.zforce.rain.remotedb.DbGateway.main(DbGateway.java:384)
      15.29.53 [] main ERROR [zforce.rain.remotedb] Error when creating the connector. Sleep for 5 seconds
      java.net.BindException: Cannot assign requested address: JVM_Bind
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
      at java.net.ServerSocket.bind(ServerSocket.java:318)
      at java.net.ServerSocket.(ServerSocket.java:185)
      at org.jboss.remoting.transport.socket.SocketServerInvoker.createServerSocket(SocketServerInvoker.java:189)
      at org.jboss.remoting.transport.socket.SocketServerInvoker.start(SocketServerInvoker.java:139)
      at org.jboss.remoting.transport.Connector.start(Connector.java:315)
      at com.zforce.rain.remotedb.DbGateway.init(DbGateway.java:94)
      at com.zforce.rain.remotedb.DbGateway.main(DbGateway.java:384)
      15.29.58 [] main ERROR [zforce.rain.remotedb] Error when creating the connector. Sleep for 5 seconds
      org.jboss.remoting.InvalidConfigurationException: The invoker for locator (InvokerLocator [socket://172.16.1.101:6450/?timeout=120000]) is already in use by another Connector. Either change the locator or add new handlers to existing Connector.