Lucee does start.. but after a long wait

This is my stack:
OS: Ubuntu 18.04 11.0.6+10
Java Version: 11.0.6 AdoptOpenJDK
Tomcat Version: 9.0.34
Lucee Version: 5.3.5.92

My Lucee server starts but it stops at this line
02-Sep-2020 21:34:03.812 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

And then it waits almost three minutes and it goes like this:

02-Sep-2020 21:37:57.515 WARNING [main] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [233,683] milliseconds.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender (file:/opt/lucee/lib/lucee-5.3.5.92.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

At around the same time in the application.log of the only website running:
“INFO”,“main”,“09/02/2020”,“21:38:00”,“OSGi”,“add bundle:/home/my-website/public_html/WEB-INF/lucee/context/lucee-admin.lar”
“INFO”,“main”,“09/02/2020”,“21:38:00”,“OSGi”,“add bundle:/home/my-website/public_html/WEB-INF/lucee/context/lucee-doc.lar”
“INFO”,“main”,“09/02/2020”,“21:38:00”,“OSGi”,“add bundle:/home/my-website/public_html/WEB-INF/lucee/context/lucee-context.lar”
“ERROR”,“main”,“09/02/2020”,“21:38:00”,“file”,“conflict in same thread: on /opt/lucee/tomcat/lucee-server/context/logs/out.log”
“ERROR”,“main”,“09/02/2020”,“21:38:00”,“file”,“conflict in same thread: on /opt/lucee/tomcat/lucee-server/context/logs/out.log”

It seems like it is stuck for some time finding TLD’s and then gives up and starts up anyway . Waiting for almost 4 minutes is, was enough for me to give up, so I actually only waited this long because I did give up and started browsing here to find a solution, and in the mean time actually had started! Phew…

I haven’t checked it, but you seem to be able to have tomcat skip the check by setting

tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

But that seems like skipping what is needed. Or is it a safe solution?

Anyway, I was used to quite a fast start, like under a minute, so what could be a solution here? Or maybe do I need to clean temp or cache folders?

Thanks!

Cheers Marcel

that’s a known problem with tomcat sometimes

Thanks.

I’m going to try the solution as described below. This seems indeed an entropy issue.

Great. This helped me a lot. Short summary:

You should check your current state of entropy:

cat /proc/sys/kernel/random/entropy_avail

If that is less than 1000, your bucket is getting empty.

Then install haveged. It will fill your entropy in a different way, but enough to make your bucket full again.

sudo apt-get install haveged

Then make sure it starts up after boot:

sudo update-rc.d haveged defaults

Now check your entropy again with

cat /proc/sys/kernel/random/entropy_avail

It should be around 2000

I tested the startup time of lucee, and the waiting time of 4 minutes is gone.

2 Likes