We've upgrade our Suse Linux 2.6.5 system to STAF 3.1.5 from 3.1.2. The STAF service came up fine (see attached STAF LOCAL VAR LIST result below). We also kept our old STAF.cfg (see below)
However, when we issue the following command, STAF is unable to create the temp file for STDOUT. Any ideas?:
wormhole:~ # STAF local PROCESS START SHELL COMMAND "/usr/bin/env" wait returnstdout stderrtostdout
Error submitting request, RC: 10
Additional info
---------------
Temp file creation failed for STDOUT, OSRC: 2
I see that your STAF data directory is /tmp/logs/staf.
Is there a tmp sub-subdirectory contained within it? e.g. /tmp/logs/staf/tmp
If not, what directories does this directory contain? When STAFProc starts, it deletes and recreates a tmp sub-directory in the STAF data directory (to get rid of any temporary files). If not, check your permissions to make sure that STAF can delete and create directories in this directory.
In STAF 3.1.5, there was a bug fix to fix a problem where temporary files were being created in the root of the STAF data directory, instead of in it's tmp sub-directory.
I'll verify that this is working on one of my Linux machines when specifying a data directory (e.g. when not using the default STAF data directory of /usr/local/staf/data/STAF).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This problem only occurs if overriding the default data directory. It is occurring because the STAF PROCESS service (an internal STAF service) is obtaining the data directory when the PROCESS service is initialized. However, at that time, the STAF config file has not yet been processed so your "SET DATADIR /tmps/logs/staf" line in the STAF.cfg file that overrides the data directory location has not been processed yet. Please open a bug.
As a temporary workaround (until a fix for this bug is provided), you could create a directory path named data/<STAFInstanceName>/tmp where you installed STAF. For example, if you installed STAF to /usr/local/staf and you're using the default STAF instance name of STAF, then create directory /usr/local/staf/data/STAF/tmp (and make sure that STAFProc has permissions to write to that directory). Then the PROCESS service should be able to create temporary files used for STDOUT/STDERR.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I opened Bug #1556715 "Process temp file creation fails if override default DataDir" for you so you don't have to.
Note that creating a STAF bug is easy. From the main STAF SourceForge webpage (http://staf.sourceforge.net), simply select "Submit new bug" from the menu on the left and fill in the data describing the bug.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We've upgrade our Suse Linux 2.6.5 system to STAF 3.1.5 from 3.1.2. The STAF service came up fine (see attached STAF LOCAL VAR LIST result below). We also kept our old STAF.cfg (see below)
However, when we issue the following command, STAF is unable to create the temp file for STDOUT. Any ideas?:
wormhole:~ # STAF local PROCESS START SHELL COMMAND "/usr/bin/env" wait returnstdout stderrtostdout
Error submitting request, RC: 10
Additional info
---------------
Temp file creation failed for STDOUT, OSRC: 2
--------------
> staf local var list
STAF/Config/BootDrive : /
STAF/Config/CodePage : ANSI_X3.4-1968
STAF/Config/ConfigFile : /usr/local/staf/bin/STAF.cfg
STAF/Config/DefaultAuthenticator: none
STAF/Config/DefaultInterface : tcp
STAF/Config/InstanceName : STAF
STAF/Config/Machine : wormhole
STAF/Config/MachineNickname : wormhole
STAF/Config/Mem/Physical/Bytes : 0
STAF/Config/Mem/Physical/KB : 0
STAF/Config/Mem/Physical/MB : 0
STAF/Config/OS/MajorVersion : 2.6.5-7.244-smp
STAF/Config/OS/MinorVersion : #1 SMP Mon Dec 12 18:32:25 UTC 2005
STAF/Config/OS/Name : Linux
STAF/Config/OS/Revision : i686
STAF/Config/Sep/Command : ;
STAF/Config/Sep/File : /
STAF/Config/Sep/Line :
STAF/Config/Sep/Path : :
STAF/Config/STAFRoot : /usr/local/staf
STAF/Config/StartupTime : 20060907-11:11:51
STAF/DataDir : /tmp/logs/staf
STAF/Env/_ : /usr/local/staf/bin/STAFProc
STAF/Env/CLASSPATH : /usr/local/staf/lib/JSTAF.jar:
STAF/Env/COLUMNS : 80
STAF/Env/CONSOLE : /dev/console
STAF/Env/DO_CONFIRM :
STAF/Env/HOME : /
STAF/Env/INIT_VERSION : sysvinit-2.85
STAF/Env/kscripts : 45
STAF/Env/LD_LIBRARY_PATH : /usr/local/staf/lib:
STAF/Env/LINES : 25
STAF/Env/MACHINE_TYPE : DELL2650
STAF/Env/PATH : /usr/lib/java/jre/bin:/usr/local/staf/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
STAF/Env/PREVLEVEL : N
STAF/Env/progress : 25
STAF/Env/PWD : /
STAF/Env/REDIRECT : /dev/tty1
STAF/Env/resume : /dev/sda6
STAF/Env/RUNLEVEL : S
STAF/Env/SHELL : /bin/sh
STAF/Env/SHLVL : 2
STAF/Env/splash : silent
STAF/Env/sscripts : 45
STAF/Env/STAFCONVDIR : /usr/local/staf/codepage
STAF/Env/TERM : linux
STAF/Version : 3.1.5
------ STAF.cfg ---------
# Turn on tracing of internal errors and deprecated options
trace enable tracepoints "error deprecated"
# Enable TCP/IP connections
interface tcp library STAFTCP
# Set default local trust
TRUST LEVEL 5 DEFAULT
SET DATADIR /tmp/logs/staf
# Default Service Loader Service
serviceloader library STAFDSLS
SERVICE STAX LIBRARY JSTAF EXECUTE {STAF/Config/STAFRoot}/services/STAX.jar \
OPTION JVMName=STAX OPTION JVM=/usr/lib/java/jre/bin/java \
OPTION J2=-Xmx512m
SERVICE Event LIBRARY JSTAF EXECUTE {STAF/Config/STAFRoot}/services/STAFEvent.jar \
OPTION JVMName=STAX
I see that your STAF data directory is /tmp/logs/staf.
Is there a tmp sub-subdirectory contained within it? e.g. /tmp/logs/staf/tmp
If not, what directories does this directory contain? When STAFProc starts, it deletes and recreates a tmp sub-directory in the STAF data directory (to get rid of any temporary files). If not, check your permissions to make sure that STAF can delete and create directories in this directory.
In STAF 3.1.5, there was a bug fix to fix a problem where temporary files were being created in the root of the STAF data directory, instead of in it's tmp sub-directory.
I'll verify that this is working on one of my Linux machines when specifying a data directory (e.g. when not using the default STAF data directory of /usr/local/staf/data/STAF).
This problem only occurs if overriding the default data directory. It is occurring because the STAF PROCESS service (an internal STAF service) is obtaining the data directory when the PROCESS service is initialized. However, at that time, the STAF config file has not yet been processed so your "SET DATADIR /tmps/logs/staf" line in the STAF.cfg file that overrides the data directory location has not been processed yet. Please open a bug.
As a temporary workaround (until a fix for this bug is provided), you could create a directory path named data/<STAFInstanceName>/tmp where you installed STAF. For example, if you installed STAF to /usr/local/staf and you're using the default STAF instance name of STAF, then create directory /usr/local/staf/data/STAF/tmp (and make sure that STAFProc has permissions to write to that directory). Then the PROCESS service should be able to create temporary files used for STDOUT/STDERR.
I've never open a bug before so it'll be a challenge.
In the mean time I'll use the default (which don't set the DATADIR
I opened Bug #1556715 "Process temp file creation fails if override default DataDir" for you so you don't have to.
Note that creating a STAF bug is easy. From the main STAF SourceForge webpage (http://staf.sourceforge.net), simply select "Submit new bug" from the menu on the left and fill in the data describing the bug.