glassfish
  1. glassfish
  2. GLASSFISH-20358

Intermittent issues stopping and starting the server with "java.lang.IllegalStateException: Service already unregistered."

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0_b85
    • Fix Version/s: None
    • Component/s: admin
    • Labels:
      None

      Description

      Web devtests perform many stop/start for functionality testings that require server restart and failing to do so is affecting test results. This intermittent issue is causing multiple failures in web devtests.

      The server fails to shut down with an error "java.lang.IllegalStateException: Service already unregistered." and subsequent restart fails since the shutdown did not happen.

      According to Sahoo, "it will surely impact embeddability of glassfish which is leveraged in cloudlogic and other places".

      [2013-04-25T20:22:24.190-0700] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=63 _ThreadName=Thread-16] [timeMillis: 1366946544190] [levelValue: 800] [[
      Server shutdown initiated]]

      [2013-04-25T20:22:24.191-0700] [glassfish 4.0] [WARNING] [NCLS-BOOTSTRAP-00029] [javax.enterprise.bootstrap] [tid: _ThreadID=63 _ThreadName=Thread-16] [timeMillis: 1366946544191] [levelValue: 900] [[
      Exception while unregistering:
      java.lang.IllegalStateException: Service already unregistered.
      at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:123)
      at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.unregisterService(EmbeddedOSGiGlassFishImpl.java:93)
      at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.stop(EmbeddedOSGiGlassFishImpl.java:81)
      at com.sun.enterprise.v3.admin.StopServer.doExecute(StopServer.java:79)
      at com.sun.enterprise.v3.admin.StopDomainCommand.execute(StopDomainCommand.java:96)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:356)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
      at org.glassfish.api.AsyncImpl$1$1.run(AsyncImpl.java:76)
      ]]

      .....

      [2013-04-25T20:22:47.601-0700] [glassfish 4.0] [INFO] [NCLS-CORE-00017] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1366946567601] [levelValue: 800] [[
      GlassFish Server Open Source Edition 4.0 (re-continuous) startup time : Felix (3,641ms), startup services(3,534ms), total(7,175ms)]]

      [2013-04-25T20:22:47.601-0700] [glassfish 4.0] [SEVERE] [NCLS-CORE-00019] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1366946567601] [levelValue: 1000] [[
      Shutting down server due to startup exception
      java.net.BindException: Address already in use
      at sun.nio.ch.Net.bind0(Native Method)
      at sun.nio.ch.Net.bind(Net.java:344)
      at sun.nio.ch.Net.bind(Net.java:336)
      at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
      at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
      at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:131)
      at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:87)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:450)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:439)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:95)
      at org.glassfish.grizzly.config.GenericGrizzlyListener.start(GenericGrizzlyListener.java:168)
      at com.sun.enterprise.v3.services.impl.GlassfishNetworkListener.start(GlassfishNetworkListener.java:94)
      at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start(GrizzlyProxy.java:230)
      at com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:470)
      at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:393)
      at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:281)
      at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:328)
      at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
      at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
      at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
      at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
      at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
      at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
      ]]

      [2013-04-25T20:22:47.640-0700] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=51 _ThreadName=Thread-13] [timeMillis: 1366946567640] [levelValue: 800] [[
      Server shutdown initiated]]

        Activity

        Amy Roh created issue -
        jwells made changes -
        Field Original Value New Value
        jwells made changes -
        Tom Mueller made changes -
        Tags 4_0-review
        Tom Mueller made changes -
        Tags 4_0-approved
        jwells made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        jwells made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            jwells
            Reporter:
            Amy Roh
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: