Strange problem - Lucee and OpenLiteSpeed

I am in the process of creating a Docker image for Lucee running atop OpenLiteSpeed for better performance, caching etc.

I have gotten quite far over the past few days, to the point where I have a great Dockerfile and set of scripts that allows me to go from zero to fully running in a matter of about 3 minutes. But the strangest issue has come up…

I discovered it when I attempted to log in to the Lucee admin at the usual location (http://www.example.com/lucee/admin/server.cfm). The login page pops right up, but when I submit the login form with my password, the browser just spins until I get a 503.

Then I discovered that it wasn’t just the Lucee admin, it’s ANY .cfm page that submits a form, to itself or anywhere. Meanwhile, standard .htm pages with forms submit just fine, so it doesn’t appear to be related to the OpenLiteSpeed web server itself, unless it’s a problem with the External App (“Servlet Engine”) configuration, the Script Handler configuration (again, “Servlet Engine”), or the context (“Servlet”). The External app is configured to connect to localhost:8009, and the Script Handler is configured to send all .cfm requests to that External App. The context uses that Servlet Engine. My .cfm test page seems fine otherwise, being processed by the the Servlet Engine and showing an updated date/time with a #Now()# without any issue.

So why would GETs be working via OLS into Lucee/Tomcat, but not POSTs?

I’ve been at this for a long time, so it’s possible I’m missing something stupid…

I google and saw your post on the openlitespeed forums Docker, LiteSpeed, and Lucee/Tomcat (ColdFusion) - Creating an image to share with all | LiteSpeed Support Forums

anything showing up in the tomcat log files?

Hi Zac,

So far, the only thing I’ve seen is in /opt/lucee/tomcat/logs/catalina.out, and it appears to just be the timeout for the thread:

25-Mar-2018 20:25:04.354 SEVERE [ajp-nio-8009-exec-7] org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun
java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:853)
at lucee.commons.io.StopThread.run(SystemUtil.java:1525)

The logs for the site and for the lucee server itself have nothign remarkable as far as I can see. I will be going over them all again with a fine toothed comb this morning.

Welp, looks like like the AJP connection (port 8009) between LiteSpeed and Lucee/Tomcat can’t play nice together, at least not out of the box. I switched the entire configuration to use the tomcat port 8888 (web server?) and now it can serve cfm pages AND handle POSTs to them… so i can now log in to the lucee admin too. Very very strange, and a shame i wasted hours on it. I’m all ears if anyone has a suggestion on how one might get it working, since my understanding is this is not the most performant configuration (?).

1 Like

UGH… but with the proxy config instead of (what i think is) AJP / servlet, I get no caching or other features of litespeed - it’s just a transparent proxy as it says, which defeats my purpose.

Why would the servlet config not be able to handle web form POSTs? This makes zero sense.

Is anyone out there? Might be ready to give up and go back to nginx… this has taken too much time, unfortunately.

1 Like

Just for posterity, since seeing this post, I have later developed a verified blueprint of Lucee and OpenLiteSpeed working on Ubuntu.

2 Likes