Tag Archives: jes

Monitoring DSEE6.2 … on ubuntu

After having gotten my DSEE6.2 to run on my ubuntu laptop (with the steps laid out in this previous post), I wanted to see how to monitor the beast. Obviously, you can still write scripts as was not unusual with previous versions or gather statistics through querying “cn=monitor” over the LDAP protocol. I was looking for a more elegant integration with monitoring systems, though.

The first thing you have to realize to get started at all, is that DSEE is part of the Sun Java Enterprise System (JES). So, even if the information about monitoring is missing from the point product’s documentation (for DSEE6.0 and 6.1), you can find it in the JES documentation. Then add a few incompatibilities with ubuntu or bugs if you will (because I cannot see how this would work with any other supported Linux distro and the ZIP distribution of DSEE), and you’ll get a node agent for a host running any JES component which will provide information about server instance through JMX and SNMP.

Essentially, you need this:

0. Install DSEE6.2 to ~/dsee6.2 and configure as previously posted

1. Initialize the JES monitoring framework (mfwk)

2. Enable the monitoring plugin in the DS instances to be monitored

3. Register the DS Module with the node agent

Now for the gory (read: technical) details:

1. Initialize the JES monitoring framework (mfwk)

To use the mfwk scrips (for setup and otherwise) on ubuntu (or at all to some extent), you need to modify them as follows:

mfwksetup.pl (don’t use the shell script):

~/dsee6.2/dsee6/mfwk/bin$ diff -Naurw mfwksetup.pl.orig mfwksetup.pl
--- mfwksetup.pl.orig 2007-11-09 12:02:46.000000000 +0100
+++ mfwksetup.pl 2007-11-09 12:16:58.000000000 +0100
@@ -292,7 +292,7 @@


# Look for Cacao in default location
if ( $MFWK_INSTALL_TYPE eq "tarball" ) {
- $CACAO_RLOC_DIR = "$MFWK_BASEDIR/cacao_2.0";
+ $CACAO_RLOC_DIR = "$MFWK_BASEDIR/cacao_2";
$CACAO_ADM = "$CACAO_RLOC_DIR/cacao/bin/cacaoadm";
$CACAO_HOME = "$CACAO_RLOC_DIR/cacao";
}elsif ( $MFWK_INSTALL_TYPE eq "linux_pkg_default" ){
@@ -333,9 +333,6 @@
$OS_CONF_DIRNAME = "sun/mfwk";
# No installf on Linux
$INSTALLF = "";
- $MFWK_HOME = "$MFWK_BASEDIR/$OS_DIRNAME";
- $MFWK_ETC = "$MFWK_CONF_BASEDIR/etc/opt/$OS_CONF_DIRNAME";
- $MFWK_VAR = "$MFWK_CONF_BASEDIR/var/opt/$OS_CONF_DIRNAME";
$tmp = "/tmp";
if ( $MFWK_INSTALL_TYPE eq "tarball" ) {
$MFWK_CONF_BASEDIR = $MFWK_BASEDIR;
@@ -347,6 +344,9 @@
mLog "Error : unable to determine MFWK_INSTALL_TYPE : [$MFWK_INSTALL_TYPE]";
exit 1;
}
+ $MFWK_HOME = "$MFWK_BASEDIR/$OS_DIRNAME";
+ $MFWK_ETC = "$MFWK_CONF_BASEDIR/etc/opt/$OS_CONF_DIRNAME";
+ $MFWK_VAR = "$MFWK_CONF_BASEDIR/var/opt/$OS_CONF_DIRNAME";


}
################################

download mfwksetup diff

masetup.pl (don’t use the shell script, and remember you cannot install the Master Console on the same host as the node agent):


~/dsee6.2/dsee6/mfwk/bin$ diff -Naurw masetup.pl.orig masetup.pl
--- masetup.pl.orig 2007-11-09 12:15:59.000000000 +0100
+++ masetup.pl 2007-11-09 12:17:14.000000000 +0100
@@ -292,7 +292,7 @@


# Look for Cacao in default location
if ( $MFWK_INSTALL_TYPE eq "tarball" ) {
- $CACAO_RLOC_DIR = "$MFWK_BASEDIR/cacao_2.0";
+ $CACAO_RLOC_DIR = "$MFWK_BASEDIR/cacao_2";
$CACAO_ADM = "$CACAO_RLOC_DIR/cacao/bin/cacaoadm";
$CACAO_HOME = "$CACAO_RLOC_DIR/cacao";
}elsif ( $MFWK_INSTALL_TYPE eq "linux_pkg_default" ){
@@ -333,9 +333,6 @@
$OS_CONF_DIRNAME = "sun/mfwk";
# No installf on Linux
$INSTALLF = "";
- $MFWK_HOME = "$MFWK_BASEDIR/$OS_DIRNAME";
- $MFWK_ETC = "$MFWK_CONF_BASEDIR/etc/opt/$OS_CONF_DIRNAME";
- $MFWK_VAR = "$MFWK_CONF_BASEDIR/var/opt/$OS_CONF_DIRNAME";
$tmp = "/tmp";
if ( $MFWK_INSTALL_TYPE eq "tarball" ) {
$MFWK_CONF_BASEDIR = $MFWK_BASEDIR;
@@ -347,7 +344,9 @@
mLog "Error : unable to determine MFWK_INSTALL_TYPE : [$MFWK_INSTALL_TYPE]";
exit 1;
}
-
+ $MFWK_HOME = "$MFWK_BASEDIR/$OS_DIRNAME";
+ $MFWK_ETC = "$MFWK_CONF_BASEDIR/etc/opt/$OS_CONF_DIRNAME";
+ $MFWK_VAR = "$MFWK_CONF_BASEDIR/var/opt/$OS_CONF_DIRNAME";
}
################################
#setupEnvironmentLinux

download masetup diff

Then run this to initialize the framework:

cd ~/dsee6.2/dsee6/mfwk/bin
./mfwksetup.pl -i

2. Enable the monitoring plugin in the DS instances to be monitored

Read on here.

3. Register the DS Module with the node agent

This is a tricky bit, because it is not documented well (should I say at all?). I assume it just works out of the box with the JES installer. Not so here:

cp ~/dsee6.2/dsee6/etc/opt/sun/mfwk/xml/com.sun.cmm.ds.xml ~/dsee6.2/

Then find this paragraph in the new copy in ~/dsee6.2/:

<parameter>
<!--
Java ES Product Name (exhaustive human readable string identifying the product)
This parameter must be filled and is case sensitive.
This paraneter string MUST be the SAME as the "PRODUCT_NAME_CTX_KEY" provided
at the initialize method (Managed Element Server API) in the instrumented component product.
-->
<param-name>ProductName</param-name>
<param-value>DirectoryServer</param-value>
</parameter>

Change the parameter value to “Directory Server” (notice the blank) and locate this paragraph:

<parameter>
<!--
Java ES Installation Location
This parameter must be filled and is case sensitive.
The String used here MUST be the SAME as the "PRODUCT_COLLECTIONID_CTX_KEY" provided at
the initialize method (Managed Element Server API) in the instrumented component product.
-->
<param-name>InstalledLocation</param-name>
<param-value>/opt/SUNWds</param-value>
</parameter>

Here change the parameter value to the location where your DS installation resides (not the instance path). In our example that would be “/home/<username>/dsee6.2/ds6”. Finally, register the module:

$ ~/dsee6.2/dsee6/cacao_2/cacao/bin/cacaoadm deploy ~/dsee6.2/com.sun.cmm.ds.xml
$ ~/dsee6.2/dsee6/cacao_2/cacao/bin/cacaoadm register-module ~/dsee6.2/com.sun.cmm.ds.xml
$ ~/dsee6.2/dsee6/cacao_2/cacao/bin/cacaoadm stop
$ ~/dsee6.2/dsee6/cacao_2/cacao/bin/cacaoadm start
$ ~/dsee6.2/dsee6/cacao_2/cacao/bin/cacaoadm list-modules
$ ~/dsee6.2/dsee6/mfwk/bin/mfwkadm.orig list-modules

This last command should show a result like the following:

Installed products and their running instances:
==============================================


Instances for installed product: com.sun.cmm.ds:collectionID="/home/username/dsee6.2/ds6",name=Directory Server,type=CMM_InstalledProduct
-------------------------------


//home/username/dsee6-instances/6/com.sun.cmm.ds:name=/home/username/dsee6-instances/6,type=CMM_ApplicationSystem

If the DS shows up as an installed product but no active instance is displayed, then you either have not started your DS instance with the monitoring plugin enabled or have messed up the XML changes for the DS registration with the node agent. Watch out for warnings in the most recent “~/dsee6.2/dsee6/var/opt/sun/mfwk/logs/agent.log.?”. If there is a message about it not knowing what to do with a discovery message, look for a string like this “Directory Server#ds#/home/username/dsee6.2/ds6”. The first bit is the name, the second bit should be ok, the third bit is the installation path. Make sure that is exactly what you have in your XML.

What next?

Fire up jconsole:

jconsole connect

Connect to the cacao agent and start monitoring your directory server:

jconsole monitoring

Next, install the Management Console on another machine as per JES docs.
Then go and write a DS plugin to Nagios or Munin :). Maybe this post by Steffo will be of use to you.

Advertisements
Tagged , , , , , ,

Nokia E61 and Sun Calendar Server … but no Windows

If you’re using Sun Calendar Server (a.k.a. JESCS for “Java Enterprise System Calendar Server) and have tried to synchronize it using anything else but a Windows machine or a SyncML Server, you already know what pain is, for sure. Been doing that a while ago when the connector for evolution was in its infancy. What I tried then was synching my Palm with evolution and trying to select the Sun Calendar as the backend. Well, it didn’t work.

Now that I have received this nice Nokia E61 gadget (how can Apple make the iPhone not have UMTS support?) originally just for use as an UMTS modem I find all those other things you can do with it and decided to revisit calendar synch. I expected to have to move along the lines of my previous attempt and was quite surprised to learn that multisync no longer exists, but has turned into opensync. And opensync has a jescs plugin, yay!

Here’s what I did to make it work:

  1. Install opensync
    On my ubuntu (feisty) system I installed the opensync 0.21 packages from here:
    http://www.in.fh-merseburg.de/~jahn/opensync-0.21/

    The packages I installed are:

    • libopensync-plugin-evolution2
    • libopensync-plugin-file
    • libopensync-plugin-jescs
    • libopensync-plugin-syncml
    • libopensync0
    • opensyncutils
    • msynctool
    • multisync-gui
  2. Configure a synchronization group
    To do that I used multisync-gui and added a synchronization group with a syncml-obex-client and a jescs-sync member. You may want to disable the synchronization of everything but events and todos.The configuration for the jescs-sync member is trivial and looks like this:

    <?xml version=”1.0″?>
    <config>
    <!– Server address with optional port (<server_url>[:<port>]) –>
    <url>calendar-server</url>
    <!– Authentication data –>
    <username>me</username>
    <password>pw</password>
    <!– Notify attendees about event/task deletion ( 0 = no, 1 = yes ) –>
    <del_notify>1</del_notify>
    </config>

    Note that the server is specified without protocol (i.e. “http://&#8221;) prefix.

    The config for the E61 syncml client is a little bit more complex:

    <?xml version=”1.0″?>
    <config>
    <!– (Only for bluetooth) The bluetooth address if the bluetooth mode is selected –>
    <bluetooth_address>00:17:E3:0C:20:F2</bluetooth_address><!– (Only for bluetooth) The bluetooth channel to use. `sdptool browse $MAC` to search for the correct channel –>
    <bluetooth_channel>10</bluetooth_channel>

    <!– (Only for USB) The usb interface number of the SYNCML-SYNC target. use syncml-obex-client -u (you will need access to the USB raw device) to find it. –>
    <interface>0</interface>

    <!– The string that the plugin will use to identify itself. Some devices need a special string here. –>
    <identifier>PC Suite</identifier>

    <!– The syncml version to use: 0 for 1.0, 1 for 1.1 and 2 for 1.2 –>
    <version>1</version>

    <!– if the plugin should use wbxml –>
    <wbxml>1</wbxml>

    <!– The username to use. Leave empty to not require a username –>
    <username></username>

    <!– the password for the username –>
    <password></password>

    <!– sets the connection type to use. 5 means obex over usb, 2 means obex over bluetooth –>
    <type>2</type>

    <!– If wbxml is enabled, defines wether the wbxml should use string tables –>
    <usestringtable>1</usestringtable>

    <!– Never send ADD command, but send REPLACE (not needed normally) –>
    <onlyreplace>0</onlyreplace>

    <!– Workaround around for mobile phones which only use local timestamps and _no_ UTC timestamps! –>
    <onlyLocaltime>0</onlyLocaltime>

    <!– Sets the maximum allowed size in bytes of incoming messages (some device need this option set). Example: 10000 –>
    <recvLimit>0</recvLimit>

    <maxObjSize>0</maxObjSize>

    <!– The name of the contacts db. Must be the same as the phones sends –>
    <contact_db>Contacts</contact_db>

    <!– The name of the calendar db. Must be the same as the phones sends –>
    <calendar_db>Calendar</calendar_db>

    <!– The name of the note db. Must be the same as the phones sends –>
    <note_db>Notes</note_db>
    </config>

  3. Make sure the bluetooth connection works
    A typical thing you may need to do is install bluez-gnome.
  4. Install missing wcaptool script
    This script is missing from the opensync jescs plugin package for feisty. It needs to go to /usr/lib/libopensync-plugin-jescs/wcaptool. Don’t forget to make it executable.
  5. Configure synchronization profile on the E61
    If you don’t have a recipient for your telephone’s Notes in your opensync synchronization group, you should keep the phone from trying to send them. Otherwise the synch was always stalled there and finally timed out. To tell your phone not to send them, you do this:

    • Open Main Menu->Connections->Synchronization
    • Options->New Synchronization Profile (name=test, when asked chose to copy PC Suite profile)
    • Deactivate original PC Suite Profile by selecting it and Options->Edit Synchronization Profile->Connection Settings->Allow Synchronization Requests->No
    • With the newly created one change the name from “test” to “PC Suite” and disable all programs but Calendar
  6. Run synchronization
    Try with msynctool –sync <groupname> first. I’ve had cases where the GUI would not work, but the command line would.

Good luck,

Karl.

Tagged , , , , , , , , , , ,