[jboss-jira] [JBoss JIRA] (AS7-5662) Cannot start a managed server anymore if it's failed and the host controller is reloaded/restarted

Simone Gotti (JIRA) jira-events at lists.jboss.org
Wed Oct 10 07:26:03 EDT 2012


    [ https://issues.jboss.org/browse/AS7-5662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725275#comment-12725275 ] 

Simone Gotti commented on AS7-5662:
-----------------------------------

Thanks Emanuel.

I opened a pull request for master.
As I discovered this bug on EAP6 and 7.1 on various production systems, don't you think it'll be useful to push it also for 7.1?

                
> Cannot start a managed server anymore if it's failed and the host controller is reloaded/restarted
> --------------------------------------------------------------------------------------------------
>
>                 Key: AS7-5662
>                 URL: https://issues.jboss.org/browse/AS7-5662
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Domain Management
>    Affects Versions: 7.1.3.Final (EAP), 7.2.0.Alpha1
>            Reporter: Simone Gotti
>            Assignee: Simone Gotti
>             Fix For: 7.2.0.Alpha1
>
>
> This issue should incorporate the one reported in AS7-4981. 
> I opened a new one just to describe the problem and various possible fixes.
> I can reproduce it with also with the latest 7.1 and master branches.
> Before creating a pull request I'll like to know what you think about the possibile patches provided below.
> The problem can happen also if a server is failed and you restart/reload the host controller after some time (not only when you kill the managed server and the host controller together). The unique fix is to restart the process controller and so all the managed servers...
> The problem is that, when the host controller reloads/restarts it receives the registered processes from the process controller and a Failed process is marked as not running (the value of isRunning was also broken before the fix in AS7-5610).
> In the host controller a new ManagedServer is created with internalState and requiredState defined as STOPPED.
> So:
> *) When you ask for a start of the managed server it will start trying to register the managed server with the process controller but as it's already registered the process controller will return a warning (JBAS012004: Attempted to register duplicate named process %s) and no callback to the host controller will happen living the managed server in a PROCESS_ADDING state.
> *) When you ask for a stop of the managed server you'll get that you cannot stop and already stopped server.
> I tried to fix this with this patch:
> (7.1) https://github.com/motaboy/jboss-as/commit/306db0fbfcb74a6c6781f7918877e1fc65529594
> (master) https://github.com/motaboy/jboss-as/commit/2a96fd496c8745507b38b3d69e49f3d9864f62ea
> With this patch if the process state returned by the process controller is not running then the host controller will deregister the managed server from the process controller.
> Another case is when you ask a process to stop and while it's stopping you'll reload/restart/kill the host controller. With the above patch the managed server will be deregistred from the process controller, then when the processFinished notification is received an error (JBAS010913: No server called %s available) as it was already removed from the ServerInventory on the host controller. Apart from the error this is not a problem as you can start the server without any problem.
> I made another patch to handle also this situation. To handle it the host controller needs to know if the process is really down, or it's up but stopping. So I added also this information to the one returned by the process controller (in the meantime I also changed isRunning to return true also if the process is up but stopping)
> (7.1) https://github.com/motaboy/jboss-as/commit/be3260b1b1ff4fb5ffc545f395f216837f82b3d7
> (master) https://github.com/motaboy/jboss-as/commit/b17692716c9c32ee40d78424dcb542156cc059aa
> I also modified the RespawnTestCase to test also the first case (managed server failed and host controller is reloaded) (this test was disabled by AS7-5242):
> (7.1) https://github.com/motaboy/jboss-as/commit/b321db77db298871a39c0a445c73dbe512294728
> (master) https://github.com/motaboy/jboss-as/commit/c88c595ee657b45cbfebe8eac4b5ab37b6983a24
> Thanks!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list