× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



As far as I can tell by examining the DSPLOG output, the proper subsystem is started and TCP is started. Tomcat does not need HTTP services running; it's an independent server of HTTP.

I used ADDTCPSVR...AUTOSTART(*YES) to define the server, so it runs whenever TCP services are started.

Jason Abreu
Abreu Innovations, Inc.
jason.abreu@xxxxxxxxxxxxxxxxxxxx
http://www.abreuinnovations.com/

On 3/7/2011 1:27 PM, Scott Klement wrote:
hi Jason,

I don't understand the OVRDBF commands in your CL program... OVRDBF
doesn't affect code that runs in a submitted job.

You say that this runs automatically at IPL, or as part of a GO SAVE,
opt 21 backup. That implies that this is being run as an auto-start job
in the QCTL subsystem (or another controlling subsystem), right? Or is
being called from QSTRUPPGM (which, itself, is an auto-start job in the
QCTL subsystem...)

That being the case, it's easy for this to fail due to timing. QSYSNOMAX
might not be available. Or TCP/IP might not be. Or QHTTPSVR... it's tricky.

Instead, consider adding this as an auto-start entry on the QSYSWRK
subsystem. That's what Zend does for Zend Server, and it seems to work
well.


On 3/7/2011 7:05 AM, Jason Abreu wrote:
I have a CL program that I use to define a Custom TCPSRV for starting
Tomcat 6.0.30. When the machine is up and running, the STRTCPSVR
*TOMCAT runs with no errors.
After the machine leaves a restricted state (IPL/ Opt 21 Backup),
however, the command fails and prevents other startup jobs from running.
Those startup jobs have to manually be executed.

Any ideas why this may occur? I have included my CL code below.

==============================
PGM PARM(&COMMAND)
DCL VAR(&COMMAND) TYPE(*CHAR) LEN(10)
DCL VAR(&JOBNAME) TYPE(*CHAR) LEN(10)
DCL VAR(&QSHCMD) TYPE(*CHAR) LEN(255) +
VALUE('cd /Apache/apache-tomcat-6.0.30/bin;')


IF COND((&COMMAND *EQ '*START')) THEN(DO)
CHGVAR VAR(&JOBNAME) VALUE('STRTOMCAT')
CHGVAR VAR(&QSHCMD) VALUE(&QSHCMD *TCAT './startup.sh')
ENDDO


IF COND((&COMMAND *EQ '*END')) THEN(DO)
CHGVAR VAR(&JOBNAME) VALUE('ENDTOMCAT')
CHGVAR VAR(&QSHCMD) VALUE(&QSHCMD *TCAT './shutdown.sh')
ENDDO


OVRDBF FILE(STDOUT) TOFILE(QSYS/QPRINT)
OVRDBF FILE(STDERR) TOFILE(QSYS/QPRINT)

SBMJOB CMD(QSH CMD(&QSHCMD)) JOB(&JOBNAME) +
JOBQ(QSYSNOMAX) USER(TOMCAT) +
MSGQ(QUSRSYS/TOMCAT)

ENDPGM
==============================


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.