Red Hat Bugzilla – Full Text Bug Listing
|Summary:||add storeconfig to EWS 2.0.1|
|Product:||[JBoss] JBoss Enterprise Web Server 2||Reporter:||Weinan Li <weli>|
|Component:||tomcat6, tomcat7, JON Plugin||Assignee:||David Knox <dknox>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Libor Fuka <lfuka>|
|Version:||2.0.1||CC:||cwelton, dknox, jclere, jdoyle, lfuka, loleary, majoshi, mbabacek, mhasko, myarboro, pslavice, pyadav, rhatlapa, rmaucher, rsvoboda, tsegismo|
|Fixed In Version:||Doc Type:||Bug Fix|
Previously, JBoss Operations Network did not work as expected with JBoss Enterprise Web Server because the <classname>storeconfig</classname> components in tomcat 6 and 7 were missing. The missing <classname>StoreConfig</classname> components are now available in and this is a resolved issue in JBoss Enterprise Web Server 2.1.
|Last Closed:||2014-08-21 17:39:57 EDT||Type:||Bug|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:||1115805, 1115849|
|Bug Blocks:||683054, 583996, 625146, 956987, 956990, 1111666|
Description Weinan Li 2013-04-25 02:26:09 EDT
The following components need to be added into EWS 2.0.1 for JON to work properly: http://svn.apache.org/repos/asf/tomcat/sandbox/storeconfig6/tags/0.0.1.Alpha1/ http://svn.apache.org/repos/asf/tomcat/sandbox/storeconfig7/tags/0.0.1.Alpha1/ It is a piece of code what was in tomcat5.5.x and removed in 6 and 7 and readded in trunk (8).
Comment 1 Mandar Joshi 2013-05-14 04:19:44 EDT
Doc Text added. @David, can you please review the Doc Text content?
Comment 2 David Knox 2013-05-15 12:17:05 EDT
Hi Weinan, There is a problem with both storeconfig-tc6 and tc7. Both use catalina-ha and transitive dependency, catalina-tribes. We exclude both viz JBPAPP-9557. I haven't yet had time to look the storeconfig source closely for a workaround.
Comment 3 David Knox 2013-05-17 14:30:06 EDT
@Mandar, the doc is fine for now but may need to be edited later.
Comment 6 Weinan Li 2013-05-29 23:07:25 EDT
From the pm meeting this is deferred from 2.0.1. I'll confirm in ews-pm.
Comment 7 Libor Fuka 2013-06-03 02:20:40 EDT
This bug should be in known issues. It will not be fixed with EWS 2.0.1
Comment 13 Libor Fuka 2013-08-27 06:17:11 EDT
It doesn't work properly. Tested environment: - JON 3.1.2 server with EWS plugin hotfix + EWS 2.0.1 with storeconfig jars from comm10 - RHEL5 and SunJDK 1.6 Tests steps: start T6 - change virtual host property autoDeploy to false - restart T6 start T7 - change virtual host property autoDeploy to false - restart T7 server.xmls before and after changes attached.
Comment 17 Libor Fuka 2013-08-27 07:04:25 EDT
T6 - server.xml is not well formed after storeconfig operation and missing some properties (address, etc.) T7 - server.xml does not include Listener tags after storeconfig operation and also missing some tags (<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>)
Comment 18 Jean-frederic Clere 2013-08-27 09:04:16 EDT
for TC6 it looks like the server.xml is broken: only a part of it. Any thing in the agent log? Like an exception?
Comment 19 Libor Fuka 2013-08-27 09:32:40 EDT
I tried T6 test again manually and it seems well formed but missing address attribute in connectors elements and some others attributes. Other missing attributes like appBase="webapps", unpackWARs="true", xmlValidation="false", xmlNamespaceAware="false" in Host element and connectionTimeout="20000" in HTTP connector elemnts should be defaults so they are not needed in server.xml Missing address attribute for connectors is a problem. I also tried T7 test manually and missing Listeners elements are still there.
Comment 20 Libor Fuka 2013-08-27 09:33:14 EDT
Created attachment 790974 [details] T6 server.xml manual testing
Comment 21 Michal Haško 2013-08-27 09:57:50 EDT
I'm not so sure the missing address attribute is that big of a problem. From T6 documentation for the 'address' attribute: "For servers with more than one IP address, this attribute specifies which address will be used for listening on the specified port. By default, this port will be used on all IP addresses associated with the server." (http://tomcat.apache.org/tomcat-6.0-doc/config/http.html#Attributes) I wonder if it was omitted on purpose since it can (probably) be considered unnecessary when the machine has only one IP address. appBase="webapps" is definitely a default setting. Not sure about the rest. (Someone might need to dig in the code). I don't know how the storeconfig is implemented, but I'd expect something along the lines of "save everything we can't get from default values to server.xml".
Comment 22 Jean-frederic Clere 2013-08-28 04:07:05 EDT
the missing address in the connector is a problem it needs to be fixed.
Comment 23 Libor Fuka 2013-08-28 08:14:38 EDT
Findings: T6 not well formed server.xml is created after changing configuration of deployed application. Steps to reproduce: 1. Deploy application 2. Change their configuration in JON UI, for example set reloadable attribute to NO 3. Check server.xml -> not well formed There is also error in catalina.out after changing app configuration: Aug 28, 2013 8:08:00 AM org.apache.catalina.storeconfig.StoreConfig store SEVERE: java.lang.InstantiationException: org.apache.catalina.core.StandardEngine$AccessLogListener
Comment 24 David Knox 2013-08-29 18:17:27 EDT
i can reproduce with a simple jmx client. (1) save a copy of the stock server.xml, (2) create a new virt host by invoking addChild on Catalina:type=Engine (3) invoke storeConfig on Catalina:type=StoreConfig (4) compare the original with the current Missing Listeners is because that code is commented. I think there's some configuration problems as well. StoreConfig tries to rewrite the server.xml, but the result is missing all comments, the file header, and element attributes. i'm working on it.
Comment 25 Jean-frederic Clere 2013-08-30 03:50:41 EDT
I don't think you will be able to save the comments. What element attributes are missing?
Comment 26 David Knox 2013-09-03 14:17:54 EDT
No. the comments aren't in the model. Just components and properties. (1) The server/filters are not being written. This might be because the listeners are configured as 'TransientChild'in server-registry. This has my focus. (2) The Server attributes port and shutdown are lost. (3) maxThreads is lost in Connectors, but it does include attributes that are not in the base server.xml e.g., Connector:8080 - maxConnections, keepAliveTimeout; Connector:8009 - connectionTimeout, keepAliveTimout, maxConnections, packetSize, tomcatAuthentication. (4) storeconfig is missing a Realm for UserDatabaseRealm. storeconfig may not currently allow for a nested Realm. (5) the connector for 8443 is lost. It's commented in the base server.xml.
Comment 27 Rémy Maucherat 2013-09-04 06:07:42 EDT
storeconfig is an introspection based tool, which produces a bare bones server.xml out of the server's runtime state. To avoid producing a server.xml that would be more verbose than what a user would usually do, it uses introspected default values (other "default" values can be set from somewhere else without the user doing anything to its server.xml, but storeconfig can't see that and they will be saved), known listeners that will always be set, etc. But it can also never be foolproof, and will also never look like the original server.xml. To examine possible issues and know if it's a bug / can't fix / normal, you need to post the original server.xml snippets (and storeconfiged server.xml snippet too if possible). And specify is this is with 6 or 7 too.
Comment 28 David Knox 2013-09-04 13:47:48 EDT
Created attachment 793762 [details] TC& Out-of-the-box server.xml with coments removed The comments have been removed.
Comment 29 David Knox 2013-09-04 13:49:53 EDT
Created attachment 793764 [details] TC7 server.xml after storeConfig A vhost is added: "testhost" and storeConfig() has been called
Comment 30 David Knox 2013-09-04 14:00:54 EDT
The result server.xml is broken as comment#23 alludes. The error is: SEVERE: Cannot move orignal context output file at /var/lib/tomcat7/webapps/host-manager/META-INF/context.xml Sep 04, 2013 1:15:54 PM org.apache.tomcat.util.digester.Digester fatalError SEVERE: Parse Fatal Error at line 20 column 34: Attribute "connectionTimeout" was already specified for element "Connector". org.xml.sax.SAXParseException; systemId: file:/usr/share/tomcat7/conf/server.xml; lineNumber: 20; columnNumber: 34; Attribute "connectionTimeout" was already specified for element "Connector". The complaint is true for both Connector:port=8080 and 8009 I'm going to attach the full log.
Comment 31 David Knox 2013-09-04 14:08:02 EDT
Created attachment 793768 [details] TC7 log showing errors created by StoreConfig TC7 catalina.out showing errors from connector elements.
Comment 32 Libor Fuka 2013-09-05 09:39:53 EDT
I found that new T8 RC1 on tomcat.apache.org includes catalina-storeconfig.jar. May be some code from T8 will be helpful.
Comment 33 Rémy Maucherat 2013-09-05 09:54:18 EDT
Yes, we integrated storeconfig in Tomcat trunk now. Since the default server.xml works fine for me, maybe the tag used has a problem ? I did diffs and all, but maybe I messed up or something. I also checked all my uncommitted changes were the cluster removal (so I'm not testing saving the cluster config, obviously). Can you try building the JAR from sandbox/storeconfig7/trunk ? If there's a problem, creating a new tag would be easy.
Comment 34 David Knox 2013-09-05 20:00:20 EDT
Digging deeper - The Server/Listener-s need to be written. StoreConfigLifecycleListener is removed along with the other Listeners. Changing server-registry and commenting the TransientChild elements under the Listener Description seems to have no affect.
Comment 35 Rémy Maucherat 2013-09-06 03:59:24 EDT
"The Server/Listener-s need to be written." Yes, and this works fine for me. Did you try trunk ?
Comment 36 David Knox 2013-09-11 16:39:46 EDT
solved the Listener problem. Next: Connector/connectionTimeout is being defined twice.
Comment 37 Libor Fuka 2013-09-25 06:15:49 EDT
*** Bug 583996 has been marked as a duplicate of this bug. ***
Comment 41 Libor Fuka 2013-10-01 07:30:08 EDT
tomcat7-storeconfig-0.0.1.Alpha2-redhat-4.jar tested with EWS 2.0.1 T7 + JON 3.2.0.ER2 with SunJDK 1.6 on RHEL6 ================================================================================================================ Findings: ---------- 1. Listeners are mostly fixed, but there is still missing <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> 2. There is a still missing attribute address in connector elements 3. There is a still missing Realm element <Realm className="org.apache.catalina.realm.UserDatabaseRealm" ..... <Realm className="org.apache.catalina.realm.LockOutRealm"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> </Realm> 4. Persistency of changed deployed webapp configuration doesn't work tomcat6-storeconfig-0.0.1.Alpha2-redhat-3.jar tested with EWS 2.0.1 T6 + JON 3.2.0.ER2 with SunJDK 1.6 on RHEL5 ================================================================================================================ Findings: ---------- 1. T6 not well formed server.xml is created after changing configuration of deployed application (comm#23). 2. There is a still missing attribute address in connector elements
Comment 42 Rémy Maucherat 2013-10-03 12:18:34 EDT
I can work on it, but you need to clarify 4), saving context.xml (which is the webapp config) actually works fine for me in Tomcat.
Comment 43 Libor Fuka 2013-10-04 04:26:52 EDT
ad 4) I deployed webbapp without context.xml file. The problem is storeconfig didn't create it after JON UI webapp config change.
Comment 44 Rémy Maucherat 2013-10-04 08:07:57 EDT
Ok, maybe this is about the webapps that do not have a context.xml, in that case I don't think it creates one (otherwise, it would always be creating one, since it's not going to know if there's anything to save). That's a limitation.
Comment 45 Libor Fuka 2013-10-04 08:20:49 EDT
I think the storeconfig should always create context.xml.
Comment 46 Rémy Maucherat 2013-10-04 11:19:53 EDT
Ok, I think I found a way. That's a lot of changes to port, and the branches are all different.
Comment 48 Rémy Maucherat 2013-10-07 11:49:22 EDT
After porting, all looks ok now, except item 3) for Tomcat 7, which needs a new API addition to realm. As storeconfig is supposed to support many Tomcat 7s as an addon, this does not look like a realistic scenario, so nested realms (which are quite useless anyway) cannot be supported. Should I now create new tags for storeconfig6 and storeconfig7 ?
Comment 50 Libor Fuka 2013-10-08 02:49:25 EDT
I think yes
Comment 51 Rémy Maucherat 2013-10-08 04:26:43 EDT
Ok, new tag: Alpha3
Comment 53 Jean-frederic Clere 2013-10-09 09:16:29 EDT
With https://brewweb.devel.redhat.com/buildinfo?buildID=298779 1) Not tested TC6 doesn't support it. 2) It seems no a problem in storeconfig but some in the tomcat plugin. 3) Not tested TC6 doesn't support it. 4) the file is created it looks OK.
Comment 54 David Knox 2013-10-09 12:11:55 EDT
Created attachment 810029 [details] storeconfig lib for tc7 adding for ease of access.
Comment 55 David Knox 2013-10-09 16:49:43 EDT
Created attachment 810181 [details] storeconfig lib for tc6
Comment 56 David Knox 2013-10-09 16:54:46 EDT
Created attachment 810182 [details] storeconfig lib for tc6
Comment 57 Libor Fuka 2013-10-14 10:31:40 EDT
tomcat7-storeconfig-0.0.1.Alpha3-redhat-2.jar tested with EWS 2.0.1 T7 + JON 3.2.0.ER3 with SunJDK 1.6 on RHEL6 ============================================== 1. Listeners - FIXED 2. missing attribute address in connector elements - FIXED 3. Nested Realm doesn't support it - ok, this will go to known issues 4. Persistency of changed deployed webapp configuration - FIXED 5. FOUND - Persistence of connector configuration change doesn't work (I tried to change "Max Threads" attribute to 300)
Comment 58 Libor Fuka 2013-10-14 10:53:30 EDT
tomcat6-storeconfig-0.0.1.Alpha3-redhat-8.jar tested with EWS 2.0.1 T6 + JON 3.2.0.ER3 with SunJDK 1.6 on RHEL6 ============================================== 1. T6 not well formed server.xml is created after changing configuration of deployed application (comm#23) - FIXED 2. missing attribute address in connector elements - FIXED 3. FOUND - Persistency of changed deployed webapp configuration doesn't work
Comment 59 Jean-frederic Clere 2013-10-17 10:35:26 EDT
2) How did you test it? It doesn't work for me. (TC6 and TC7).
Comment 60 Libor Fuka 2013-10-22 02:40:23 EDT
2) address attribute in connector elements - - i set this attribute before starting tomcat in server.xml manually - start tomcat and discovery it to JON - change some other attribute for connector in JON UI - restart tomcat in JON UI - check the connector attributes and whats your steps Jean-Frederic ?
Comment 61 Jean-frederic Clere 2013-10-22 02:56:33 EDT
Address: - start tomcat - discover and import it - set the address in the JON UI and press save the server.xml is not changed.
Comment 63 Jean-frederic Clere 2014-01-08 03:14:54 EST
https://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=7548d1752c8d518f43cf8b8deb496b793c9b1866 fix in master that needs to be ported.
Comment 65 Libor Fuka 2014-06-10 09:24:13 EDT
tomcat6-storeconfig-0.0.1.Alpha3-redhat-12.jar tested with EWS 2.1.0 ER2 T6 + JON 3.2.0.GA with SunJDK 1.6 on RHEL6 =============================================== Persistency of changed deployed webapp configuration doesn't work tomcat7-storeconfig-0.0.1.Alpha3-redhat-3.jar tested with EWS 2.1.0 ER2 T7 + JON 3.2.0.GA with SunJDK 1.6 on RHEL6 =============================================== Persistence of connector configuration change doesn't work (I tried to change "Max Threads" attribute to 300)
Comment 67 Jean-frederic Clere 2014-06-23 11:48:20 EDT
That isn't storeconfig problem. BTW: to test storeconfig you don't need JON but just jconsole.
Comment 68 Jean-frederic Clere 2014-06-23 11:54:12 EDT
That isn't storeconfig problem. BTW: to test storeconfig you don't need JON but just jconsole. do you have something in the agent.log file?
Comment 69 Jean-frederic Clere 2014-06-24 03:21:31 EDT
It works with master. So it is fix missing somewhere in rhq code...
Comment 70 Libor Fuka 2014-06-24 04:04:14 EDT
Created attachment 911655 [details] JON agent.log for T6 config app problem
Comment 71 Libor Fuka 2014-06-24 04:04:51 EDT
Created attachment 911656 [details] Catalina.out for T6 config app problem
Comment 72 Libor Fuka 2014-06-24 04:05:25 EDT
Created attachment 911657 [details] agent.log for T7 config virtual host problem
Comment 73 Libor Fuka 2014-06-24 04:06:03 EDT
Created attachment 911658 [details] Catalina.out for T7 config virtual host problem
Comment 74 Jean-frederic Clere 2014-06-24 04:31:55 EDT
https://git.fedorahosted.org/cgit/rhq/rhq.git/patch/?id=7548d1752c8d518f43cf8b8deb496b793c9b1866 is missing in the branch.
Comment 75 Jean-frederic Clere 2014-06-24 04:44:18 EDT
I don't have problems with the virtual host what are you testing? BTW: Could you please limit the logs to the error or around the error?
Comment 76 Libor Fuka 2014-06-24 05:17:01 EDT
Sorry, its my mistake in comm# 72 nad 73. T7 has problem with - Persistence of connector configuration change doesn't work (I tried to change "Max Threads" attribute to 300)
Comment 77 Libor Fuka 2014-06-24 05:24:57 EDT
Created attachment 911676 [details] sample application for JON Tomcat plugin deploy/undeploy/config change testing
Comment 78 Libor Fuka 2014-06-24 08:32:12 EDT
Larry, please verify comm#74 and add the patch for building new Tomcat plugin build.
Comment 79 Jean-frederic Clere 2014-06-26 07:44:19 EDT
Note http://svn.apache.org/viewvc?view=revision&revision=r1605724 might be back ported to provide patches for our branches.
Comment 80 Jean-frederic Clere 2014-06-26 08:33:01 EDT
Created attachment 912410 [details] patch for mod_cluster "problem". Prevent server.xml being destroyed by mod_cluster listener.
Comment 83 Rémy Maucherat 2014-07-03 10:14:19 EDT
Created attachment 914483 [details] Patch for Tomcat 6 context files creation Adds the capability to save context config if the config file doesn't exist in storeconfig6.
Comment 84 Libor Fuka 2014-07-17 11:39:49 EDT
pre-tested Remy's patch and its safe to include it in CR1
Comment 85 Libor Fuka 2014-08-04 08:41:34 EDT
Verified with EWS 2.1.0 CR2 on RHEL - OracleJDK 1.6/1.7, OpenJDK 1.6/1.7, IBMJDK 1.6/1.7 MS Windows, Solaris - OracleJDK 1.6/1.7 waiting for rpm tests...
Comment 87 Michal Karm Babacek 2014-08-19 07:29:54 EDT
Comment 88 Larry O'Leary 2014-08-21 17:39:57 EDT
This fix, change, or update was tested and released in Web Server Plugin Pack Update-01 for JBoss ON 3.2 -- https://access.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=32543