HTTP Service Works one time and gets Internal Server Error

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
bbunney
Posts: 45
Joined: Wed Jul 06, 2022 7:52 pm

HTTP Service Works one time and gets Internal Server Error

Post by bbunney »

This is the fourth HTTP service we have created that processes JSON strings. The other three run fine. This one does not. I'm currently testing it through SoapUI 5.7.0 until the .Net app is ready. When I start the HTTP service and I post a request it is consumed by the program correctly and returns the correct JSON response. When I try to post another request, I get the following response in SoapUI:

TTP/1.1 500 Internal Server Error
Date: Wed, 28 Feb 2024 23:15:12 GMT
Server: Apache
Content-Length: 525
Connection: close
Content-Type: text/html; charset=UTF-8

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
<P>The server encountered an internal error or misconfiguration and was unable to complete your request.</P>
<P>Contact the server administrator at
[no address given] to inform them of the time this error occurred, and the actions you performed just before this error. </P>
<P>More information about this error may be available in the server error log.</P>
</body></html>

There are no errors in the job log:

Job . . : TUNCAGE User . . : QTMHHTTP Number . . . : 083178

Job 083178/QTMHHTTP/TUNCAGE started on 02/28/24 at 17:15:07 in subsystem
QHTTPSVR in QHTTPSVR. Job entered system on 02/28/24 at 17:15:07.
This is a CGI job for IBM HTTP Server instance TUNCAGE.
Library JGPL added to library list.
Library list changed.
0 activation groups deleted.

The server log has the following error:

[Wed Feb 28 17:00:18.375464 2024] [mpm_worker:notice] [pid 68923:tid 000000BE] ZSRV_MSG0387: SIGTERM received. Shutting down.
[Wed Feb 28 17:15:13.490712 2024] [core:error] [pid 68937:tid 00000221] [client 10.32.134.95:49861] ZSRV_MSG0947: End of script output before headers: File name is cmgcagmain.pgm
[Wed Feb 28 17:16:16.775000 2024] [mpm_worker:notice] [pid 68934:tid 000000D1] ZSRV_MSG0385: Apache/2.4.53 (IBM i) configured -- resuming normal operations.

What should we be checking in order to resolve this issue? Something in the generated configuration? Thanks.
stefan@tageson.se
Posts: 12
Joined: Wed Jul 28, 2021 7:55 am
Location: Viken, Sweden
Contact:

Re: HTTP Service Works one time and gets Internal Server Error

Post by stefan@tageson.se »

Has this anything to do with HTTPAPI?
It seems like your server program is running a rclrsc or rclactgrp based on your log entry "0 activation groups deleted."
That's probably not a good idea, remove it and try again.
Scott Klement
Site Admin
Posts: 658
Joined: Sun Jul 04, 2021 5:12 am

Re: HTTP Service Works one time and gets Internal Server Error

Post by Scott Klement »

A program running on an Apache server is ending without sending a response.

This has nothing whatsoever to do with HTTPAPI.
Post Reply