Running and Basic Debug of OpenSAF on Ubuntu

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

Tags: , ,

3 Responses to “Running and Basic Debug of OpenSAF on Ubuntu”

  1. Johan Says:

    Should you really have to create /var/run/opensaf/ yourself? It’s sounds like an OpenSAF bug.

  2. ramreddy Says:

    When i run the SAF module my ubuntu 12.04 is going to reboot , any body have an idea about this plz help me. i am sharing log also for referance.

    sent 8763781 bytes received 5541 bytes 3507728.80 bytes/sec
    total size is 8743307 speedup is 1.00
    Cleaning up (removing *.db *.cor AMF_CHECK* AMF_CKPT* AMS_CKPT*) … done

    /bin/bash /opt/clovis/sdk-6.0/src/SAFplus/build/prerequisites/scripts/prerequisites.sh

    *** Populating platform specific blade image at /home/mrv/wkspaces/V_MRV/platform/open_clovis/target/OP9500/images/i686/linux-3.2.48 with third party prerequisites…
    Cross build detected, using prerequisites from i686-nptl-linux-gnu toolchain
    db sqlite3 gdbm net-snmp pyhpi tipc

    done
    /bin/bash /opt/clovis/sdk-6.0/src/SAFplus/build/instantiate/scripts/instantiate.sh

    Building SCNodeI0. Default Slot: 1. Architecture: i686/linux-3.2.48. Intracluster network: eth1.
    This is a system controller
    Creating file /home/mrv/wkspaces/V_MRV/platform/open_clovis/target/OP9500/images/SCNodeI0/etc/asp.conf
    Creating tarball: /home/mrv/wkspaces/V_MRV/platform/open_clovis/target/OP9500/images/SCNodeI0.tgz
    ~/wkspaces/V_MRV/platform/open_clovis/target/OP9500/images/SCNodeI0 ~/wkspaces/V_MRV/platform/open_clovis/OP9500/build/i686-nptl-linux-gnu
    ~/wkspaces/V_MRV/platform/open_clovis/OP9500/build/i686-nptl-linux-gnu
    No slot defined for node SCNodeI1 in target.conf file
    Skipping node SCNodeI1

    Building PayloadNodeI0. Default Slot: 3. Architecture: i686/linux-3.2.48. Intracluster network: eth1.
    This is a payload blade
    Creating file /home/mrv/wkspaces/V_MRV/platform/open_clovis/target/OP9500/images/PayloadNodeI0/etc/asp.conf
    Creating tarball: /home/mrv/wkspaces/V_MRV/platform/open_clovis/target/OP9500/images/PayloadNodeI0.tgz
    ~/wkspaces/V_MRV/platform/open_clovis/target/OP9500/images/PayloadNodeI0 ~/wkspaces/V_MRV/platform/open_clovis/OP9500/build/i686-nptl-linux-gnu
    ~/wkspaces/V_MRV/platform/open_clovis/OP9500/build/i686-nptl-linux-gnu
    No slot defined for node PayloadNodeI1 in target.conf file
    Skipping node PayloadNodeI1
    No slot defined for node PayloadNodeI2 in target.conf file
    Skipping node PayloadNodeI2
    No slot defined for node PayloadNodeI3 in target.conf file
    Skipping node PayloadNodeI3
    Blade specific tarballs created.
    /bin/bash /opt/clovis/sdk-6.0/src/SAFplus/build/post-images/scripts/post-images.sh
    make: Leaving directory `/home/mrv/wkspaces/V_MRV/platform/open_clovis/OP9500/build/i686-nptl-linux-gnu’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: