change in bundle deployment behavior
by John Mazzitelli
There is going to be a change being committed to master branch that
affects the way initial bundle deployments work. I wanted to make a note
of it here in case some folks tried to take advantage of this "buggy"
behavior :)
This is BZ https://bugzilla.redhat.com/show_bug.cgi?id=784124
The problem:
When:
1) you do an INITIAL deployment of a bundle (not upgrading a bundle, but
on the first, initial deployment)
and
2) your bundle recipe's <rhq:deployment-unit> element's attribute
"manageRootDir" is set to true - which is the default if you don't
specify it - see:
http://rhq-project.org/display/JOPR2/Ant+Bundles#AntBundles-rhq%
3Adeploymentunit
and
3) you had files already existing in your bundle destination directory
what happened was we did NOT clear out those "in the way" files sitting
in the destination directory. This was bad behavior because the whole
purpose of this setup is to ensure RHQ fully manages that destination
directory. Files not in your bundle should not be hanging around after
the bundle is laid down.
What we will do now is remove those files from the destination directory
prior to doing the initial deployment (we will backup any deleted files
in case you want them back).
I'll be checking in this fix shortly. We have alot of unit tests in this
area, so I'm feeling pretty confident that nothing else "broke" with
this fix.
12 years, 3 months
Failed adding process
by Milan Tomic
I am using 4.2 version and I got this exception while adding process:
Caused by: java.lang.RuntimeException: Failed to create process based on
plugin config: Configuration[id=0]
at
org.rhq.plugins.platform.ProcessDiscoveryComponent.discoverResource(ProcessDiscoveryComponent.java:55)
what does it mean? How can I fix it?
Thank you in advance,
Milan
12 years, 3 months
Content System - Versioning
by Stefan Negrea
Hello Everybody,
I just want to raise awareness regarding a couple of recent changes to the content system. These details are important for plugin developers that use the content system. If you are working on a server or agent plugin that interacts with the content system I would highly recommend to read this email carefully. Most likely the changes I will detail in this email do not impact existing plugins but I highly recommend a review of existing code to make sure it works as intended and as expected.
The content system stores data in a myriad of tables. The PackageVersion table is the most important because it links package metadata with actual content. Internal RHQ server queries use the version field of this table to uniquely identify a package. The content system can store multiple packages with the same name, but they are uniquely identified by the version. So [ROOT.war version=1.1] is stored only once in the database irrespective if the actual war content is different. Just to give an example, ROOT.war is deployed by default on both JBoss AS4 and JBoss AS5 and discovered by both plugins as [ROOT.war version=0]. The first server that gets inventoried wins the battle to store its ROOT.war content on the RHQ server. When a second application server is inventoried, the RHQ server considers that [ROOT.war version=0] is already stored and does not act on the agent request to store content. These details combined with some agent discovery issues resulted in a set of problems for deploying and retrieving content deployed.
The solution that I proposed and implemented preserves existing server code for the content system. The updates were done to the CLI, UI, three agent plugins (Tomcat, JBoss AS4, JBoss AS5), and four server plugins (remote repository syncing) to populate the version field with something that uniquely identifies that actual content. So, the version field is populated with the SHA256 of the content. After this changes the package [ROOT.war version=[sha256=abcd1234] ] is correctly identified based on its content and not on some arbitrary version. The old version concept was then made optional (in the UI and CLI) and stored in display version field, which was in the design but not used. After these changes a package version data will look like this: [ROOT.war version=[sha256=abcde123] display version=1.1].
Just to recap, your plugin will most likely work the same even after this set of changes. I highly encourage anybody to review their code that interacts with the content system to make sure it does not have the same version problems. Another recommendation would be to update existing code to use SHA256 for version and move the existing version concept to the display version field.
Please feel free to contact me if you have any questions or concerns.
Thank you,
Stefan Negrea
Software Engineer
12 years, 3 months
Invalid key/value for name
by Herbert de Borba
Hello all, it's my first post to this list, don't know if this is the right
place for the question, but I can't find any references to this issue on
the web, so there it goes...
I have a RHQ server that's already working with several agents and is
monitoring some EJBs/EARs between other resources. But when I try to start
this specific agent the log reports this error (agent.log):
<pre>
2012-01-16 16:09:59,818 WARN [ResourceContainer.invoker.daemon-1]
(org.rhq.plugins.jbossas.JBossASServerComponent)- Could not establish
connection to the JBoss AS instance [11] times for resource
[/usr/local/jboss/server/default]
org.mc4j.ems.connection.EmsConnectException:
java.io.StreamCorruptedException:
javax.management.MalformedObjectNameException:
jboss.j2ee:ear=srh-businesscore-ear.ear,jar=srh-businesscore-ejb-1.5.3-SNAPSHOT.jar,name=,service=EJB3
is not a valid ObjectName. Invalid key/value data name
at
org.mc4j.ems.impl.jmx.connection.support.providers.proxy.GenericMBeanServerProxy.invoke(GenericMBeanServerProxy.java:156)
at $Proxy55.queryNames(Unknown Source)
at
org.mc4j.ems.impl.jmx.connection.DConnection.loadSynchronous(DConnection.java:138)
...
</pre>
The agent then is unable to report the correctly running JBossAS to the RHQ
server and it shows it as if the JBossAS is down, what is not the case
since the AS is up and the services it serves are working.
If I undeploy this EAR the problem disapear.
Does someone has any tips on what's going on? What's that name it is
expecting?
Regards.
--
Herbert Mattei de Borba
herbertdeborba(a)gmail.com
12 years, 3 months
Update on REST api
by Heiko W.Rupp
Hi,
it's been a time since I last wrote about the REST api here in the mailing list [1].
Since then a few updates have happened:
- it is now possible to obtain raw metrics via the api to e.g. analyze it in R [2]; the
examples at http://localhost:7080/rest/ have been updated to show graphs for the last 7 days
of raw data using D3.js
- the api allows to push metrics into the server, as well as read/update baseline data [3]
and last but not least we have announced the rhq-samples project [4], which also
features examples of using the REST api.
The existing api methods still sometimes lack proper handling of caching or
conditional get, returning location headers. Any contribution is welcome.
If you want to start diving in here, you could start by allowing to push availabilities
into the server.
Heiko
[1] https://fedorahosted.org/pipermail/rhq-devel/2011-November/001384.html
[2] http://javablogs.com/Jump.action?id=685875
[3] http://javablogs.com/Jump.action?id=689757
[4] http://javablogs.com/Jump.action?id=683200
http://javablogs.com/Jump.action?id=683200
--
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Mark Hegarty, Charlie Peters, Michael Cunningham, Charles Cachera
12 years, 3 months
'Events' not working
by Mike Hepple
Hi all,
I'm having great trouble getting my JBoss AS4 servers to send events
to the RHQ server. I've set up an event source as follows:
Enabled: Yes
Log file path: /opt/jboss/instances/<name>/log/server.log
Includes Pattern: <unset>
Minimum Severity: <unset>
Date Format: dd/MM/yyyy HH:mm:ss,SSS
I then poke my app for a while to produce a log message, e.g.
05/01/2012 10:23:40,329 [ERROR] [ ] [org.apache.myfaces.renderkit.
html.util.MyFacesResourceLoader] Unparsable lastModified : @lastModified@
05/01/2012 10:23:49,347 [ INFO] [jbloggs] [com.myapp.search.SearchServiceImpl]
Search Query: Select id from object where date > 04-01-2012
However, the event screen for this server contains no events, even after a
week.
Appreciate any help you can provide,
Mike
12 years, 3 months