Bug 1032039 - JON server cannot restart itself
JON server cannot restart itself
Status: CLOSED ERRATA
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6, Plugin -- Other (Show other bugs)
JON 3.2
Unspecified Unspecified
unspecified Severity medium
: post-GA
: One-off release
Assigned To: Thomas Heute
Filip Brychta
: Triaged
: 883357 1124029 (view as bug list)
Depends On:
Blocks: 1181217
  Show dependency treegraph
 
Reported: 2013-11-19 07:35 EST by Libor Zoubek
Modified: 2016-01-28 08:29 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-28 08:29:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
server.log (1.39 MB, text/plain)
2015-06-15 14:43 EDT, Matt Mahoney
no flags Details
agent.log (205.91 KB, text/plain)
2015-06-15 14:43 EDT, Matt Mahoney
no flags Details

  None (edit)
Description Libor Zoubek 2013-11-19 07:35:28 EST
Description of problem:

It looks like rhqctl is doing some magic with --server-config when starting server, because I am not able to restart JON server using JON UI or CLI


Version-Release number of selected component (if applicable):
JON 3.2.ER5

How reproducible: always


Steps to Reproduce:
1. import RHQ Server in inventory
2. invoke restart operation


Actual results: 

server cannot start up, it tries to use standalone.xml, but we're using standalone-full.xml. there must be some logic in rhqctl that causes reading standalone-full.xml in some weird way, because AS7 plugin does not detect that.

07:22:39,299 ERROR [org.jboss.as.server] (Controller Boot Thread) JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
        at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
        at org.jboss.as.server.ServerService.boot(ServerService.java:308) [jboss-as-server-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
        at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:188) [jboss-as-controller-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
Caused by: java.io.FileNotFoundException: /home/hudson/jon-server-3.2.0.ER5/jbossas/standalone/configuration/standalone.xml (No such file or directory)
        at java.io.FileInputStream.open(Native Method) [rt.jar:1.7.0_09-icedtea]
        at java.io.FileInputStream.<init>(FileInputStream.java:138) [rt.jar:1.7.0_09-icedtea]
        at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:129) [jboss-as-controller-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
        ... 3 more


Expected results: server is restarted


Additional info: when I use rhqctl I can start server as usuall.
Comment 1 Libor Zoubek 2013-11-19 07:37:05 EST
marking as 3.2 blocker, because this implies also START operation, which might be used within HA setup
Comment 2 Heiko W. Rupp 2013-11-19 07:53:49 EST
Afair this has also not worked with 3.1 - or did it in HA scenarios when you restart from the other server?

I think we would need to change the start script from standalone.sh to rhqctl start --server for starting purposes.
Comment 3 Libor Zoubek 2013-11-19 08:36:51 EST
You're right, I just checked this did not work in 3.1
Comment 4 Thomas Segismont 2013-11-19 09:20:07 EST
See also Bug 1028472 - JON Server does not survive reload
Comment 5 Thomas Segismont 2013-11-19 09:21:50 EST
Duplicate of Bug 883357 - Unable to start/restart RHQ server via "Operation-->Schedules"?
Comment 6 Mike Foley 2013-11-21 09:42:52 EST
per pm call 11/21 (heute, larry, yarboro, foley, spinder) ... agreement to remove jon 3.2 blocker flag (not a regression)
Comment 8 Thomas Segismont 2014-09-17 12:34:45 EDT
*** Bug 1124029 has been marked as a duplicate of this bug. ***
Comment 9 Libor Zoubek 2014-11-19 07:53:37 EST
*** Bug 883357 has been marked as a duplicate of this bug. ***
Comment 10 Libor Zoubek 2014-11-19 08:11:10 EST
branch:  master
link:    https://github.com/rhq-project/rhq/commit/a6beed4cb
time:    2014-11-19 13:53:56 +0100
commit:  a6beed4cb9b976c50ed944e9c590215e2dca1164
author:  Libor Zoubek - lzoubek@redhat.com
message: Bug 1032039 - JON server cannot restart itself
         The fix implements DiscoveryCallback and
         ResourceUpgradeCallback in rhq-server plugin and sets proper
         start script parameters (uses rhqctl) for RHQ Server resources.
         When non-HA server is restarted via RHQ Server scheduled
         operation (agent attempting to restart the server is also
         reporting to the same server) restart operation will not
         succeed (although server was in fact restarted) and it will
         timeout - this happens, because when agent wants to deliver 
         operation result to server, server goes immediatelly down (as a
         consequence of restart operation) and when it comes up, agent
         is unable to resend operation result data anymore (this maybe a
         separate bug/edge case)
Comment 11 Libor Zoubek 2015-03-21 06:25:54 EDT
branch:  release/jon3.3.x
link:    https://github.com/rhq-project/rhq/commit/f64d2a135
time:    2015-03-21 11:25:16 +0100
commit:  f64d2a135b9f4dd6584a97c7601543ea4affe42d
author:  Libor Zoubek - lzoubek@redhat.com
message: Bug 1032039 - JON server cannot restart itself
         The fix implements DiscoveryCallback and
         ResourceUpgradeCallback in rhq-server plugin and sets proper
         start script parameters (uses rhqctl) for RHQ Server resources.
         When non-HA server is restarted via RHQ Server scheduled
         operation (agent attempting to restart the server is also
         reporting to the same server) restart operation will not
         succeed (although server was in fact restarted) and it will
         timeout - this happens, because when agent wants to deliver 
         operation result to server, server goes immediatelly down (as a
         consequence of restart operation) and when it comes up, agent
         is unable to resend operation result data anymore (this maybe a
         separate bug/edge case)
         (cherry picked from commit
         a6beed4cb9b976c50ed944e9c590215e2dca1164) Signed-off-by: Libor
         Zoubek <lzoubek@redhat.com>
Comment 12 Larry O'Leary 2015-03-26 10:56:23 EDT
JBoss ON server plug-in is part of JBoss EAP plug-in pack. 

Moving this to plug-in update request.
Comment 14 Matt Mahoney 2015-06-15 14:43:10 EDT
Created attachment 1039195 [details]
server.log
Comment 15 Matt Mahoney 2015-06-15 14:43:32 EDT
Created attachment 1039196 [details]
agent.log
Comment 17 Libor Zoubek 2015-06-16 03:54:27 EDT
There was a typo in resource upgrade code. If you re-imported RHQ Server resource after plugin upgrade, it would have worked.

Now fixed

branch:  master
link:    https://github.com/rhq-project/rhq/commit/1ce9c99b4
time:    2015-06-16 09:49:25 +0200
commit:  1ce9c99b4bfd70d272d7a3ed39450105fb96656b
author:  Libor Zoubek - lzoubek@redhat.com
message: Bug 1032039 - JON server cannot restart itself
         Fix resource upgrade code
Comment 18 Libor Zoubek 2015-06-16 11:19:48 EDT
branch:  release/jon3.3.x
link:    https://github.com/rhq-project/rhq/commit/6ab59855b
time:    2015-06-16 17:18:06 +0200
commit:  6ab59855bf4ffb29ff07f627fefbb8074bc2c990
author:  Libor Zoubek - lzoubek@redhat.com
message: Bug 1032039 - JON server cannot restart itself
         Fix resource upgrade code
         (cherry picked from commit
         1ce9c99b4bfd70d272d7a3ed39450105fb96656b) Signed-off-by: Libor
         Zoubek <lzoubek@redhat.com>
Comment 20 Filip Brychta 2015-06-18 07:52:04 EDT
Verified for both standalone and HA

Note You need to log in before you can comment on or make changes to this bug.