Bilal-S / iis2tomcat

AJP Connector between Internet Information Services (IIS) and Apache Tomcat
http://www.boncode.net/boncode-connector
49 stars 32 forks source link

Error flushing data: Index and count must refer to a location within the buffer. #83

Closed brianharcourt closed 5 years ago

brianharcourt commented 5 years ago

I've recently begun having an issue with one of my IIS sites. I've upgraded to latest and still have the issue; tho now there is a "BIN" directory being created under every site's directory even tho it's a global install. I've played with all the settings I can imagine may affect it but nothing seems to change. All other sites, running off the same connector and same tomcat instance seem to be working without issue.

The initial visit to the site renders the typical "Generic Connector Communication Error" at the top of the results but the site (most times) reponds with the correct HTML after this message.

*tomcat server.xml connector entry:

   <Connector port="8009" protocol="AJP/1.3" 
               redirectPort="8443" 
               tomcatAuthentication="false" 
               maxThreads="1000" 
               keepAliveTimeout="-1" 
               connectionTimeout="121000" 
               packetSize="65536"/>
brianharcourt commented 5 years ago

2nd request formerly immediately successful now simply hanging: timeout at 2 minutes

brianharcourt commented 5 years ago

Resolved by NOT storing session data in cookie by removing the following from Application.cfc

<CFSET THIS.sessionStorage = "cookie" />

This app now uses a default session storage (a database).

Bilal-S commented 5 years ago

@brianharcourt I am glad to see that you were able to resolve this. The Lucee session store to cookie breaks the protocol and sends malformed packets which leads to this error. I have added this to the troubleshooting section in the documentation.

Best, Bilal

brianharcourt commented 5 years ago

Thanks Bilal. Your tool has served me well. I did not have time to dig into deeper causes but for future Googlers with similar issues:

Cookie session storage has worked well for years for me. I did NOT change the version of Lucee between successfully operating and the error.

But I did change a number of parameters, all of which changing back did not seem to alleviate the issue. Given my panicked state and the urgency with which I needed repair I'm certain I did not isolate all the variables that may yield better info.

My guess is that some combination of connector variables allowed the broken cookie protocol to work but without the correct connector variables the broken protocol could not work.

B.