Description of problem: Tomcat configured to use SSL is discovered as Tomcat(null) in JBoss ON Version-Release number of selected component (if applicable): JBoss On 3.1.2 Tomcat 6 How reproducible: Always Steps to Reproduce: 1. Tomcat6/conf/server.xml connector config should contain something like: <Connector port="9441" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="50" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="/home/guest/jboss/ews10/tomcat6/conf/tomcat.jks" keystorePass="password" truststoreFile="/home/guest/jboss/ews10/tomcat6/conf/tomcat.truststore.jks" truststorePass="password"/> 2. ** self-signed cert tomcat server keytool -genkeypair -keystore tomcat.jks -storepass password -keypass password -dname "cn=boom.usersys.redhat.com, ou=GSS,dc=redhat,dc=com" -alias tomcat -keyalg RSA -keysize 1024 -validity 365 ** self-signed cert browser keytool -genkeypair -keystore client.keystore.jks -storepass password -keypass password -dname "cn=donkey.usersys.redhat.com, ou=GSS,dc=redhat,dc=com" -alias donkey -validity 365 ** export tomcat server cert keytool -exportcert -keystore tomcat.jks -alias tomcat -storepass password -file tomcat.cer ** export client cert keytool -exportcert -keystore client.keystore.jks -alias donkey -storepass password -file client.cer ** import client cert to tomcat svr truststore keytool -importcert -keystore tomcat.truststore.jks -storepass password -alias donkey -file client.cer -noprompt ** import tomcat svr cert into client truststore keytool -importcert -keystore client.truststore.jks -storepass password -alias tomcat -file tomcat.cer -noprompt 3. Make the following changed in the Tomcat6/bin/startup.sh - top entry in the file: JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.port=7444 -Djava.rmi.server.hostname=127.0.0.1" JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.access.file=/home/guest/jboss/ews10/tomcat6/conf/access.properties" JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.password.file=/home/guest/jboss/ews10/tomcat6/conf/password.properties" JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false" Where access.properties and password.properties were copied over from $JAVA_HOME/sample/jmx/jmx-scandir/src/etc/ 4. Make sure that permissions are properly set for password.properties file: sudo chmod 0600 /home/guest/jboss/ews10/tomcat6/conf/password.properties 5. Start tomcat6 instance 6. Login to JBoss ON UI and navigate to the discovery queue - and it should show up Tomcat (null) Actual results: Tomcat instance is discovered but as Tomcat(null) Expected results: Tomcat instance is discovered properly with Tomcat(<port>) Additional info: The issue seems to be in the rhq/source/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/helper/TomcatConfig.java#146: *********************************************************** String scheme = attributes.getValue("scheme"); 147 if ("https".equals(scheme)) { 148 return; 149 } 150 151 String className = attributes.getValue("className"); 152 if (className != null) { 153 if (className.endsWith("WarpConnector") //e.g. 4.0.x 154 || className.endsWith("Ajp13Connector")) { 155 return; 156 } 157 } 158 159 this.port = attributes.getValue("port"); 160 this.address = attributes.getValue("address"); 161 } 162 163 protected String getPort() { 164 return port; 165 } 166 167 protected String getAddress() { 168 return address; 169 } 170 } *********************************************************** If schema is https no port or address is returned.
https://github.com/rhq-project/rhq/pull/53 fix for upstream.
Merged in master commit 8cca19810d4a684fd9f376328bc5e45054684845 Merge: a348010 fd63a38 Author: Thomas Segismont <tsegismont> Date: Fri Jun 13 09:58:54 2014 +0200
VERIFIED on RHEL5 x86_64 + JON 3.2.0.GA (update02) + JON Tomcat plugin (update01) + OpenJDK 1.7 + EWS RPM Tomcat6/7 It is discovered as Tomcat(8443)
VERIFIED on RHEL7 x86_64 + JON 3.2.0.GA (update02) + JON Tomcat plugin (update01) + OpenJDK 1.7 + EWS RPM Tomcat6/7
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