Monday, June 30, 2008

RHQ 1.0.1 and JBossON 2.0.1 available



We just released RHQ Version 1.0.1 and JBossOn 2.0.1 in the wild.

Both are bugfix releases and don't add much of new functionality (read: "as in new subsystems") - if you want you can have a look at the closed JIRAs. You will also find a few new features in there :)

You can find the RHQ 1.0.1.GA tag in RHQ svn.

JBoss customers can of course download JBossON 2.0.1 from the customer support portal as usual.

As usual, it is cool to get a release out of the door :-)






Friday, June 27, 2008

Yesterday SIG-JBoss-Meeting about RHQ

Ok, I have to admit, that yesterday wasn't the best day to run a SIG-JBoss meeting
of the Stuttgart Java User Group, as the second semi final of the European Soccer Championship was also yesterday. But then we have seen all three goals on the big screen in a nearby Italian restaurant after the meeting anyway.

In the meeting I went a bit through what RHQ is, how it relates to JBossON, showed the components and then just did a live demo of the whole system.

After that we went through what it takes to develop plugins and showed some code (Yeah man, show me the code :-)

Conclusion was that RHQ, even if still lacking things is already very powerful and that the agent and server infrastructure does a lot for you for free.

My slides can be downloaded here (PDF, German).

If you are interested in RHQ, you can also pass by at the Red Hat booth at Java Forum Stuttgart, where I may be able to demonstrate that (or one of my colleagues).

Wednesday, June 25, 2008

RHQ - tip of the day: Which groups are containing a resource

RHQ has a powerful grouping feature: you can generate groups of resources (of compatible and mixed type).

When you go to the Browse Resources page, you can get a list of compatible and mixed groups and from the inventory of a group see all members of said group. Setting up a lot of groups is even easier with the cool DynaGroups feature.

But what if you want to know all groups that contain a certain resource? Of course, you can look into each group and check if it is there. But this can get boring with lots of groups.

There is an easier solution to that: go to the inventory page of the resource and scroll down. You will find a section "Groups Containing this Resource":



This section shows the names and types of groups where the resource is in, as well as member count and availability of the group.





Technorati Tags:
,


Tuesday, June 24, 2008

RHQ - tip of the day: postgres and login permission

When creating a database and database user for RHQ, Postgres knows two commands to create a user:

create user
and
create role

They both do the same thing and create a database user. The big difference (which may cause you some grey hair) is that create role does not automatically allow log in.

So to create a database user for RHQ, use the create user form. Example:

create user rhqadmin password 'rhqadmin'

If you have further login issues, see also my other posting about "local is not local"







Technorati Tags:


Monday, June 23, 2008

RHQ - tip of the day: is the resource down or the network?

RHQ and JBossON 2, that is built on top of RHQ are distributed systems. The agents managing resources can (and will) live on a different system than the server. So sometimes the question arises when a resource is marked as unavailable if the resource itself is down - or the connection between agent and server.

There is a heartbeat going on between the RHQ agents and the server: the agents are periodically reporting the availability of their managed resources to the server. Now if the server doesn't get those reports for some time, it will report the managed resource as being down. This might have three causes

  • The resource is really down
  • The agent is down
  • The network between agent and server is down
  • Combination of the above


So if a resource is down and you are not sure, go to its inventory tab and scroll to the bottom. There is a section "Agent Managing this Resource":



This shows the availability of the agent and when the last availability report for this resource was received.

If this one shows red, you really should have a look at the machine hosting the agent and the resource.







Technorati Tags:
,


Stuttgart-Lauf

Yesterday I was at the Stuttgart-Lauf again. The track was a little bit longer with 8.2 km than in previous years with 7.6 km.

My result:



Actually I am quite happy with that, as I did not exercise a lot before and the weather was again very hot (32 Degrees Celsius). In my category (age 30-39), there were 425 finishers. Total finisher according to the stats at Mika Timing were 3664 ppl.

The run was fun again, because of the people along the track and also the finish in the Gottlieb-Daimler-Stadion. I think this time was the last time that the finishing line is in the stadium, as there are plans to convert it into a soccer-only arena.

Friday, June 20, 2008

RHQ - tip of the day: Use the skeleton generator to generate plugin skeletons

I wrote in length about writing plugins for RHQ - of course there is still more to know about.

That is why we created the plugin community.

One cool new feature since writing the blog series is the new plugin skeleton generator, that Jason Dobies wrote. While the name of (the generator, not of Jay :-) is a little complicated ("RHQ Plugin Archetype") you don't need to be afraid :)
It is just a maven command that will create all you need.

To use the archetype you first need to download it as indicated on its wiki page.

Then you call it as follows (I am using multiple lines here, but on the shell you need to give that in one line).


$ cd $RHQ/modules/plugins
$ mvn archetype:create -DarchetypeGroupId=org.rhq \
-DarchetypeArtifactId=rhq-plugin-archetype \
-Drhq-plugin-name=test \
-DarchetypeVersion=1.0.0.GA \
-DartifactId=rhq-test-plugin \
-Dversion=1.0.1-SNAPSHOT \
-Dpackage=org.rhq.plugins.test \


This will emit a lot of stuff ending in:

[INFO] Archetype created in dir: /jon/jonHEAD/rhq/modules/plugins/rhq-test-plugin


Note that the version in the -Dversion attribute above must correspond to the version of RHQ that you are using to build the plugin. Otherwise compiling of the plugin will fail.
All options are described on the wiki page. Basically you need two things: artifactId, the name of your plugin, and package, the java package of it.

One caveat: currently (as of 6/20) it is only generating the base directory structure and plugin descriptor, but no Java files. But I am very sure, Jason will fix that soon. And hey, this is open source and the source code is available from svn.

Have fun -- and join us on irc://irc.freenode.net/ in channel #rhq.




Technorati Tags:
, ,


Thursday, June 19, 2008

Java is finally free and open

My colleague Rich Sharples just blogged about it. But as this is so important, it needs to be repeated :-)

So: IcedTea passed the Java TCK. You can get it today in Fedora 9.

See also:

http://digg.com/software/Java_finally_open_and_free

Lilian Angel on IcedTea

IcedTea at Wikipedia

RHQ - tip of the day: Try JBoss ON 2

You surely know by now: JBossON 2 is built on top of RHQ.

JBoss is now providing a free trial version of JBoss ON 2 at http://www.jboss.com/products/jbosson. Sign up at the link provided there and see JBoss ON 2 in action. This also includes plugins for monitoring JBossAS

Support for that trial is through the forums at http://www.jboss.com/index.html?module=bb&op=viewforum&f=285.





Technorati Tags:
,


Reminder: Stuttgart SIG-JBoss meeting about RHQ

This is a reminder about the upcoming Stuttgart SIG-JBoss meeting.



The Stuttgart SIG-JBoss will hold a meeting on June 26th in the premises of Red Hat Germany.

Topic for this meeting is a presentation of RHQ -- and if we have time about how to write plugins.
If you want, bring your laptops, so we can do some installations and fun stuff.

You can view the full (German) announcement at the Stuttgart Java User Group page

Please register as indicated in the announcement page -- registration is free!

Remember: parking space is limited in the vicinity of the office, but U1,U14 and bus 44 stop directly in front of the office.

Wednesday, June 18, 2008

Postgres: local is not local (or how to solve connection issues)

When setting up RHQ and doing some testing around an open bug report, I stumbled once more over the PostgreSQL access configuration. Usually I just configure it and it works, but this time it just did not do what I wanted it to do ... It is not that it is not documented, but as I have seen others fighting here too, I will comment a little.

PostgreSQL use two files that configure who can access the database. The first one, postgresql.conf defines the network interfaces, PostgreSQL is listening on:


#listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all


If this line is commented, as shown it will only listen on TCP sockets on localhost (127.0.0.1) for
IPv4 and IPv6(!) and additionally on a unix domain socket.
If you want to give access to people from another computer, you need to uncomment the listen_address entry and list the respective network interfaces to listen on. Then restart the PostgreSQL server.

The second file is pg_hba.conf. It contains the specific about which user may access which database with which way of connecting and authentication:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
 
# "local" is for Unix domain socket connections only
#local all all trust
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
#host all all ::1/128 trust


When you connect to the database via psql, you are by default using a unix domain socket connection - so the line starting with "local" applies.
If you try to connect via a JDBC driver, as RHQ and JBossON do, the connection will be done via TCP, which means the lines starting with "host" are applicable.

So even if you are successfully able to connect to Postgres via psql, it does not mean, that you can do so via other means or from remote hosts.

So how can you verify the connection setup without first starting your java app? Well, psql allows you to supply a hostname -- if this is there, it will use a TCP connection. Note that if you specify
-h localhost, the connection could go over TCPv6. To force the use of TCPv4 use -h 127.0.0.1.

With the above pg_hba.conf this could look like this:

snert$ psql -h localhost -Urhqadmin -d rhq
psql: FATAL: no pg_hba.conf entry for host "::1", user "rhqadmin", database "rhq", SSL off

This is ok, as the line for ::1/128 was commented out

snert$ psql -h 127.0.0.1 -Urhqadmin -d rhq
Password for user rhq:
Welcome to psql 8.3.3, the PostgreSQL interactive terminal.
rqh=>

Now we succeeded.







Technorati Tags:


RHQ - tip of the day: manual resource discovery

RHQ and JBossON 2 have both the possibility to automatically discover managed resources (see e.g. this posting for some details).

This autodiscovery is running at regular intervals. But sometimes you want to directly add a new managed resource like a freshly installed JBossAS server to your inventory. There are basically two possibilities (besides just waiting for the next autodiscovery to happen):


  • Trigger a manual autodiscovery on the server

  • Give a prompt command on the agent



Lets have a short look at both...

Trigger a manual autodiscovery on the server



In the RHQ-GUI go to the Operations Tab of the platform (=The machine) on which you started the new JBossAS server and click on "Manual Autodiscovery":



On the next page, select "Yes" for detailed discovery and click on "Schedule" below. This will take a few seconds and the just submitted operation will be shown in the history view. When it has finished, go to the Dashboard.

Give a prompt command on the agent



If you have your agent running in foreground and still have the agent commandline available, you can just issue a discovery --full command.

sending> discovery --full
Full discovery run in 4659ms
sending>


When the sending> prompt is back, go to the Dashboard in the GUI.

And Import ..



After you have discovered your resources, you still need to import them into inventory. To do this, go to the Dashboard and the autodiscovery portlet, that will show the resources you just discovered. Click on "Import" as usual:


(Screenshot was taken in JBossON 2)


Technorati Tags:
,


Tuesday, June 17, 2008

RHQ - tip of the day: Metric display is steady

In RHQ and JBossON 2, that is built on top of RHQ,
you have the possibility to graph metrics for (more or less) arbitrary time ranges.

But sometimes the display is not moving and not showing any data that you'd expect to see.

If this is the case, have a look at the time range setting, which are below the graphs:



Here it is fixed to a 1 hour interval between 10:31am on jun 16th to 11:31am on the same day.
This means that RHQ will all over the place only show metric data for this 1 hour timerange.

To get things "dynamic" again, just select the "Last x hours" radio button and click on "redraw".





Technorati Tags:
,


Monday, June 16, 2008

RHQ - tip of the day: sync your clocks

RHQ and JBossON 2, that is built on top of RHQ are distributed systems. The agents can (and will) live on a different system than the server.

Metric data that is gathered on the agents will be sent to the server and stored in the database. Now if you want to e.g. compare metrics from two different sources (e.g. the load of two JBossAS servers in a cluster), you can only make sense out of it when the metrics have been taken at the same time (a few seconds usually don't hurt, but if it is more, you will see a peek on one server at one time and a peek on the other server at the other time. This will make you wonder why your load balancer was distributing the load in strange ways. In reality the peeks were at the same time and the system was working as it should.



In the above image you see on the left side two peaks that obviously are not occurring at the same time. On the right with synchronized clocks, you see that those peaks, even at different level, occurred simultaneously.


Another issue that we have seen in the past is that metrics were not showing at all on the GUI and users were thinking that something is broken or that the agent did not collect data (especially directly after install). The cause to that was that that the agent clock was so far in the past or in the future that its values just well outside of the displayed time range.



You won't see metric data of an agent after it started when its clock is 2h away from the master clock with this setting of a display range of 1 hour.




Technorati Tags:
,


Friday, June 06, 2008

Good SIG meeting about jBPM (updated)

[ update: it is not jBPM 3.3 as I have written previously, but rather 3.2.3.
Also I added a link to the slides and the specific pages on the camunda home page ]


Yesterday we held a SIG JBoss meeting within the Java User Group Stuttgart.
Bernd Rücker from camunda gave a presentation about Business process simulation with jBPM.



First he introduced into business process management itself and then into jBPM, which was good as most of the over 20 attendees did not yet know about it.



Afterwards he was talking about statistics and simulation basics, how he married DESMO-J with jBPM and showed a live demo.

And you know the best?
His work has been committed to the jBPM repository, so version 3.2.3 (if it gets ever released) will contain it.

I would also like to thank Red Hat Germany for providing the location for that meeting.

The slides are available at http://www.camunda.com/content/publikationen/ruecker-jbpm-simulation.pdf

Introduction into BPS with jBPM

jBPM home page