That's it! JConsole shows the MBean but not the serverInfo attribute.This embedded
Tomcat must be a very old release - I found this bug fix from 2006:
________________________________
Author: pero
Date: Wed Jan 18 01:17:33 2006
New Revision: 370082
URL:
http://svn.apache.org/viewcvs?rev=370082&view=rev
Log:
Add jmx serverInfo attribute to Server mbean
________________________________
Al Amyot | Consultant
Sierra Systems
(eHealth): 204-926-4257 (T): 204-942-2575 (F): 204-942-2047
444 St. Mary Avenue, Suite 1050
Winnipeg, MB R3C 3T1
Management Consulting | System Integration | Managed Services
website:
www.SierraSystems.com <
http://www.sierrasystems.com/>
________________________________
From: rhq-users-bounces(a)lists.fedorahosted.org
[mailto:rhq-users-bounces@lists.fedorahosted.org] On Behalf Of Ian Springer
Sent: Monday, December 06, 2010 7:18 PM
To: rhq-users(a)lists.fedorahosted.org
Subject: Re: Cannot display Tomcat instance
Here's the code that TomcatServerComponent uses to check availability:
public AvailabilityType getAvailability() {
try {
EmsConnection connection = loadConnection();
EmsBean bean = connection.getBean("Catalina:type=Server");
// this is necessary to prove that that not only the connection exists but is
servicing requests.
bean.getAttribute("serverInfo").refresh();
return AvailabilityType.UP;
} catch (Exception e) {
// If the connection is not servicing requests then close it. this seems
necessary for the
// Tomcat connection as when Tomcat does come up again it seems a new EMS
connection is required,
// otherwise we're not seeing EMS be able to pick up the new process.
closeConnection();
return AvailabilityType.DOWN;
}
}
If you're seeing the Tomcat Server as red in inventory, this is most likely returning
DOWN. Since your logs show that the tomcat plugin is successfully connecting to
Tomcat's MBeanServer, I'm guessing that either there is no MBean named
"Catalina:type=Server" registered, or that MBean is registered but does not
expose the "serverInfo" attribute. I'd try using jconsole to connect to the
Tomcat MBeanServer and see if either of these two things is true.
On 12/06/2010 05:24 PM, Al Amyot wrote:
I have one Tomcat instance that will not inventory fully. It happens to be a Tomcat 5
embedded in another product.
JMX Remoting is working properly.
The Tomcat server appears in inventory but is always unavailable and no child resources
display.
The agent reports these log entries implying that everything is fine.
2010-12-06 16:04:50,662 DEBUG [InventoryManager.availability-1]
(rhq.core.pc.inventory.AvailabilityExecutor)- Running Availability Scan...
2010-12-06 16:04:50,662 DEBUG [ResourceContainer.invoker.daemon-22]
(org.mc4j.ems.connection.ConnectionFactory)- Searching for library catalina.jar
2010-12-06 16:04:50,678 DEBUG [ResourceContainer.invoker.daemon-22]
(org.mc4j.ems.connection.ConnectionFactory)- Library dependency resolved C:\Program
Files\Business Objects\Tomcat\server\lib\catalina.jar
2010-12-06 16:04:50,678 DEBUG [ResourceContainer.invoker.daemon-22]
(org.mc4j.ems.connection.ConnectionFactory)- Searching for library catalina-cluster.jar
2010-12-06 16:04:50,694 DEBUG [ResourceContainer.invoker.daemon-22]
(org.mc4j.ems.connection.ConnectionFactory)- Library dependency resolved C:\Program
Files\Business Objects\Tomcat\server\lib\catalina-cluster.jar
2010-12-06 16:04:50,694 DEBUG [ResourceContainer.invoker.daemon-22]
(org.mc4j.ems.connection.ConnectionFactory)- Searching for library catalina-optional.jar
2010-12-06 16:04:50,709 DEBUG [ResourceContainer.invoker.daemon-22]
(org.mc4j.ems.connection.ConnectionFactory)- Library dependency resolved C:\Program
Files\Business Objects\Tomcat\server\lib\catalina-optional.jar
2010-12-06 16:04:50,709 INFO [ResourceContainer.invoker.daemon-22]
(org.mc4j.ems.connection.ConnectionFactory)- Discovered libraries in 47 ms
2010-12-06 16:04:50,709 INFO [ResourceContainer.invoker.daemon-22]
(jboss.on.plugins.tomcat.TomcatServerComponent)- Loading connection
[service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi] with install path [C:\Program
Files\Business Objects\Tomcat] and temp directory [C:\RHQ\rhq-agent\data\tmp]
2010-12-06 16:04:50,709 DEBUG [ResourceContainer.invoker.daemon-22]
(org.mc4j.ems.connection.ConnectionFactory)- Loading connection class from ClassLoader
[java.net.URLClassLoader@8ee5c0] ConnectionProvider class
[org.mc4j.ems.impl.jmx.connection.support.providers.JMXRemotingConnectionProvider]
2010-12-06 16:04:50,725 INFO [ResourceContainer.invoker.daemon-22]
(ems.impl.jmx.connection.DConnection)- Querying MBeanServer for all MBeans
2010-12-06 16:04:50,725 INFO [ResourceContainer.invoker.daemon-22]
(ems.impl.jmx.connection.DConnection)- Found 400 MBeans, starting load
2010-12-06 16:04:50,740 DEBUG [ResourceContainer.invoker.daemon-22]
(jboss.on.plugins.tomcat.TomcatServerComponent)- Successfully made connection to the
Tomcat Server for resource [C:\Program Files\Business Objects\Tomcat]
The RHQ GUI displays:
- Tomcat Server (with unavailable icon)
- <hostname>:8080 (with unavailable icon)
and that is all.
As auto-discovered
Catalina Home: C:\Program Files\Business Objects\Tomcat
Catalina Base: C:\Program Files\Business Objects\Tomcat
Manager URL: service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi
Any suggestions on what might be wrong?
Al Amyot | Consultant
Sierra Systems
(eHealth): 204-926-4257 (T): 204-942-2575 (F): 204-942-2047
444 St. Mary Avenue, Suite 1050
Winnipeg, MB R3C 3T1
Management Consulting | System Integration | Managed Services
website:
www.SierraSystems.com <
http://www.sierrasystems.com/>
This email and/or any documents in this transmission is intended for the
addressee(s) only and may contain legally privileged or confidential information. Any
unauthorized use, disclosure, distribution, copying or dissemination is strictly
prohibited. If you receive this transmission in error, please notify the sender
immediately and return the original.
Ce courriel et tout document dans cette transmission est destiné à la personne ou aux
personnes à qui il est adressé. Il peut contenir des informations privilégiées ou
confidentielles. Toute utilisation, divulgation, distribution, copie, ou diffusion non
autorisée est strictement défendue. Si vous n'êtes pas le destinataire de ce message,
veuillez en informer l'expéditeur immédiatement et lui remettre l'original.
_______________________________________________
rhq-users mailing list
rhq-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-users
--
Ian Springer
Principal Software Developer
JBoss Operations Network
Red Hat
ian.springer(a)redhat.com
This email and/or any documents in this transmission is intended for the
addressee(s) only and may contain legally privileged or confidential information. Any
unauthorized use, disclosure, distribution, copying or dissemination is strictly
prohibited. If you receive this transmission in error, please notify the sender
immediately and return the original.
Ce courriel et tout document dans cette transmission est destiné à la personne ou aux
personnes à qui il est adressé. Il peut contenir des informations privilégiées ou
confidentielles. Toute utilisation, divulgation, distribution, copie, ou diffusion non
autorisée est strictement défendue. Si vous n'êtes pas le destinataire de ce message,
veuillez en informer l'expéditeur immédiatement et lui remettre l'original.