500 Error Misbehavior in Servlet Containers

Hi Folks,

FWIW: ruby -v = jruby 1.6.7.2 (ruby-1.9.2-p312) (2012-05-01 26e08ba)
(OpenJDK 64-Bit Server VM 1.6.0_24) [linux-amd64-java]

I’m working on custom 404/500 error messages in my Rails 3.2 app, but
first, I seem to be getting buggy behavior with standard error messages.

In WEBrick, everything behaves as expected: I get an error message in
the
browser.

On GlassFish, when a 500 error is encountered (triggered, for instance,
by
<%= nonexistent_var %> in a view), the error is recorded in the
server.log; however, no response seems to be returned to the browser.

Here’s the same thing with wget:

[email protected]:~/Documents/Aptana_Studio_3_Workspace/r32$ wget
-S "
http://icf109118-ubuntu:8080/r32/"
–2012-09-17 15:14:45-- http://icf109118-ubuntu:8080/r32/
Resolving icf109118-ubuntu (icf109118-ubuntu)… 127.0.1.1
Connecting to icf109118-ubuntu (icf109118-ubuntu)|127.0.1.1|:8080…
connected.
HTTP request sent, awaiting response…
HTTP/1.1 200 OK
X-Request-Id: 9c9be822cc04e5b84512b1410ad6067e
X-Runtime: 0.045000
Date: Mon, 17 Sep 2012 19:14:45 GMT
X-Rack-Cache: miss
Content-Type: text/html;charset=utf-8
Content-Length: 643
Length: 643 [text/html]
Saving to: `index.html’

0% [

] 0 --.-K/s in 30s

2012-09-17 15:15:15 (0.00 B/s) - Connection closed at byte 0.

Do I need to file a bug?

Thanks,
Jamie

Filed a bug: https://jira.codehaus.org/browse/JRUBY-6897

Have you checked to ensure there’s not some GlassFish configuration
setting that would hide the 500 error from the user?

Have you tested this application in another JRuby web server to see if
it’s a JRuby bug or something specific to GlassFish?

Ben

Hi Ben,

Have you tested this application in another JRuby web server to see if
it’s a JRuby bug or something specific to GlassFish?

I know it works under JRuby in WEBrick, but did you mean another servlet
container? I can try Tomcat now.

Thanks,
Jamie

500s seem to behave the same way in Tomcat7.

[email protected]:~/Documents/Aptana_Studio_3_Workspace/r32$ wget
-S
http://localhost:8080/r32/home/barf
–2012-09-19 13:04:23-- http://localhost:8080/r32/home/barf
Resolving localhost (localhost)… 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080… connected.
HTTP request sent, awaiting response…
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Request-Id: 680c47ecb85f6c8f5c68ee0c5e7775fd
X-Runtime: 8.875000
Date: Wed, 19 Sep 2012 17:04:40 GMT
X-Rack-Cache: miss
Content-Type: text/html;charset=utf-8
Content-Length: 643
Length: 643 [text/html]
Saving to: `barf.1’

0% [

] 0 --.-K/s in 21s

2012-09-19 13:05:01 (0.00 B/s) - Connection closed at byte 0.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs