Posts Tagged ‘OpenSAF’

Running and Basic Debug of OpenSAF on Ubuntu

March 1, 2010

So now that you’ve installed OpenSAF and probably tried to run it and found that it didn’t work. I had to reverse engineer the startup scripts to figure out basic debug so let me share it here so you do not have to.

OpenSAF config files are located at /etc/opensaf.

All programs write basic logging to stdout and stderr which is redirected to /var/lib/opensaf/stdouts.

I set my rde.conf and nodeinit.conf correctly (see the README file in the openSAF distro) and got the following error:


/etc/init.d/opensafd start
Thu Feb 25 14:21:18 EST 2010 - Starting Node Initialization Daemon: /usr/local/lib/opensaf/ncs_nid
Starting TIPC service... Done.
Starting RDF service... Failed
Timed-out for response from:RDF

Going for recovery
Starting RDF service… Failed
Timed-out for response from:RDF

Going for recovery
Starting RDF service… Failed
Timed-out for response from:RDF

Starting RDF service… Failed
Timed-out for response from:RDF

Starting RDF service… Failed
Timed-out for response from:RDF

Looking in the rde console dump file gave something useful:
cat /var/lib/opensaf/stdouts/ncs_rde
/usr/local/lib/opensaf/ncs_rde: error while loading shared libraries: libSaAmf.so.0: cannot open shared object file: No such file or directory

Ok, well OpenSAF was installed to the standard location so I did:
export LD_LIBRARY_PATH=/usr/local/lib

Then I shutdown the tipc communications since OpenSAF likes to start it itself
rmmod tipc

So I tried again, still no luck. This time it just hangs at Starting RDF, but the stdout file was pretty clear:
cat /var/lib/opensaf/stdouts/ncs_rde
PID file : /var/run/opensaf/rde.pid
Shelf number : 2
Slot number : 1
Site number : 1
Log level : 5
Interactive mode : FALSE
(null): pidfile /var/run/opensaf/rde.pid open failed

So I did:
mkdir /var/run/opensaf/

And tried again.

root@tormalin:/# /etc/init.d/opensafd start
Thu Feb 25 15:05:19 EST 2010 - Starting Node Initialization Daemon: /usr/local/lib/opensaf/ncs_nid
Starting TIPC service... Done.
Starting RDF service... Done.
RDF-ROLE for this System Controller is: 0, ACTIVE
Starting DTSV service... Done.
Starting HLFM service... Done.
Starting IMMD service... Done.
Starting IMMND service... Done.
Starting LOGD service... Done.
Starting NTFD service... Done.
Starting EDSV service... Done.
Starting SCAP service... Done.
Node Initialization Successful.
SUCCESSFULLY SPAWNED ALL SERVICES!!!
Thu Feb 25 15:05:54 EST 2010 - OpenSAF Service Initialization Success

And it worked!

Advertisements