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

Work on SM-1919 started by Freeman Fang.

> Unable to re-deploy SA if one of SU failed during previous start
> ----------------------------------------------------------------
>
>                 Key: SM-1919
>                 URL: https://issues.apache.org/activemq/browse/SM-1919
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-core
>    Affects Versions: 3.3.1
>         Environment: WinXP, Unix
>            Reporter: Sergiy Mamitko
>            Assignee: Freeman Fang
>            Priority: Critical
>
> 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 ser...@f9b31d + 
> org.apache.servicemix.http.jetty.jettycontextmanager$threadpoolwrap...@15e3b92
>  as threadpool
> 2009-12-22 16:04:26,069 | DEBUG | Timer-4    | jetty                          
> | Container ser...@f9b31d + selectchannelconnec...@localhost:505050 as 
> connector
> 2009-12-22 16:04:26,115 | DEBUG | Timer-4    | jetty                          
> | Container ser...@f9b31d + handlercollect...@f61227 as handler
> 2009-12-22 16:04:26,115 | DEBUG | Timer-4    | jetty                          
> | Container handlercollect...@f61227 + contexthandlercollect...@121dba8as 
> handler
> 2009-12-22 16:04:26,131 | DEBUG | Timer-4    | jetty                          
> | Container handlercollect...@f61227 + 
> jettycontextmanager$displayservicehand...@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$threadpoolwrap...@15e3b92
> 2009-12-22 16:04:26,209 | DEBUG | Timer-4    | jetty                          
> | starting contexthandlercollect...@121dba8
> 2009-12-22 16:04:26,209 | DEBUG | Timer-4    | jetty                          
> | started contexthandlercollect...@121dba8
> 2009-12-22 16:04:26,209 | DEBUG | Timer-4    | jetty                          
> | starting jettycontextmanager$displayservicehand...@1dc049d
> 2009-12-22 16:04:26,209 | DEBUG | Timer-4    | jetty                          
> | started jettycontextmanager$displayservicehand...@1dc049d
> 2009-12-22 16:04:26,209 | DEBUG | Timer-4    | jetty                          
> | starting handlercollect...@f61227
> 2009-12-22 16:04:26,209 | DEBUG | Timer-4    | jetty                          
> | started handlercollect...@f61227
> 2009-12-22 16:04:26,209 | DEBUG | Timer-4    | jetty                          
> | starting ser...@f9b31d
> 2009-12-22 16:04:26,240 | DEBUG | Timer-4    | jetty                          
> | started org.mortbay.jetty.nio.selectchannelconnecto...@d39ac
> 2009-12-22 16:04:26,240 | WARN  | Timer-4    | jetty                          
> | failed selectchannelconnec...@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 ser...@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)

-- 
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