#39 Problem with AJP running behind Apache 2.2 mod_proxy


I have encountered the following issue when trying to run Winstone behind Apache 2.2 with mod_proxy enabled:
- Apache shows an internal server error (500)
- log files show the following error message

### start
Error within request handler thread
java.lang.StringIndexOutOfBoundsException: String index out of range: 1230
at java.lang.String.checkBounds(String.java:401)
at java.lang.String.<init>(String.java:442)
at winstone.ajp13.Ajp13IncomingPacket.readString(Ajp13IncomingPacket.java:278)
at winstone.ajp13.Ajp13IncomingPacket.parsePacket(Ajp13IncomingPacket.java:192)
at winstone.ajp13.Ajp13Listener.allocateRequestResponse(Ajp13Listener.java:178)
at winstone.RequestHandlerThread.run(RequestHandlerThread.java:79)
at java.lang.Thread.run(Thread.java:619)
### end

The setup is intended to proxy Hudson through AJP behind an Apache running HTTPs. A related issue was also reported on the hudson mailing list [1], but I have not found any associated bug here, or additional information there.

Winstone parameters (as run in the hudson.war):

Apache configuration snippet to proxy requests
### start
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
ProxyPass /hudson ajp://
ProxyPassReverse /hudson ajp://
### end

Is this a known issue? What can be done.

Thank you,

P.S.: Please excuse me, if this question has already been asked. The bug tracker is not really searchable.

[1] http://n4.nabble.com/Hudson-behind-Apache-with-AJP13-td380444.html


  • Conny Kreyßel

    Conny Kreyßel - 2009-12-23


    i also run into this error. Can you please explain any workaround or cause of error?


  • Mike Stoddart

    Mike Stoddart - 2010-01-12

    Same here: Fedora 10 using the latest Hudson.

    [Winstone 2010/01/12 08:14:17] - Error within request handler thread
    java.lang.StringIndexOutOfBoundsException: String index out of range: 1781
    at java.lang.String.checkBounds(String.java:409)
    at java.lang.String.<init>(String.java:450)
    at winstone.ajp13.Ajp13IncomingPacket.readString(Ajp13IncomingPacket.java:275)
    at winstone.ajp13.Ajp13IncomingPacket.parsePacket(Ajp13IncomingPacket.java:189)
    at winstone.ajp13.Ajp13Listener.allocateRequestResponse(Ajp13Listener.java:179)
    at winstone.RequestHandlerThread.run(RequestHandlerThread.java:79)
    at java.lang.Thread.run(Thread.java:636)

    ProxyRequests Off
    ProxyPreserveHost On

    <Proxy ajp://localhost:8102/hudson*>
    Order deny,allow
    Allow from all

    ProxyPass /hudson ajp://localhost:8102/hudson
    ProxyPassReverse /hudson ajp://localhost:8102/hudson

    <Location /hudson/>
    AuthType Basic
    AuthName "Authorized Zone"
    AuthUserFile /srv/conf/htpasswd
    Require group trac-user
    AuthGroupFile /srv/conf/support.group

  • caefer

    caefer - 2010-01-18

    Same here using the latest stable Hudson on an up-to-date Gentoo Linux


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks