Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-692

Unable to re-deploy SA if one of SU failed during previous start

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • servicemix-shared-2009.02
    • servicemix-shared-2010.01
    • servicemix-soap
    • None
    • WinXP, Unix

    Description

      It is impossible to undeploy/re-deploy SA if one of it's SU was not started successfully.
      In my case SU was not properly initialized because it's endpoint was not activated (SoapEndpoint failed to activate due to invalid URL) and left in SHUTDOWN state, BUT external endpoint was already registered.
      That is why during undeploy shutdown method is not called and endpoint is not unregistered.
      During redeploy (even with corrected SA) new SU and new endpoint is not registered due to it is already registered.

      In order to reproduce that you can create simple SA with http component and set to it invalid URL (for example port = 505050)

      Below is part of stack traces if it will be helpful

      2009-12-22 16:00:34,894 | INFO | Timer-4 | ServiceUnitLifeCycle | Initializing service unit: tools-http
      2009-12-22 16:00:41,081 | DEBUG | Timer-4 | HttpComponent | Initializing service unit
      2009-12-22 16:02:49,192 | DEBUG | Timer-4 | HttpComponent | Retrieving proxied endpoint definition
      2009-12-22 16:04:26,069 | DEBUG | Timer-4 | jetty | Container Server@f9b31d + org.apache.servicemix.http.jetty.JettyContextManager$ThreadPoolWrapper@15e3b92 as threadpool
      2009-12-22 16:04:26,069 | DEBUG | Timer-4 | jetty | Container Server@f9b31d + SelectChannelConnector@localhost:505050 as connector
      2009-12-22 16:04:26,115 | DEBUG | Timer-4 | jetty | Container Server@f9b31d + HandlerCollection@f61227 as handler
      2009-12-22 16:04:26,115 | DEBUG | Timer-4 | jetty | Container HandlerCollection@f61227 + ContextHandlerCollection@121dba8as handler
      2009-12-22 16:04:26,131 | DEBUG | Timer-4 | jetty | Container HandlerCollection@f61227 + JettyContextManager$DisplayServiceHandler@1dc049d as handler
      2009-12-22 16:04:26,131 | INFO | Timer-4 | jetty | jetty-6.1.14
      2009-12-22 16:04:26,194 | DEBUG | Timer-4 | jetty | started org.apache.servicemix.http.jetty.JettyContextManager$ThreadPoolWrapper@15e3b92
      2009-12-22 16:04:26,209 | DEBUG | Timer-4 | jetty | starting ContextHandlerCollection@121dba8
      2009-12-22 16:04:26,209 | DEBUG | Timer-4 | jetty | started ContextHandlerCollection@121dba8
      2009-12-22 16:04:26,209 | DEBUG | Timer-4 | jetty | starting JettyContextManager$DisplayServiceHandler@1dc049d
      2009-12-22 16:04:26,209 | DEBUG | Timer-4 | jetty | started JettyContextManager$DisplayServiceHandler@1dc049d
      2009-12-22 16:04:26,209 | DEBUG | Timer-4 | jetty | starting HandlerCollection@f61227
      2009-12-22 16:04:26,209 | DEBUG | Timer-4 | jetty | started HandlerCollection@f61227
      2009-12-22 16:04:26,209 | DEBUG | Timer-4 | jetty | starting Server@f9b31d
      2009-12-22 16:04:26,240 | DEBUG | Timer-4 | jetty | started org.mortbay.jetty.nio.SelectChannelConnector$1@d39ac
      2009-12-22 16:04:26,240 | WARN | Timer-4 | jetty | failed SelectChannelConnector@localhost:505050
      java.lang.IllegalArgumentException: port out of range:505050
      at java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
      at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:215)
      at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:315)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      at org.mortbay.jetty.Server.doStart(Server.java:233)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      at org.apache.servicemix.http.jetty.JettyContextManager.createServer(JettyContextManager.java:290)
      at org.apache.servicemix.http.jetty.JettyContextManager.createContext(JettyContextManager.java:146)
      at org.apache.servicemix.http.processors.ConsumerProcessor.init(ConsumerProcessor.java:122)
      at org.apache.servicemix.soap.SoapEndpoint.activate(SoapEndpoint.java:356)
      at org.apache.servicemix.common.DefaultServiceUnit.init(DefaultServiceUnit.java:54)
      at org.apache.servicemix.common.BaseServiceUnitManager.init(BaseServiceUnitManager.java:122)
      at org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.init(ServiceUnitLifeCycle.java:85)
      at org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:145)
      at org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:390)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:351)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:255)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:63)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:625)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)
      2009-12-22 16:04:26,256 | WARN | Timer-4 | jetty | failed Server@f9b31d
      java.lang.IllegalArgumentException: port out of range:505050
      at java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
      at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:215)
      at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:315)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      at org.mortbay.jetty.Server.doStart(Server.java:233)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      at org.apache.servicemix.http.jetty.JettyContextManager.createServer(JettyContextManager.java:290)
      at org.apache.servicemix.http.jetty.JettyContextManager.createContext(JettyContextManager.java:146)
      at org.apache.servicemix.http.processors.ConsumerProcessor.init(ConsumerProcessor.java:122)
      at org.apache.servicemix.soap.SoapEndpoint.activate(SoapEndpoint.java:356)
      at org.apache.servicemix.common.DefaultServiceUnit.init(DefaultServiceUnit.java:54)
      at org.apache.servicemix.common.BaseServiceUnitManager.init(BaseServiceUnitManager.java:122)
      at org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.init(ServiceUnitLifeCycle.java:85)
      at org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:145)
      at org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:390)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:351)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:255)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:63)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:625)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)
      2009-12-22 16:06:41,336 | INFO | Timer-4 | DeploymentService | Error in start
      java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
      <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message" version="1.0">
      <jbi-task-result>
      <frmwk-task-result>
      <frmwk-task-result-details>
      <task-result-details>
      <task-id>start</task-id>
      <task-result>FAILED</task-result>
      <message-type>ERROR</message-type>
      </task-result-details>
      </frmwk-task-result-details>
      </frmwk-task-result>
      <component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message">
      <component-name>servicemix-http</component-name>
      <component-task-result-details>
      <task-result-details>
      <task-id>init</task-id>
      <task-result>FAILED</task-result>
      <message-type>ERROR</message-type>
      <task-status-msg>
      <msg-loc-info>
      <loc-token/>
      <loc-message>Unable to init service unit</loc-message>
      </msg-loc-info>
      </task-status-msg>
      <exception-info>
      <nesting-level>1</nesting-level>
      <msg-loc-info>
      <loc-token/>
      <loc-message>port out of range:505050</loc-message>
      <stack-trace><![CDATA[java.lang.IllegalArgumentException: port out of range:505050
      at java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
      at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:215)
      at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:315)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      at org.mortbay.jetty.Server.doStart(Server.java:233)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      at org.apache.servicemix.http.jetty.JettyContextManager.createServer(JettyContextManager.java:290)
      at org.apache.servicemix.http.jetty.JettyContextManager.createContext(JettyContextManager.java:146)
      at org.apache.servicemix.http.processors.ConsumerProcessor.init(ConsumerProcessor.java:122)
      at org.apache.servicemix.soap.SoapEndpoint.activate(SoapEndpoint.java:356)
      at org.apache.servicemix.common.DefaultServiceUnit.init(DefaultServiceUnit.java:54)
      at org.apache.servicemix.common.BaseServiceUnitManager.init(BaseServiceUnitManager.java:122)
      at org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.init(ServiceUnitLifeCycle.java:85)
      at org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:145)
      at org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:390)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:351)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:255)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:63)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:625)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)
      ]]></stack-trace>
      </msg-loc-info>
      </exception-info>
      </task-result-details>
      </component-task-result-details>
      </component-task-result>
      </jbi-task-result>
      </jbi-task>

      at org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:125)
      at org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:111)
      at org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:168)
      at org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:390)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:351)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:255)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:658)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:63)
      at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:625)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            sergiy_mamitko Sergiy Mamitko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: