|
David, Start a service job over the CGI job running in the QHTTPSVR sub-system. If you do a WRKACTJOB SBS(QHTTPSVR) you'll see probably 5 jobs for your instance. The CGI jobs, on my system anyway, are the second and third jobs in the list. If you display the jobs and look at the joblog, it will tell you that the job is a CGI job. Then you'll do a STRSRVJOB JOB(999999/QTMHHTTP/Instance name) where 999999 is the job number and instance name is the Job name. This should be the name of your instance. Then issue a STRDBG on the program you wish to debug and set a break point. Execute it via your web interface. It should stop at the breakpoint on the session on which you keyed the STRDBG. Then you can step through as normal. It may take some experimentation finding which job is servicing the request. Good Luck Mark Mark Walter Sr. Programmer/Analyst Hanover Wire Cloth a div of CCX, Inc. mwalter@hanoverwire.com http://www.hanoverwire.com 717.637.3795 Ext.3040 "David J. Smith" To: <web400@midrange.com> <dsmith@ais400. cc: us> Subject: [WEB400] HTTP 500 Error Sent by: web400-admin@mi drange.com 10/17/2002 07:46 PM Please respond to web400 Justin: How do I STRDBG on a program then call it from the web? The debug session whould be over a differnt job? Am I missing something? Andrew: I'm not that far yet. The program never gets executed for me to mess all those things up. Thanks. Peter: I've tried that, below is the log, and a portion of the "very verbose" job: 172.16.100.10 - - [17/Oct/2002:20:16:59 +0400] "POST /cgi-bin/WSLI010 HTTP/1.1" 500 286 HTTP SERVER SERVICE TRACE OUTPUT FILE TIMESTAMP THREAD MODULE MESSAGE ---------- -------- -------- ------------------------------------------------------------------------ ----------------------------- 1034900186 0000001D HTDaemon MAIN Job = DJSSERVEROQTMHHTTP 288565; Thread = 0000001D; Pid = 814: Instance = DJSSERVERO; ........................... [17/Oct/2002:20:16:26 +0000, 1034900186] 00000001 1034900186 0000001D HTDaemon ............ This is IBM HTTP Server 1.0 1034900186 0000001D HTDaemon ............ Built on Dec 18 2001 at 13:11:19. 1034900186 0000001D HTDaemon ............ Started at Thu Oct 17 20:16:26 2002 1034900186 0000001D HTDaemon ............ Running as "QTMHHTTP", UID:107, GID:0. -- Snip -- 1034900186 0000001D HTConfig HTHostName gave "wh01dev.tshsc.com"; sc.hostname is "wh01dev.tshsc.com". 1034900186 0000001D HTMulti. Welcome..... Adding default welcome names 1034900186 0000001D HTConfig Communications established successfully with LDAP servers. 1034900186 0000001D HTTimer. Timer....... table created. 1034900186 0000001D HTTimer. Timer....... table created. 1034900186 0000001D HTConfig Error Loading.....PICS config file /QIBM/UserData/HTTPSVR/PICS/DJSICS_PICS.CNF errno 3014 1034900186 0000001D HTHash.c HTHASH.c: HashAdd table=80000000 key=0 value=d206bdb9 1034900186 0000001D HTDaemon DosSetRelMaxFH: max file handles is: 240 and return code is: 0 1034900186 0000001D HTLog.c Errors will be sent only to stderr. 1034900186 0000001D HTMalloc Pool Debug:....request to free NULL - returning. 1034900186 0000001D qzhblog. AccessLog--file......."/DJSLOGS/LOG". 1034900187 0000001D qzhblog. ................IFS file system. 1034900187 0000001D qzhblog. ................Common Logformat. 1034900187 0000001E zhbhelpr startHelperPool: starting 3 of type C. 1034900187 0000001F zhbhelpr startHelperPool: starting 1 of type T. 1034900187 0000001D qzhblog. ................statvfs().....Assumed Thread Safe file system. (errno: 3025, errmsg: No such o 1034900187 0000001D qzhblog. Log......... "/DJSLOGS/LOG.Q1021017" created with CCSID 819, opened with CCSID 37. 1034900187 0000001D HTLog.c Log......... "/DJSLOGS/LOG.Q1021017" opened 1034900187 0000001D HTLog.c Cgi Error log... not opened - no Cgi Error log name defined. -- Snip -- 1034900219 00000023 HTMPool. MemPool..... creating a new 4240-byte pool. 1034900219 00000023 HTServer About....... to call preexit for "/cgi-bin/WSLI010". 1034900219 00000023 HTRuleDB Using local address 172.16.0.12. 1034900219 00000023 HTRuleDB Service..... matched "/cgi-bin/WSLI010" -> "/QSYS.LIB/DAVSM01CGI.LIB/WSLI010.PGM" 1034900219 00000023 HTRuleDB No.......... PATH_INFO 1034900219 00000023 HTAAServ AuthCheck... Translated script name: "/QSYS.LIB/DAVSM01CGI.LIB/WSLI010.PGM" 1034900219 00000023 HTAAServ AccessOk.... by fast path. No protect rule nor ACL. 1034900219 00000023 HTServer AA.......... check returned 200 1034900219 00000023 HTServer Translated.. "-null-" 1034900219 00000023 HTServer HTHandle..... Access as "%%SERVER%%" for Client "-unknown-" 1034900219 00000023 HTPICS.c PICS........ no protocol bags received. 1034900219 00000023 HTServer HTHandle.... method POST 1034900219 00000023 HTScript HTStartScript... content length parm is 89 1034900219 00000023 HTScript Scheme...... CGI/1.1 1034900219 00000023 HTSEnv.c Environ..... CGI_MODE=%%EBCDIC%% 1034900219 00000023 HTSEnv.c Environ..... CGI_OUTPUT_MODE=%%MIXED%% 1034900219 00000023 HTSEnv.c Environ..... IBM_CCSID_VALUE=37 1034900219 00000023 HTSEnv.c Environ..... CGI_EBCDIC_CCSID=37 1034900219 00000023 HTSEnv.c Environ..... CGI_ASCII_CCSID=819 ............................ [17/Oct/2002:20:16:59 +0400, 1034900219] 00000351 1034900219 00000023 HTSEnv.c Environ..... SERVER_SOFTWARE=IBM-HTTP-Server/1.0 1034900219 00000023 HTSEnv.c Environ..... SERVER_NAME=wh01dev 1034900219 00000023 HTSEnv.c Environ..... SERVER_PORT=80 1034900219 00000023 HTSEnv.c Environ..... RULE_FILE=/QSYS.LIB/QUSRSYS.LIB/QATMHTTPC.FILE/DJSCONFIG.MBR 1034900219 00000023 HTSEnv.c Environ..... SERVER_PROTOCOL=HTTP/1.1 1034900219 00000023 HTMPool. MemPool..... creating a new 4000-byte pool. 1034900219 00000023 HTSEnv.c Environ..... REQUEST_METHOD=POST 1034900219 00000023 HTSEnv.c Environ..... GATEWAY_INTERFACE=CGI/1.1 1034900219 00000023 HTSEnv.c Environ..... PATH_INFO= 1034900219 00000023 HTSEnv.c Environ..... PATH_TRANSLATED= 1034900219 00000023 HTSEnv.c Environ..... QUERY_STRING= 1034900219 00000023 HTSEnv.c Environ..... SERVER_ADDR=172.16.0.12 1034900219 00000023 HTSEnv.c Debug....... HTReqArg is /cgi-bin/WSLI010 1034900219 00000023 HTSEnv.c Environ..... SCRIPT_NAME=/cgi-bin/WSLI010 1034900219 00000023 HTSEnv.c Environ..... REMOTE_ADDR=172.16.100.10 1034900219 00000023 HTSEnv.c Environ..... AUTH_TYPE= 1034900219 00000023 HTSEnv.c Environ..... REMOTE_USER= 1034900219 00000023 HTSEnv.c Environ..... CONTENT_TYPE=application/x-www-form-urlencoded 1034900219 00000023 HTSEnv.c Environ..... CONTENT_LENGTH=89 1034900219 00000023 HTSEnv.c Environ..... REFERER_URL=http://wh01dev/djstest/Wsli010html.html 1034900219 00000023 HTSEnv.c Environ..... DOCUMENT_ROOT=/QSYS.LIB/DAVSM01CGI.LIB 1034900219 00000023 HTSEnv.c Environ..... DOCUMENT_URI=/cgi-bin/WSLI010 1034900219 00000023 HTSEnv.c Environ..... DOCUMENT_NAME=/QSYS.LIB/DAVSM01CGI.LIB/WSLI010.PGM 1034900219 00000023 HTSEnv.c Environ..... FSCP=37 1034900219 00000023 HTSEnv.c Environ..... NETCP=819 1034900219 00000023 HTSEnv.c Environ..... HTTPS_KEYSIZE= 1034900219 00000023 HTSEnv.c Environ..... HTTPS=OFF 1034900219 00000023 HTSEnv.c Environ..... HTTPS_PORT= 1034900219 00000023 tfprintf Info........ HTScriptArgv: returning: 1034900219 00000023 tfprintf argv[0] = "WSLI010.PGM" 1034900219 00000023 zhbhelpr sendToCGIHelper: CGI helper function=195 1034900219 00000023 zhbhelpr getJob: helper job successfully selected 1034900219 00000023 HTScript Child process has been spawned ID=815 1034900219 00000023 HTTimer. TimeOut..... set for process 815 (300 secs) 1034900219 00000023 HTScript HTStartScript... content length is 89, stdin length is 89, buffer contains äíë+âê äíëñ+ã ß 1034900219 00000023 zhbhelpr sendMsgToHelper: helper message type=10 1034900219 00000023 HTMPool. MemPool..... creating a new 4112-byte pool. 1034900219 00000023 HTHash.c HTHASH.c: HashAdd table=80000000 key=0 value=d206bdb9 1034900219 00000023 HTScript ERROR....... Bad script request -- script '/QSYS.LIB/DAVSM01CGI.LIB/WSLI010.PGM' not found or not executable 1034900219 00000023 HTHash.c HTHASH.c: HashAdd table=80000000 key=0 value=d206bdb9 1034900219 00000023 HTSrvErr DetailedErr. bailing out on error 27 because No error page defined. 1034900219 00000023 HTSrvErr Returning... ERROR 500: ** Bad script request -- script '/QSYS.LIB/DAVSM01CGI.LIB/WSLI010.PGM' not found or not executable 1034900219 00000023 htrsp.c No.......... metafile to look for. 1034900219 00000023 HTPICS.c No.......... PICS labels to send back. 1034900219 00000023 htrsp.c ............ Header section for client HTTP/1.1 500 Document follows Server: IBM-HTTP-Server/1.0 D 1034900219 00000023 HTWriter level3write...socket: 47, bufptr=00000000, size=256070967, socketype=1392596089 1034900219 00000023 os2socke Socket...... wrote 556 bytes on socket 47. 1034900219 00000023 HTLog.c Logging..... updating SNMP/PerfMon counters. 1034900219 00000023 HTLog.c Logging....... fastpath off. 1034900219 00000023 HTServer CleanupMemory. HTHandledStdin = FALSE, HTContentLenghtLeft = 0 ............................ [17/Oct/2002:20:16:59 +0400, 1034900219] 00000401 1034900219 00000023 HTWorkT. Uninit Fn... not defined for module "HTPresentation". 1034900219 00000023 HTWorkT. Uninit Fn... for module "HTList" (@2701131776) being called. 1034900219 00000023 HTWorkT. Uninit Fn... for module "HTMemPool" (@2701131776) being called. 1034900219 00000023 HTMPool. MemPool..... freed 3 pools totalling 12352 bytes. 1034900219 00000023 HTWorkT. Uninit Fn... not defined for module "HTTimer". -- SNIP -- Help Me! Should I scrap this instance of the server and try recreating one? David Smith President Advanced Information Solutions, Inc. Email: dsmith@ais400.com Phone: 517.548.7170 > From: Justin Houchin <justin@reliatek.com> > > Have you tried doing a STRDBG on the program and then calling it from > the web? Does the debug session start? > > Justin Houchin > Programmer and Web Developer > Reliatek, Inc > Justin@reliatek.com > >_______________________________________________________________________ _________ > Hi David, > > Nothing jumps out at me -- I assume your WSLI010 program exists in library > DAVSM01CGI. Somethings that have helped me solve these problems: > > 1. Start your HTTP server with the -vv (very verbose) option. Then look at > the server job and you'll see a spool file with *lots* of detail about what > it's doing and how it's handling an incoming request: STRTCPSVR > SERVER(*HTTP) HTTPSVR(XYZ '-vv') > > 2. Configure an error log as well as an access log in your HTTP > configuration. Look at both of them when you run into this kind of problem. > > hth, > Peter Dow > Dow Software Services, Inc. > 909 793-9050 voice > 909 522-3214 cellular > 909 793-4480 fax ________________________________________________________________________ ________ >OK - I'm going for the obvious stuff first; > >1) Check to see that you have a well formed "header" You know - "Content-type: >text/html" >2) Check to see you have 2 lines of "CRLF" or carriage return line feeds... one >after the content-type and one space after that... > >After that - check to see you're sending the right lengths to the Standard Out >API... > >Now you have an Error 500 - what's the WHOLE error? Dat's important... > >Andrew Borts / Webmaster >Seta Corporation >6400 East Rogers Circle >Boca Raton, FL 33499 _______________________________________________ This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/web400 or email: WEB400-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
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.