BonCode Connector, IIS 7.5 & Tomcat 8, Intermittent Generic Connector Error

自闭症网瘾萝莉.ら 提交于 2019-12-22 11:35:53

问题


I have a JSP web-app hosted on IIS 7.5 & Tomcat 8.0.30 via BonCode AJP13 v1.0.26 on Win 2008 R2 64 bit.

On the production environment, some users are getting an intermittent BonCode error:

Generic Connector Error: Please check...

Has anyone got a known working configuration for BonCode 1.0.26, IIS 7.5 & Tomcat 8?

Details

The users affected seem to be roaming laptops and home-workers that connect via a VPN ie desktops seem unaffected.

There is no authentication on Tomcat / JSP web-app.

A single instance of Tomcat is on the same server as IIS 7.5. ie no load-balancing etc.

Only plain HTTP is being used ie not HTTPS and no associated certificates.

Client Diagnosis

  • IE 11 Developer Tools > Network

shows the generation of a HTTP 502.

  • Fiddler

shows the generation of a HTTP 502.

Server Diagnosis

  • BonCode logs

Occasionally, this is seen:

2016-02-29 15:59:01 1.0.26 ERROR 
TCP Client level -- Server/Port:localhost/8009
Value cannot be null.
Parameter name: buffer
2016-02-29 15:59:01 One Connection raised an error

but usually, no related errors / warnings are being shown

  • IIS Failed Trace Requests

shows the generation of a HTTP 502 in module ‘ManagedPipelineHandler’.

  • Tomcat logs

no errors, as expected as servlet/JSP requests are not being forwarded.

Configuration Files

BonCode - BonCodeAJP13.settings

<Settings>
  <Port>8009</Port>
  <Server>localhost</Server>   
  <MaxConnections>0</MaxConnections>
  <LogLevel>4</LogLevel>
  <LogDir>E:\inetpub\logs\BonCode</LogDir>
  <FlushThresholdTicks>0</FlushThresholdTicks>
  <EnableRemoteAdmin>False</EnableRemoteAdmin>
  <PacketSize>65536</PacketSize>
</Settings>

Tomcat - server.xml

...
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" 
           packetSize="65536" />
...

Notes

I am aware that, as well as BonCode, there are these other connector options:

  • Tomcat ISAPI
  • IIS ARR

If we get no joy with BonCode, we will probably try IIS ARR next.

Thanks for reading.


回答1:


After much trial and error, it seems that the authorization HTTP header must be filtered out.

Some client machines, roaming laptops etc, seem to generate very large authorization packets - I have seen sizes of about 12K.

For whatever reason, despite setting the packet size to 64K on both BonCode & Tomcat 8, this header seems to be too large.

This is now our BonCode configuration - note the updated HeaderBlacklist value

<Settings>
   <Port>8009</Port>
   <Server>localhost</Server>   
   <MaxConnections>0</MaxConnections>
   <LogLevel>2</LogLevel>
   <LogDir>E:\inetpub\logs\BonCode</LogDir>
   <FlushThreshold>0</FlushThreshold>
   <EnableRemoteAdmin>False</EnableRemoteAdmin>
   <HeaderBlacklist>AUTHORIZATION,URL,SERVER_SOFTWARE,SERVER_NAME,SERVER_PROTOCOL</HeaderBlacklist>
   <PacketSize>65536</PacketSize>
</Settings>


来源:https://stackoverflow.com/questions/35769767/boncode-connector-iis-7-5-tomcat-8-intermittent-generic-connector-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!