Forum Moderators: phranque

Message Too Old, No Replies

Apache server returns no status code

         

rudyy

8:14 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



I have an isitup.html that is used to do the health check on the Apache and WAS servers. The same html is put into two different servers. As you can see the appended result below, server2 gives 200OK return code, but server1 has no code returned. The page is loaded successfully in both server. Is there a flag that I need to toggle in the Apache server to make it return a http status code.

Thanks,

Rudy

$ curl -I [server1.com...]
HTTP/1.1
Date: Wed, 07 Feb 2007 21:50:23 GMT
Server: IBM_HTTP_Server/2.0.47.1 Apache/2.0.47 (Unix)
last-modified: Wed, 07 Feb 2007 21:48:27 GMT
Content-Type: text/html
Content-Language: en-US

$ curl -I [server2.com...]
HTTP/1.1 200 OK
Date: Wed, 07 Feb 2007 21:51:49 GMT
Server: IBM_HTTP_SERVER/1.3.28 Apache/1.3.28 (Unix)
last-modified: Fri, 27 Oct 2006 20:07:48 GMT
Connection: close
Content-Type: text/html
Content-Language: en-US

jdMorgan

11:23 pm on Feb 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Very odd... Never seen that one before!

Is server1 using a script to generate the content for that request? If so, then something may be wrong with the script; For example, generating the response code by referencing a variable in a way that is supported on Apache 1.x, but not on Apache 2.x, and failing to handle the var=NULL case properly.

The above is just a guess. But a script writing the response header is the only way I know of to override the default Apache response code.

Jim

rudyy

3:02 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



We just use the UNIX curl command with option -l to get the header.

Rudy

jdMorgan

3:55 pm on Feb 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



But how are your pages created on your server? Is it a 100% static site, with each HTML page uploaded to the server, or does it use a CMS (Content Management System like WordPress or Drupal) or server-side scripting (like PHP) to generate dynamic pages?

If the site is 100% static, then all I can recommend is to backup and then re-install the server. If the site is dynamic, then look to the page-creation scripts for an error in header generation.

Apache has no provision to return a blank status code. However, scripts can output arbitrary status response headers and override Apache's default behaviour. Therefore, either the server installation is corrupted, or you've got a script writing a malformed response header due to some Apache/scripting language version incompatibility.

Jim

rudyy

9:17 pm on Feb 9, 2007 (gmt 0)

10+ Year Member



Jim,

Thanks for the info. We have a WAS server running atop the Apache. The WAS server takes care both the html and jsp pages. Can you show me where I should look for the error as I am the application developer and I am not quite familiar how the http actually works?

Since the server works perfectly except missing the status code return. I do not think reloading the whole server is a good idea.

Rudy

jdMorgan

10:20 pm on Feb 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> I do not think reloading the whole server is a good idea.

Nor do I, as indicated by the condition clause above.

I'd recommend contacting IBM WAS support.

Jim

rudyy

1:58 pm on Feb 13, 2007 (gmt 0)

10+ Year Member



Find the solution to the problem.

Problem was from the WebSphere plugin not returning the code 200 OK. It is resolved in fixpack 5.1.1.11.

[www-1.ibm.com...]

[edited by: jdMorgan at 2:50 pm (utc) on Feb. 13, 2007]
[edit reason] Formatting [/edit]