#1466 Unable to issue STAF commands on a X86_64 redhat 5.8 system

Unix::Linux
closed-invalid
STAFProc (180)
7
2014-12-22
2012-07-27
bfurey
No

Hi

I've installed STAF 3.4,10 on a clean red hat 5.8 64-bit deployment

gunzip STAF3410-linux-amd64.tar.gz
tar -xvf STAF3410-linux-amd64.tar
cd staf
./STAFInst

I'm using the file : STAF3410-linux-amd64.tar.gz and deploying via a Putty SSH session

The STAF installation ran successfully

I launched STAF via ./startSTAFProc.sh

STAF launches successfully

Machine : dslvm449.mul.ie.ibm.com
Machine nickname : dslvm449.mul.ie.ibm.com
Startup time : 20120727-11:44:44

STAFProc version 3.4.10 initialized

Successfully registered STAF, Thank you!

and STAF is running

ps -ef | grep STAFProc
root 5323 1 0 11:44 pts/1 00:00:00 /usr/local/staf/bin/STAFProc
root 5392 5346 0 11:52 pts/2 00:00:00 grep STAFProc

However, I am unable to issue any STAF commands on the machine
[root@dslvm449 staf]# staf local ping ping
-bash: staf: command not found
[root@dslvm449 staf]# cd bin
[root@dslvm449 bin]# staf local ping ping
-bash: staf: command not found
[root@dslvm449 bin]# staf local ping ping
-bash: staf: command not found
[root@dslvm449 bin]# /usr/local/staf/bin/staf local ping ping
/usr/local/staf/bin/staf: error while loading shared libraries: libSTAF.so: cannot open shared object file: No such file or directory

From an external machine I do get a PONG response when I ping the machine via
STAF dslvm449.ul.ie.ibm.com ping ping

I understand that the issue is likely path related but I expected this to work of an "out of the box" deployment

uname -a
Linux dslvm449.mul.ie.ibm.com 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

install.properties
version=3.4.10
platform=linux-amd64
architecture=64-bit
installer=STAFInst
file=STAF3410-linux-amd64.tar
osname=Linux
osversion=*
osarch=amd64

java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-52)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@dslvm449 staf]# cd /usr/local/staf/lib
[root@dslvm449 lib]# ls -la
total 3812
drwxrwxr-x 19 root root 4096 Jul 27 11:44 .
drwxrwxr-x 9 root root 4096 Jul 27 11:51 ..
drwxrwxr-x 2 root root 4096 Jul 27 11:44 IPv4
drwxrwxr-x 2 root root 4096 Jul 27 11:44 IPv6
-r--r--r-- 1 root root 89577 Jul 27 11:44 JSTAF.jar
-r--r--r-- 1 root root 89577 Jul 27 11:44 JSTAF.zip
-r-xr-xr-x 1 root root 1548248 Jul 27 11:44 libcrypto.so.0.9.8
-r-xr-xr-x 1 root root 69541 Jul 27 11:44 libJSTAFSH.so
-r-xr-xr-x 1 root root 101672 Jul 27 11:44 libJSTAF.so
lrwxrwxrwx 1 root root 39 Jul 27 11:44 libPLSTAF.so -> /usr/local/staf/lib /perl58/libPLSTAF.so
-r-xr-xr-x 1 root root 315470 Jul 27 11:44 libssl.so.0.9.8
-r-xr-xr-x 1 root root 30068 Jul 27 11:44 libSTAFDSLS.so
-r-xr-xr-x 1 root root 46318 Jul 27 11:44 libSTAFEXECPROXY.so
-r-xr-xr-x 1 root root 52084 Jul 27 11:44 libSTAFLIPC.so
-r-xr-xr-x 1 root root 287590 Jul 27 11:44 libSTAFLog.so
-r-xr-xr-x 1 root root 124677 Jul 27 11:44 libSTAFMon.so
-r-xr-xr-x 1 root root 231701 Jul 27 11:44 libSTAFPool.so
lrwxrwxrwx 1 root root 35 Jul 27 11:44 libSTAF.so -> /usr/local/staf/lib/I Pv4/libSTAF.so
lrwxrwxrwx 1 root root 38 Jul 27 11:44 libSTAFTCP.so -> /usr/local/staf/li b/IPv4/libSTAFTCP.so
-r-xr-xr-x 1 root root 515147 Jul 27 11:44 libSTAFZip.so
-r-xr-xr-x 1 root root 98106 Jul 27 11:44 libSTAFZlib.so
lrwxrwxrwx 1 root root 39 Jul 27 11:44 libTCLSTAF.so -> /usr/local/staf/li b/tcl84/libTCLSTAF.so
drwxrwxr-x 2 root root 4096 Jul 27 11:44 perl510
drwxrwxr-x 2 root root 4096 Jul 27 11:44 perl512
drwxrwxr-x 2 root root 4096 Jul 27 11:44 perl514
drwxrwxr-x 2 root root 4096 Jul 27 11:44 perl58
-r--r--r-- 1 root root 860 Jul 27 11:44 pkgIndex.tcl
-r--r--r-- 1 root root 3310 Jul 27 11:44 PySTAFLog.py
-r--r--r-- 1 root root 1260 Jul 27 11:44 PySTAFMon.py
-r--r--r-- 1 root root 30203 Jul 27 11:44 PySTAF.py
lrwxrwxrwx 1 root root 38 Jul 27 11:44 PYSTAF.so -> /usr/local/staf/lib/py thon22/PYSTAF.so
-r--r--r-- 1 root root 29988 Jul 27 11:44 PySTAFv3.py
drwxrwxr-x 2 root root 4096 Jul 27 11:44 python22
drwxrwxr-x 2 root root 4096 Jul 27 11:44 python23
drwxrwxr-x 2 root root 4096 Jul 27 11:44 python24
drwxrwxr-x 2 root root 4096 Jul 27 11:44 python25
drwxrwxr-x 2 root root 4096 Jul 27 11:44 python26
drwxrwxr-x 2 root root 4096 Jul 27 11:44 python27
drwxrwxr-x 2 root root 4096 Jul 27 11:44 python30
drwxrwxr-x 2 root root 4096 Jul 27 11:44 python31
-r--r--r-- 1 root root 8005 Jul 27 11:44 STAFHTTPSLS.jar
-r--r--r-- 1 root root 3523 Jul 27 11:44 STAFLog.tcl
-r--r--r-- 1 root root 1575 Jul 27 11:44 STAFMon.tcl
-r--r--r-- 1 root root 54318 Jul 27 11:44 STAFUtil.tcl
drwxrwxr-x 2 root root 4096 Jul 27 11:44 tcl84
drwxrwxr-x 2 root root 4096 Jul 27 11:44 tcl85
drwxrwxr-x 2 root root 4096 Jul 27 11:44 tcl86

Related bug : https://sourceforge.net/projects/staf/forums/forum/104046/topic/5079167

Based on the FAQ, I should be OK as I have logged into a ssh session
3.3.12.

When logged into the desktop on RHEL4-U4, if I run "STAFProc" or "STAF", I get "error while loading shared libraries: libSTAF.so".

This error "error while loading shared libraries: libSTAF.so: cannot open shared object file: No such file or directory" means that the STAF libraries (including libSTAF.so) could not be found. These libraries are usually located in /usr/local/staf/lib, and the environment variable LD_LIBRARY_PATH should include this directory so that the libraries are found. Normally you would either use the STAF InstallAnywhere installer to install STAF, which will automatically update /etc/profile with the required environment variables (including LD_LIBRARY_PATH) or you would manually edit /etc/profile and set the environment variables.

However, as of RHEL4-U4, when logging into the desktop, any references to LD_LIBRARY_PATH in /etc/profile will be ignored. This means that after logging into the RedHat deskop, all of the required STAF environment variables (PATH, CLASSPATH, etc) will be set except for LD_LIBRARY_PATH, which will cause this error. To correct this, after logging in to the desktop, you can source the profile . ./etc/profile or run the STAFEnv script . ./usr/local/staf/STAFEnv.sh.

Note that this problem will only occur when logging in directly to the RHEL4-U4 desktop. If you telnet or ssh to a RHEL4-U4 machine, all the environment variables in /etc/profile (including LD_LIBRARY_PATH) will be correctly set.

Discussion

  • bfurey

    bfurey - 2012-07-27
    • priority: 5 --> 7
     
  • bfurey

    bfurey - 2012-07-27
    • assigned_to: nobody --> slucas
     
  • Sharon Lucas

    Sharon Lucas - 2012-07-27

    You installed STAF using the STAF3410-linux-amd64.tar.gz installer file and STAFInst. When you install STAF using this install method, it does not set any STAF environment variables (unlike when using a STAF InstallAnywhere installer file, e.g. STAF3410-setup-linux-amd64.bin). This is talked about in section "1.3 STAFInst" in the STAF Installer Guide at http://staf.sourceforge.net/current/STAFInstall.pdf as follows:

    "STAFInst will install all files required to run STAF, however, it will not perform some installation steps that InstallAnywhere performs, such as updating user profiles for environment variable updates."

    So, when you tried to use the "staf" executable to submit a STAF service request, it tells you that it can't find the "staf" command because none of your STAF environment variables are set in the terminal from which you submitted the STAF service request:

    [root@dslvm449 staf]# staf local ping ping
    -bash: staf: command not found

    You need to set the STAF environment variables as they are required to use STAF. STAF provides a STAFEnv.sh file that you can use to set the STAF environment variables in a terminal. So, try runnging the following to see if this resolves the problem that you are seeing:

    # cd /usr/local/staf
    # . ./STAFEnv.sh
    # staf local ping ping

    See Section "7. Environment Variable Settings" in the STAF Installation Guide for more information.

    Instead of needing to source STAFEnv.sh to set these environment variables yourself, you may want to set these environment variables for the system so that they are always set even after logging out or rebooting. Or, you may want to use a STAF InstallAnywhere file to install STAF as it can update user profiles to set the STAF environment variables.

    Brendan verified that running . ./STAFEnv.sh resolved the issue so I'm closing this bug.

     
  • Sharon Lucas

    Sharon Lucas - 2012-07-27
    • status: open --> closed-invalid
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks