Michael_Lowry

Capturing standard output from JWP started via Service Manager

Discussion created by Michael_Lowry on Mar 29, 2017
When troubleshooting single sign-on problems, it can be useful to capture the standard output of the Java Work Process (JWP). (Kerberos debugging messages, for example, are not written to the normal application log, but printed to standard output.) I am trying to find the best way to capture stdout/stderr when the JWP is started via the Service Manager.

Here are the relevant lines from the Service Manager definitions (SMD) file:
VAR SRV_STARTPATH;/opt/uc4/server
VAR SRV_JAVAPATH;/opt/uc4/java/jre1.8.0_102
VAR SRV_INIFILE;ucsrv_EXP2-A.ini

VAR JWP_STARTCMD;*SRV_JAVAPATH/bin/java -Xmx512M -Dsun.security.krb5.debug=true -jar *SRV_STARTPATH/ucsrvjp.jar -I*SRV_STARTPATH/*SRV_INIFILE -svc%port%
VAR JWP_OUT;>/tmp/JWP_out.txt 2>&1

VAR WP_STARTCMD_COLDSTOP;*WP_STARTCMD -parm"StartMode=Cold;SystemStop=Yes"

DEFINE UC4 WP11;*JWP_STARTCMD *JWP_OUT;*SRV_STARTPATH

The JWP starts up ok, and I can see that it is started with this command:
/opt/uc4/java/jre1.8.0_102/bin/java -Xmx512M -Dsun.security.krb5.debug=true -jar /opt/uc4/server/ucsrvjp.jar -I/opt/uc4/server/ucsrv_EXP2-A.ini -svc22020 >/tmp/JWP_out.txt 2>&1
For some reason however, the file JWP_out.txt is not written. Any ideas?

Outcomes