BonCode Connector not connecting with Tomcat

Hi, Lucee newbie here but long time ACF dev. I really want to get Lucee to work but so far no luck with getting Tomcat and IIS to talk to each other.

I installed Lucee 5.3.1.102 with no trouble and have a ‘Hello World’ website in IIS with just an index.cfm file (127.0.0.1, port 80 only, no SSL). I updated server.xml to point to this website with updated port 8600 (changed from 8888). Requests to http: // 127 . 0 . 0 . 1 : 8600 / index.cfm work fine.

I installed the BonCode connector and I think I did it right, but when I request http: // 127 . 0 . 0 . 1 / index.cfm the request times out and I get these errors:

  1. IIS tells me only “HttpException (0x80004005): Request timed out.” It logs it as a 500.

  2. In the Catalina log:

02-Oct-2019 17:37:59.651 INFO [http-nio-8600-exec-1] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
 Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
 java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
	at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:414)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
. . .
  1. In the BonCode log:
2019-10-02 17:37:59 BonCode AJP Connenctor version 1.0.41
2019-10-02 17:37:59 New Connection 1 of 0 to tomcat: 127.0.0.1:8600 ID: 1 [T-7]
2019-10-02 17:37:59 BonCodeAJP13.ServerPackets.BonCodeAJP13ForwardRequest GET /index.cfm 918 bytes
 < appl-physical-path : C:\pathToWebsite\
 < gateway-interface : CGI/1.1
 < https : off
 < local-addr : 127.0.0.1
 < path-info : /index.cfm
 < remote-port : 54183
 < script-name : /index.cfm
 < server-port : 80
 < server-port-secure : 0
 < Cache-Control : no-cache
 < Connection : keep-alive
 < Pragma : no-cache
 < Accept : text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
 < Accept-Encoding : gzip, deflate, br
 < Accept-Language : en-US,en;q=0.9
 < Host : 127.0.0.1
 < User-Agent : Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36
 < DNT : 1
 < Upgrade-Insecure-Requests : 1
 < Sec-Fetch-Mode : navigate
 < Sec-Fetch-User : ?1
 < Sec-Fetch-Site : none
2019-10-02 17:38:59 warning Stream reading problem (4)[regular read (2)](59704), we stopped waiting on Tomcat response. You may have shutdown Tomcat unexpectedly
2019-10-02 17:38:59 1.0.41 ERROR 
Stream reading problem (2)(2), we stopped waiting on Tomcat response. You may have shutdown Tomcat unexpectedly
Thread was being aborted.
   at BonCodeAJP13.BonCodeAJP13ServerConnection.ReadStream(Byte[]& receivedPacketBuffer, String readOrigin)
   at BonCodeAJP13.BonCodeAJP13ServerConnection.ComunicateWithTomcat()
2019-10-02 17:38:59 1.0.41 ERROR 
TCP Client level -- Server/Port:127.0.0.1/8600
Thread was being aborted.
   at BonCodeAJP13.BonCodeAJP13ServerConnection.ComunicateWithTomcat()
   at BonCodeAJP13.BonCodeAJP13ServerConnection.HandleConnection()
   at BonCodeAJP13.BonCodeAJP13ServerConnection.p_CreateConnection(BonCodeAJP13PacketCollection packetsToSend)

Tomcat does not shut down during the request, and I can successfully request http: // 127 . 0 . 0 . 1 : 8600 / index.cfm after this error.

More info about the setup:
Windows 7
IIS 7.5
Apache Tomcat/9.0.19
JVM 11.0.3+7

Any help would be greatly appreciated!

HI Chris. I don’t think the Tomcat HTTP port should make any difference to the IIS/Boncode <-> Tomcat connection (it clearly doesn’t when you hit Tomcat directly). That connection happens over AJP using port 8009 by default.

In your server.xml, look for the AJP connector setting and make sure it matches what’s in Boncode’s settings file.

Once again a second set of eyes helps to point out something obvious!

I had set the port in Boncode to the HTTP port, not the AJP port. After fixing that and then also adding the ModCFMLSecret to the Boncode settings it appears to be working.

Thanks!
Chris