Missinginclude error for all .cfm files

I’ve installed Lucee on a multi site production server. Unfortunately it is not working. On the first site I’m trying to get to work I get a missing include error on any .cfm or .cfc page. Instead of going to the https://domain.com/page.cfm it is being directed to [C:\lucee\tomcat\webapps\ROOT\page.cfm] On the server I am getting a full error page and from a live page on another computer I just get a not found error.

I’ve been working on this for hours and am pretty wiped out - and out of ideas.

Don’t forget to tell us about your stack!

OS: windows 2012
Java Version: 8
Tomcat Version: Apache Tomcat/9.0.35
Lucee Version: Lucee 5.3.7.47

A warm welcome to our community @jomarie. Looks like your hosts(domainnames) haven’t been configured in Tomcat yet. The path location path-to-your-lucee-installati on\tomcat\webapps\ROOT\ is Tomcats default location webroot. It will always point to that path location in case you haven’t configured a hosts webroot in Tomcat. To give any further advice, please see my following questions:

  1. Did you install Lucee to work behind a webserver, such as IIS or Apache?
  2. Did you install Lucee by using the windows installer?
  3. If you have installed Lucee with the installer and behind IIS, did you install mod_cfml? Mod_cfml is the module that takes care to configure the IIS bindings in Tomcat: As soon as you hit a new site through IIS, it configures Tomcats bindings for you.

It is always important to know that to run Lucee behind a webserver, you always need to configure and assign the wwwroots and hostnames in both: the webserver AND in Tomcat. If you have installed mod_cfml, the module does it for you.

Now I double checked and added the host information to the Tomcat server.xml and restarted the Tomcat service. It won’t stay restarted. It only restarts for 3 seconds and then shuts down.

Ok. Can you see any valuable information/error in your catalina.out logfile?

I just tried starting from scratch and had the same luck - none.

So the catalina log shows
"21-Feb-2021 03:23:00.238 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [FelixResolver-8] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.7/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.7/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
java.base@11.0.7/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
java.base@11.0.7/java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458)
java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1053)
java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.7/java.lang.Thread.run(Thread.java:834)
21-Feb-2021 03:23:00.238 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler [“http-nio-8888”]
21-Feb-2021 03:23:00.238 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler [“ajp-nio-127.0.0.1-8009”]
"

Way above my head.

I reinstalled lucee and changed the system memory so I can now restart Lucee from the Administrator.

Now:

  • “The REST Servlet is not configured in your enviroment!” on the lucee admin home page.

  • Web contexts are not being created even after adding them to the tomcat server.xml file

  • trying to open a .cfm file gets the error “class not registered”

And the lucee administrator would restart but not tomcat. I literally have to reinstall lucee to get tomcat working which wipes the server.xml file clean so I can’t add contexts.

So the contexts ARE being created but I just can’t get tomcat to run again. I can see the folders in the tomcat > conf > Catalina folder.

So I did get tomcat working. A service needed to be turned off and the ports were added to the firewall. Still getting the (path)test.cfm “class not registered” error when trying to open a .cfm file.

How can this be? This is not possible, unless you habe another java servlet engine with Lucee running on that machine. Because: tomcat is what lucee (including the lucee administrator) needs to run on. If Tomcat didn’t start, but the Lucee Administrator did, then there must be another instance of a servlet container running on the machine.

If you reinstall tomcat, of course it will overwrite configuration files. That is normal. Server.xml is part of the installation. If you just want to update or upgrade Tomcat, a different approach would be needed.

You can choose:
a) To add context configuration manually by yourself (then mod_,cfml should be deactivated), or
b) let mod_,cfml do this job for you.

If you have mod_cfml enabled and you are adding the contexts also manually, then you may be running into problems.

Which service do you mean? Are you trying to run multiple Lucee installations in parallel? Was one windows service blocking port 8888 or blocking AJP port 8009?

It was rdpguard - to block ddos attacks etc.

There was something in plesk that was using one of the ports (It’s on a plesk server - I actually didn’t think of that because I never use it, just do all my work around plesk.)

Unfortunately it only worked once and now tomcat is off again. If I can just get one more good reboot with the host settings in the server file I think I’ll be good. But then I haven’t had any sleep for two days Haha.

Ohhh… I wish I had an easy solution for you, so you could get some sleep. You are probably having more things running on that server that may be conflicting with the setup. If Tomcat can’t start, it is very likely that one of the following things are happening:

  • one of the ports (8888 or 8009) is already being used,
  • configuration files like server.xml are malformatted, or
  • the user running tomcat doesn’t have all the file permissions it needs to write/read files were it needs to

There certainly are other causes, but the above are most likely.

If that is the case, you would probably need more manual adjustments, like ports reassignement etc. Maybe someone who also uses plesk might have an idea.

Thanks, those are things to look at.

I have downloaded the install files onto a “sister” server over the weekend and that one worked with only a few hours of mistakes on my part. So I’d be surprised if it was the server.xml file.

And I did run the tomcat control as admin - but I can check that out too. I’ll have to find the documentation on permissions of course.

I appreciate your help. Thanks.

Hopefully this is the final post. We were able to get the tomcat service to work - it WAS ultimately a permissions issue. Once that worked the contexts populated just as they were supposed to. The sites are connected to their databases and I’m so relieved I can’t tell you!

Thanks for your help!

1 Like

Looks like it may not have been the issue but Tomcat & Plesk can be…problematic. Or at least they used to be. (permissions -were- a problem then and maybe now?)

Thought I’d drop this link for anyone searching the forum with “plesk” If this 10 yr old post isn’t exactly up to date, it may at least point in a direction that helps. Installing Railo/Tomcat on 64 bit Windows Server 2008 R2 with IIS 7.5 and Plesk – The Correct Way | Sid's FishNet

Thanks Jay.