Hi guys,
i am facing some challenges on configuring the STAF.cfg file on ubuntu 14.04.Suppose i have my ip id is 129.168.254.1 and i want to run the test on 129.168.254.19 IP address.So can you please share me the details for configuring STAF and how to use this on this platform.I had installed on Ubuntu and Windows.i can start the process on bth machine but i do not know how to proceed from there.So please guide me.
--
Thanks and Regard
RAJNIKANT
Hi Sharon Lucas
i went through few of the tickets found you answered almost all of the query,can u please guide me,i had completed installation and other process but not not able to configure and use STAF/STAX.If you can please guide me.it might be silly of me but i want to learn.
Thanks
Rajnikant
Hi Guys
no one in this group is active,its been more tha two days.no one has come forward to clear my issues.What i thought is this roup/forum is very interactive.Still i am looking for solution if any one there please help me out.On windows there is no problem but in ubuntu DATA folder is missing.So,when i give command from root directory of staf folder "STAF local PING PING".it says STAF folder is not found.
Thanks
Rajnikant
I usually respond pretty promptly to questions posted on week days, not so much on the weekends and you posted this on Saturday.
Were you able to start the STAFProc daemon on the Ubuntu system successfully? For example, you can start STAFProc using the startSTAFProc.sh shell script provided in /usr/local/staf (assuming that's where you installed STAF). Wait a few seconds or so and then look at the STAFProc output in the nohup.out file to see if STAFProc started successfully. If it didn't, please post the exact error messages. For example:
Once you have verified that STAFProc started successfully (by checking for message "STAFProc version 3.4.222 initialized" in the STAFProc output file), then you can try submitting a STAF service request like "STAF local PING PING". First, verify that the STAF environment variables are set. If you used a STAF InstallAnywhere file to install STAF and used the default value for setting the environment variables for the system, and opened a new terminal after running the install (or rebooted the system), then, for example, the PATH environment variable should contain the STAF bin directory (e.g. /usr/local/staf/bin). You can verify if the STAF environment variables were set correctly as follows:
If the STAF environment variables are not set in your terminal, then you need to set them which you can do by running the STAFEnv.sh script as follows:
And then verify that the STAF environment variables are set correctly.
Now you should try submitting a STAF service request.
If it does not return PONG in the result, post the exact error message. I don't know what you mean by "STAF folder is not found".
And if it still isn't working, in addition to posting the exact error message that you get, which installation file did you use to install STAF on your Ubuntu system? For example, did you use STAF3422-setup-linux-amd64.bin, STAF3422-setup-linux-amd64-NoJVM.bin, or STAF3422-linux-amd64.tar.gz (or another STAF installation file)? Note that if you use the tar.gz file then you have to run STAFInst to install STAF after you untar the file and you have to set the STAF environment variables yourself (e.g. which you can do using the setEnv.sh file). See the STAF Installation Guide at http://staf.sourceforge.net/current/STAFInstall.pdf for more detailed information.
Hopefully now that you've set the STAF environment variables you can now successfully submit a "STAF local PING PING" request.
In regards to your original question, if from machine 129.168.254.1 you wanted to submit a STAF service request on machine 129.168.254.19, then you would do that as follows for example:
A STAF PING request only requires STAF trust level 1 (and the default STAF trust level is 3, unless you change the default STAF trust level in the STAF.cfg file). So, if you wanted to use the STAF PROCESS service's START request to run a test on machine 129.168.254.19, then that machine would have to give trust level 5 (the highest trust level) to the machine (129.168.254.1) that is submitting the PROCESS START request to it. You could do this by adding the following line to machine 129.168.254.19's STAF.cfg file:
You would also have to shutdown STAF and restart it on machine 129.168.254.19 for the change to its STAF.cfg file to take effect.
Or, if you wanted to give trust level 5 to any machine whose IP address starts with 129.168.254, you could add the following line to machine 129.168.254.19's STAF.cfg file where * indicates to match any characters:
Or you could change the default trust level to 5 which means that it gives the highest STAF trust level to any machine.
Then you should be able to run your test (or any command) on machine 129.168.254.19 by submitting a STAF PROCESS START request from machine 129.168.254.1. For example, the following uses a PROCESS START request to run command"ls /tmp" on machine 129.168.254.19 to list the contents of directory /tmp (assuming it is a Unix system, or if it is Windows, could run "dir C:\temp").
Last edit: Sharon Lucas 2015-08-25
Hi Sharon
Thank you for your reply.I went through your mail and tried to
understand and i am copying the scenario here:
attaching some screen shot,please have a look.
Windows.Please have a look at screenshot for details.
3.In which machine i can run GUI(graphical user interface),windows or
ubuntu and how.
4.How can i use STAF for remote(geographically separted) testing if i know
the IP address of guest machine.Please can you share some sample of testing
in real time.
5.In which folder result is saved in case of both machine(Win/Ubuntu).
Thanks
Rajnikant
On 24 August 2015 at 21:37, Sharon Lucas slucas@users.sf.net wrote:
--
Thanks and Regard
RAJNIKANT
Related
Support Requests: #184
Hi sharon
i had used STAF3422-setup-linux-amd64.bin and STAF3422-linux-amd64.tar.gz
both of them ,one by one after un installing 1st one. It did not work out
in both the cases.So,please guide me.
And i had posted images in my previous mail,please have a look.And i went
through all these sategs,still it is not working:
[root@staf1g staf]# pwd
/usr/local/staf
[root@staf1g staf]# . ./STAFEnv.sh
[root@staf1g staf]#
I had posted question previously which i did not got answer.
Thanks
Rajnikant
On 25 August 2015 at 20:09, Rajnikant rajni123456@users.sf.net wrote:
--
Thanks and Regard
RAJNIKANT
Related
Support Requests: #184
Here are my answers to your questions:
There aren't any screenshot attachments for this support request. Click on the "Add attachments" option to add a screenshot attachment.
Were you able to start STAFProc successfully on Ubuntu? I'm guessing you weren't which is why there isn't a /usr/local/staf/data directory.
There aren't any screenshot attachments for this support request. Click on the "Add attachments" option to add a screenshot attachment.
What GUI are you referring to?
In my previous post I provided an example of how to set up STAF trust so that you can use the STAF PROCESS START request to run a command (e.g. test) on a remote machine.
What "result" are you referring to?
Here are my suggestions for getting STAF installed on your Ubuntu 64-bit system:
You said "I had used STAF3422-setup-linux-amd64.bin and STAF3422-linux-amd64.tar.gz
both of them, one by one after un-installing 1st one. It did not work out in both the cases."
I need more information than "it did not work out". What specifically did not work and what was the exact error mesage? Can you try installing using STAF3422-setup-linux-amd64.bin again. Does the install complete successfully? If not what is the exact error message?
If STAF installed successfully, reboot (or open a new terminal window), and start STAFProc as I talked about in my previous post. Check the nohup.out file to see if it started successfully. If it did not start successfully, post the exact error messages.
Hi
somehow attachment is not going thorugh,so i am attaching here,please have a look.
Thanks
Rajnikant
I looked at your attachments and you are getting RC 21 submitting a STAF service request on your Ubuntu system because STAFProc has not been successfully started.
As I requested previously, you need to provide me with the contents of the nohup.out file (this is where startSTAFProc.sh logs the STAFProc output) so I can see what error is being logged.
For example, start STAFProc using the startSTAFProc.sh shell script provided in /usr/local/staf (assuming that's where you installed STAF). Wait a few seconds or so and then look at the STAFProc output in the nohup.out file (the message will tell you where it wrote the nohup.out file) to see if STAFProc started successfully. If it didn't, please post the exact error messages (e.g. "cat nohup.out" will show the file's contents). For example:
Here is the STAFProc output in the nohup.out file when started successfully on my Linux system:
Hi Sharon
i went through the steps u had mentioned me in the above mail.I am
going to write mail with image:
I am explaining the procedure of windows system:as soon as system
bootup,STAFProcess start automatically.1st attachment is screenshot of
startSTAFproc.
[image: Inline images 2]
2nd attachment is of all the files and documents are present under STAF
folder.
[image: Inline images 1]
3.3rd attachment is of STAF.cfg
[image: Inline images 3]
When i ping local machine,got response pong:
[image: Inline images 5]
But when i tried to ping other machine on same network,it is getting
timeout.even other machine(ubuntu) also have STAFF installed(with some
issues).
[image: Inline images 6]
6.When uninstalled and installed again it is throwing error as "Error
submitting request,RC: 16".
[image: Inline images 7]
& jre 7 were installed) and after making changes in cfg file i restarted
the system as well.I did whatever i could.
Note: the above explanation is for windows machine.So now please give me
the correct steps for working STAF on windows.
Thanks
Rajnikant
On 25 August 2015 at 23:43, Sharon Lucas slucas@users.sf.net wrote:
--
Thanks and Regard
RAJNIKANT
Related
Support Requests: #184
Last edit: Rajnikant 2015-08-26
You are getting RC 16 when trying to submit a STAF PING request to machine 192.168.19.110 because STAFProc is not running on machine 192.168.19.110.
I need to see the error message that is being logged when your try to start STAFProc on Ubuntu using startSTAFProc.sh. The errors are logged in the nohup.out file. Your screenshot that you previously provided (startSTAFProc.png) indicated that the nohup.out file it is writing to is located in /home/rajinikant:
Try starting STAFProc using ./startSTAFProc.sh (as shown above), read where it tells you it is putting the nohup.out file and then provide me with the output written to nohup.out.
If you still can't find the nohup.out file, then try starting STAFProc as follows on your Ubuntu system as it will write the STAFProc output to the terminal (instead of to the nohup.out file) and then you can send me it:
Hi sharon
now everything seems to fine on my machine,STAFProc environment is setup properly and startSTAFProcess is also working,Folder Data which was previously missing is now present and nohup.out file is also present in my staf directory.
root@UIPL05:/usr/local/staf# tail nohup.out
Machine : UIPL05
Machine nickname : UIPL05
Startup time : 20150826-20:33:48
STAFProc version 3.4.22 initialized
20150826-20:37:57;140583819794176;00000100;Received signal 15 (SIGTERM)
STAFProc ending normally
root@UIPL05:/usr/local/staf#
but one thing i did not understand i used before also same steps for installation,that time data folder and nohup.out file was missing this time installation works well.
i have one more question,can you please clarify me the meaning of all these statement:
Turn on tracing of internal errors and deprecated options
trace enable tracepoints "error deprecated"
Enable TCP/IP connections
interface ssl library STAFTCP option Secure=Yes option Port=6550
interface tcp library STAFTCP option Secure=No option Port=6500
Add default service loader
serviceloader library STAFDSLS
And would like to know more about libray which STAF supports like STDIN,ERR,STDOUT e.t.c i did not understand what are these library doing in command line.
Most important now since STAF is working would like to know about STAX:
What does STAX do,why i should use and how to use STAX.I want to learn and understand.Once i become PRO i will also contribute they way you guided me.
Thanks for your constant support.
Rajnikant
For clarification of the meaning of each statement in the STAF.cfg file, read section "4.0 Configuration" in the STAF User's Guide at http://staf.sourceforge.net/current/STAFUG.htm#HDRCONFIG.
To learn more about the STAF PROCESS service and its START request and options you can use on a PROCESS START request such as RETURNSTDOUT, STDERRTOSTDOUT, see section "8.13 Process Service" in the STAF User's Guide at http://staf.sourceforge.net/current/STAFUG.htm#HDRPROCSRV.
For more information on STAX, see the STAX User's Guide at http://staf.sourceforge.net/current/STAX/staxug.html.
Note that links to all of the STAF/STAX documentation is provided via the "STAF/STAX Documentation" web page at http://staf.sourceforge.net/docs.php. You may find the "Getting Started with STAF" document and the "Getting Started with STAX" document to be helpful as well.
In addition, an education package is provided via the "STAF/STAX Education" web page at http://staf.sourceforge.net/education.php which is intended to familiarize new users with the STAF and STAX tools, and to provide hands-on experience with the tools.
Hi
can you please brief me how to install STAx over STAF.
Thanks
Rajnikant
See section "Installation and Configuration", sub-section "STAX Service Machine", in the STAX User's Guide at http://staf.sourceforge.net/current/STAX/staxug.html#Header_StaxServiceMach for detailed instructions on how to install STAX.
Hi sharon
i am trying to install cron on STAF,when trying to install i did not find any kind of installation file inside and one folder services was not present.So my question here is do we need to create services folder inside satf and just place the CronV340.tar file inside that.
and i did not undestand configuration part for cron:
Here is mY STAF.cfg file for cron
# Adding croon services
SERVICE Cron LIBRARY JSTAF EXECUTE {STAF/Config/STAFRoot}/services/cron/STAFCron.jar
PARMS OLDVARRESOLUTION
i had installed cron in /usr/local/staf/srvices/cron.
i did not understand this part:{STAF/Config/STAFRoot} what does this says.
Can u please guide me.
And for STAX process i had added below commands:
Adding STAX Process
SERVICE STAX LIBRARY JSTAF EXECUTE /usr/local/staf/services/stax/STAX.jar OPTION J2=-Xmx512m
SERVICE EVENT LIBRARY JSTAF EXECUTE /usr/local/staf/services/stax/STAFEvent.jar
SET MAXQUEUESIZE 10000
Is this correct and why we put # before satrting any command.
Thanks
Rajnikant
All of the STAF external Java services such as STAX and Cron are provided in the form of a tar/zip file that contains a jar file (e.g. STAX.jar, STAFCron.jar) that you use when registering the service in the STAF.cfg file.
When you download a STAF external service from the "Download services for STAF" web page at http://staf.sourceforge.net/getservices.php, it provides links to the user guides for each service (which also contain a section on installation and configuration. See the STAF Cron Service User Guide's "Installation and Configuration" section at http://staf.sourceforge.net/current/cron.pdf for detailed installation and configuration instructions. You simply extract the CronV340.zip/tar file that you downloaded into the /usr/local/staf/services directory (which will place the STAFCron.jar file in /usr/local/staf/services/cron/STAFCron.jar) and then configure the Cron service by adding the following statement to your STAF configuration file:
Lines in your STAF.cfg file for registering the STAX and Event services could look like the following if you want them all to run in the same JVM. Register the STAX service first (before the Event and Cron services) in this case as the JVM will be created when the first Java service is registered and you are using the J2 option to specifyp the maximum heap size for the JVM so this needs to be done when the JVM is created. See section "4.4 Service Configuration", sub-section "4.4.2 JSTAF service proxy library" in the STAF User Guide at http://staf.sourceforge.net/current/STAFUG.htm#HDRSERVICEREGCFG for more information about how to configure a STAF Java service..
Note that {STAF/Config/STAFRoot} is a variable that STAF provides that resolves to the location where you installed STAF (e.g. /usr/local/staf) and makes your STAF.cfg file more portable. You could specify /usr/local/staf instead of {STAF/Config/STAFRoot} if you prefer.
The STAF User Guide talks about the system variables that STAF pre-defines in section :"2.0 Concepts", sub-section "2.4 Variables", at http://staf.sourceforge.net/current/STAFUG.htm#HDRVARCON.
Lines in the STAF.cfg file that begin with a pound sign (#) indicate that the line is a comment. This is talked about in section "4.0 Configuration", sub-section "4.1 Comments", in the STAF User Guide at http://staf.sourceforge.net/current/STAFUG.htm#HDRCOMMENTSCFG.
Last edit: Sharon Lucas 2015-08-31
Thanks Sharon
i went through steps u specified,i understood and tried to configure and register each process i need into services directory(/usr/local/staf/services) but i am unable to start the stax process.Both side guest and host side,STAFprocess was running.
it is throwing error as:
rajnikant@UIPL05:/usr/local/staf$ STAF 192.168.19.121 stax version
Error registering with STAF, RC: 21
rajnikant@UIPL05:/usr/local/staf$
My STAF.cfg file is:
And in my local machine i had registered and configured all services i am attaching images of files present in services directory.
and i do not have any server so i set server URL as mail.google.com. is this okay.
i want to know about path from where we can execute these commands.
Please guide me.
Thanks
Rajnikant
Last edit: Sharon Lucas 2015-09-01
You are getting RC 21 (STAF not running) submitting any STAF service request because STAFProc did NOT start successfully due to errors in your STAF.cfg file. I tried to start STAFProc on one of my Linux systems using your STAF.cfg file and the nohup.out file (if using startSTAFProc.sh) or the output to the screen if starting using "STAFProc &" shows what the two errors are in your STAF.cfg file as follows:
You have 5 errors in your STAF.cfg file:
1) As I told you in my previous posting, you need to register the STAX service first (or specify OPTION JVMName=STAX) because you are specifying option J2=-Xmx512m and this can only be done when a new JVM is created. STAFProc outputs the following error for this problem:
2) You are trying to register the Cron service twice. Remove the first registration of the Cron service as this will solve issues 1) and 2).
3) You have a typo when registering the Event service. You specified "service" instead of "services" in the path to the STAFEvent.jar file. STAFProc outputs the following error message for this:
4) You have to either register the Email service in a single line (or use the STAF configuration file's continuation character, \, at the end of the first line). Also, you need to put the value for the PARMS option in double quotes since it contains a space. For example: PARMS "MAILSERVER mail.google.com". STAFProc outputs the following error message for these issues:
Specify the following instead:
Note: Specifying mail server mail.google.com won't allow EMAIL SEND requests to work unless it is a SMTP mail server.
5) You need to leave in the default trust line to give trust level 5 to local://local as this was in the default STAF.cfg file) or else you won't be able to submit local STAF commands. Put this before your "trust level 5 machine 192.169.19.*" line as follows:
Here's what your STAF.cfg file should look like:
In regards to "i want to know about path from where we can execute these commands.", I don't know what you mean. What commands? Do you mean from where should you submit a STAF service request like:
You can submit it from any path as long as the STAF environment variables have been set in the terminal from which you submit the STAF service request.
I am not going to be able to answer questions for the next week.
I also attached the working STAF.cfg file.
Thanks again Sharon
Now STAX services are working:rajinikant@UIPL05:/usr/local/staf$ STAF local stax version
Response
3.5.14
rajinikant@UIPL05:/usr/local/staf$ staf local stax help
Response
*** STAX Service Help ***
EXECUTE < <file \<xml="" file="" name=""> [MACHINE \<machine name="">]</machine>> | DATA <xml data=""> >
[JOBNAME <job name="">]</job> [FUNCTION <function id="">]</function> [ARGS <arguments>]</arguments>
[SCRIPTFILE <file name="">... [SCRIPTFILEMACHINE <machine name="">]]</machine></file>
[SCRIPT <python code="">]</python>... [CLEARLOGS [<enabled |="" disabled="">]]</enabled>
[ WAIT [<number>[s|m|h|d|w]] [RETURNRESULT [DETAILS]] |
HOLD [<number>[s|m|h|d|w]]</number> | TEST [RETURNDETAILS] ]</number>
[ NOTIFY ONEND [BYNAME] [PRIORITY <priority>] [KEY <key>] ]</key></priority>
[LOGTCELAPSEDTIME <enabled |="" disabled="">]</enabled>
[LOGTCNUMSTARTS <enabled |="" disabled="">]</enabled>
[LOGTCSTARTSTOP <enabled |="" disabled="">]</enabled>
[PYTHONOUTPUT <python output="">]</python> [PYTHONLOGLEVEL <log level="">]</log>
[INVALIDLOGLEVELACTION <raisesignal |="" loginfo="">]</raisesignal>
[ BREAKPOINT <function name=""> | <line>[@@<file>[@@<machine>]] ]</machine></file></line></function>...
[BREAKPOINTFIRSTFUNCTION] [BREAKPOINTSUBJOBFIRSTFUNCTION].....</xml></file>
When i tried to Starting the STAX Monitor,it is throwing error something like this:
rajinikant@UIPL05:/usr/local/staf/services/stax$ java -jar STAXMon.jar
Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.JFrame.<init>(JFrame.java:174)
at com.ibm.staf.service.stax.STAXMonitor.<init>(STAXMonitor.java:519)
at com.ibm.staf.service.stax.STAXMonitor.main(STAXMonitor.java:5623)
rajinikant@UIPL05:/usr/local/staf/services/stax$ </init></init></init></init></init>
So,want to know whether STAX monitor works only in windows or ubuntu also and can be use the same setup in redhat process also,will that be same as ubuntu?
You will be avialble this week,next week onwards you will not be avialble right.
Thanks
Rajnikant
The STAX Monitor works on Ubuntu and other Unix systems. The STAX Monitor in a Java Graphical User Interface (GUI) application. Are you sitting directly at the Ubuntu system or are you accessing it over the network (e.g. via ssh, etc)? Google for this Java error (as it is not specific to STAF/STAX) and you'll see posts such as:
Read them for ideas of how to resolve this issue. What version of Java are you using? What is the output from "java -version"?
I am not available starting today for a week (though I may have occasional access to respond to questions).
Thanks sharon
i got my STAX Monitor,but when i switch to other tab it gets disappear.Not able to find out Why?I am attaching screenshot of STAX monitor.
rajnikant@UIPL05:/usr/local/staf/services/stax$ java -jar STAXMon.jar
Mail configuration part is still not working.We are using gmail service for sending and receiving email.if you have any idea about this or some link related to STAF and mail configuration,please share before leaving.
Request: if you find some time in between please try to answer.
Thanks
Rajnikant
You must exit the STAX Monitor "Properties" panel (e.g. click on its "Save" or "Cancel" button) to return to the main STAX Monitor panel.
You must specify a valid SMTP (Simple Mail Transfer Protocol) mail server and port through which the email will be sent (via the MAILSERVER and PORT configuration options) and possibly also specifying the AUTHUSER and AUTHPASSWORD options on a EMAIL service SEND request if your SMTP server requires authentication (read more about this in the Email Service User's Guide at http://staf.sourceforge.net/current/email.html).
You can google for more information about SMTP mail servers and find links such as:
I use our company's SMTP mail server not a gmail server.