Adam Cameron
Mark Drew (he/him)
08/04/2023, 9:11 AMRUN LUCEE_ENABLE_WARMUP=true ${CATALINA_HOME}/bin/catalina.sh runMark Drew (he/him)
08/04/2023, 9:11 AMMark Drew (he/him)
08/04/2023, 9:12 AMAdam Cameron
Adam Cameron
LUCEE_ENABLE_WARMUP), I don't need to tell Lucee what to warm? I'm not adding any external modules or anything, I'm just wanting frickin encodeForHtml to frickin work when we call it (etc).Adam Cameron
Mark Drew (he/him)
08/04/2023, 9:38 AMAdam Cameron
Adam Cameron
encodeForHtmlAdam Cameron
Adam Cameron
Mark Drew (he/him)
08/04/2023, 9:42 AMAdam Cameron
encodeForHtmlAdam Cameron
Adam Cameron
In the OSGi Bundle with the name [esapi.extension] and the version [2.2.4.7] was no class with name [org.lucee.extension.esapi.functions.EncodeForHTML] found
Not sure what that might mean if it was presented in coherent English.
Also this gets logged:
org.osgi.framework.BundleException: Unable to resolve esapi.extension [70](R 70.0): missing requirement [esapi.extension [70](R 70.0)]Adam Cameron
omcat is launched with the environment variablesSo I need to haveand$LUCEE_ENABLE_WARMUP, so that Lucee does an initial run, creates all required directories and files, and downloads extensions if specified.$LUCEE_EXTENSIONS
$LUCEE_EXTENSIONS specified for it to do anything?
I hasten to add, I'm not trying to load an "extension" (something third-party), I'm trying to get native CFML functionality to work. Stuff that worked fine without all this shite in 5.3, but is now broke in 5.4...Mark Drew (he/him)
08/04/2023, 9:57 AMAdam Cameron
Mark Drew (he/him)
08/04/2023, 9:58 AMAdam Cameron
Adam Cameron
Mark Drew (he/him)
08/04/2023, 9:58 AMADD <https://cdn.lucee.org/lucee-${LUCEE_VERSION}.jar> ${CATALINA_BASE}/lib/ext/lucee-${LUCEE_VERSION}.jar
RUN echo "Setting password to ${LUCEE_PASSWORD}"
RUN mkdir -p /www/lucee/lucee-server/context && echo "${LUCEE_PASSWORD}" > /www/lucee/lucee-server/context/password.txt
COPY ./lucee_extensions /www/lucee/lucee-server/deploy
# Warmup to install extensions
RUN LUCEE_ENABLE_WARMUP=true ${CATALINA_HOME}/bin/catalina.sh runMark Drew (he/him)
08/04/2023, 9:59 AMFROM tomcat:9.0.68-jre11-temurin-jammyAdam Cameron
5.4.1.8-nginx from Lucee)
OK, but you've got that COPY ./lucee_extensions /www/lucee/lucee-server/deploy step too.Mark Drew (he/him)
08/04/2023, 10:02 AMAdam Cameron
Adam Cameron
Adam Cameron
Adam Cameron
Mark Drew (he/him)
08/04/2023, 3:29 PMAdam Cameron
Mark Drew (he/him)
08/04/2023, 3:58 PMdive that shows you the layers of an image you have built. So you can see what goes in at each stage
https://dev.to/cloudx/analyzing-the-docker-layers-with-dive-5e7oAdam Cameron
jamiejackson
08/04/2023, 9:57 PMAdam Cameron
jamiejackson
08/04/2023, 10:01 PMAdam Cameron
jamiejackson
08/04/2023, 10:02 PMAdam Cameron
jamiejackson
08/04/2023, 10:02 PMIn my case it could have been pebcak or some transient think though,i don't think so, i think you'll see the same issue for a small percentage of your builds.
jamiejackson
08/04/2023, 10:03 PMjamiejackson
08/04/2023, 10:03 PMAdam Cameron
jamiejackson
08/04/2023, 10:04 PMjamiejackson
08/04/2023, 10:07 PMRUN LUCEE_ENABLE_WARMUP=true ${CATALINA_HOME}/bin/catalina.sh run to half 😕 install it
• copy a mini application to the web root which calls encodeForHtml()
• loop a curl on the above application (e.g., localhost:8888/myLittleGoofyApp.cfm) until it stops throwing errors
• remove the mini-application
• continue with the docker buildjamiejackson
08/04/2023, 10:08 PMjamiejackson
08/04/2023, 10:09 PMjamiejackson
08/04/2023, 10:15 PMIt really has a feel of "Lucee is designed for devs' machines" or something, to meto me, it has the feel of an installer that was born in the era before IaC and isn't quite there yet.
jamiejackson
08/04/2023, 10:17 PMcfconfig.json configs) help a lot, but the deferred installation is still a headache.Adam Cameron
Adam Cameron
jamiejackson
08/07/2023, 5:38 PMjamiejackson
08/07/2023, 5:39 PMjamiejackson
08/07/2023, 5:41 PMjamiejackson
08/08/2023, 5:01 PMNo matching function [ISIMAGEFILE] found;lucee.runtime.exp.ExpressionException: No matching function [ISIMAGEFILE] foundjamiejackson
08/08/2023, 5:06 PMjamiejackson
08/08/2023, 5:08 PMjamiejackson
08/08/2023, 5:10 PMjamiejackson
08/08/2023, 6:42 PMjamiejackson
08/08/2023, 6:47 PMbdw429s
08/08/2023, 9:45 PMmight i have to worry about this for the Ortus Redis extension,@jamiejackson I'm not quite sure what "this" is (just got back from holiday and only skimmed the thread), but if "this" is extensions not actually bundling the OSGI bundles they require and expecting Lucee to automatically download what it needs later, then no you shouldn't need to worry about it. We bundle all the jars needed in the extension.
bdw429s
08/08/2023, 9:46 PMjamiejackson
08/08/2023, 9:50 PMENV LUCEE_EXTENSIONS ${LUCEE_EXTENSIONS},FAD1E8CB-4F45-4184-86359145767C29DE;name=Hibernate ORM Engine;version=3.5.5.89
RUN LUCEE_ENABLE_WARMUP=true /usr/local/tomcat/bin/catalina.sh start
but that doesn't really completely install it. you have to actually call an orm function before it truly completes the installation. in other words, it defers (complete) installation until runtime.jamiejackson
08/08/2023, 9:51 PMjamiejackson
08/08/2023, 9:52 PMjamiejackson
08/08/2023, 9:54 PMjamiejackson
08/08/2023, 9:57 PMbdw429s
08/08/2023, 10:05 PMbdw429s
08/08/2023, 10:06 PMbdw429s
08/08/2023, 10:06 PMbdw429s
08/08/2023, 10:07 PMjamiejackson
08/08/2023, 10:07 PMjamiejackson
08/08/2023, 10:08 PMjamiejackson
08/08/2023, 10:08 PMbdw429s
08/08/2023, 10:08 PMjamiejackson
08/08/2023, 10:09 PMbdw429s
08/08/2023, 10:10 PMbdw429s
08/08/2023, 10:10 PMjamiejackson
08/08/2023, 10:10 PMbdw429s
08/08/2023, 10:11 PMbdw429s
08/08/2023, 10:12 PMjamiejackson
08/08/2023, 10:13 PMENV LUCEE_EXTENSIONS ${LUCEE_EXTENSIONS},FAD1E8CB-4F45-4184-86359145767C29DE;name=Hibernate ORM Engine;version=3.5.5.89
RUN LUCEE_ENABLE_WARMUP=true /usr/local/tomcat/bin/catalina.sh start
no manual downloads or anything.
however, in the case of orm (and now esapi and image), i'm creating/running little apps in Dockerfile after that installation which call functions from those extensions.jamiejackson
08/08/2023, 10:13 PMI would recommend turning up the log level on the deploy log, and capturing the contents of that file (server and web context) when Lucee fails to look for clues.i could use a hint on how to do that.
jamiejackson
08/08/2023, 10:16 PMjamiejackson
08/08/2023, 10:19 PMbdw429s
08/08/2023, 10:29 PMfor installation, i'm literally doing this.So that means you're relying on Lucee to download the lex file over the internet. Which, is at the mercy of the Lucee update server to be online at that moment. I would assume you're just having a lex that fails to download every once in a great while.
bdw429s
08/08/2023, 10:30 PMextensions/available folder before downloading, but you'd need to also ensure you manually downloaded the correct versions for Lucee to use it.bdw429s
08/08/2023, 10:30 PMbdw429s
08/08/2023, 10:31 PMcfconfig_loggers_deploy_level=trace
sould do the trickjamiejackson
08/09/2023, 2:43 PM<logger appender="resource" appender-arguments="path:{lucee-config}/logs/deploy.log" layout="classic" level="error" name="deploy"/>bdw429s
08/09/2023, 3:30 PMjq to do it for you.jamiejackson
08/09/2023, 7:23 PMjamiejackson
08/09/2023, 7:25 PMjamiejackson
08/09/2023, 7:26 PMjamiejackson
08/09/2023, 7:36 PMbdw429s
08/09/2023, 7:38 PMunsuccessfully installed extensions
but I think your trace log levels aren't being used for the deploy log, or we'd know.jamiejackson
08/09/2023, 7:39 PMjamiejackson
08/09/2023, 7:40 PMbut I think your trace log levels aren't being used for the deploy log, or we'd know.what would be the telltale of a successful level-setting? i don't know what to look for (since i don't know what detailed logs there might be).
bdw429s
08/09/2023, 7:42 PMjamiejackson
08/09/2023, 7:42 PMjamiejackson
08/09/2023, 7:43 PMbdw429s
08/09/2023, 7:44 PMbdw429s
08/09/2023, 7:44 PMbdw429s
08/09/2023, 7:45 PMjamiejackson
08/09/2023, 7:45 PMjamiejackson
08/09/2023, 7:46 PMbdw429s
08/09/2023, 7:51 PMset cfconfig_loggers_deploy_level=trace
set cfconfig_web_loggers_deploy_level=trace
server start
in an new folder in CommandBox and the web context deploy log had nothing but headers, but the server context was 81KB!bdw429s
08/09/2023, 7:52 PMbdw429s
08/09/2023, 7:52 PMbdw429s
08/09/2023, 7:52 PMjamiejackson
08/09/2023, 7:52 PMbdw429s
08/09/2023, 7:55 PMbdw429s
08/09/2023, 7:56 PMjamiejackson
08/09/2023, 7:56 PMbdw429s
08/09/2023, 7:56 PMjamiejackson
08/09/2023, 8:04 PMjamiejackson
08/09/2023, 8:24 PMjamiejackson
08/09/2023, 8:26 PMjamiejackson
08/09/2023, 8:40 PMLUCEE_ENABLE_WARMUP=true /usr/local/tomcat/bin/catalina.sh start
to:
prewarm.sh
and i'm getting a lot more activity from that stage.
i had thought those were equivalent, but maybe they're notjamiejackson
08/09/2023, 8:42 PMjamiejackson
08/09/2023, 9:02 PMjamiejackson
08/09/2023, 9:09 PMLUCEE_ENABLE_WARMUP=true /usr/local/tomcat/bin/catalina.sh start had once been equivalent to prewarm.sh, but last september, that seems to have changed: https://github.com/lucee/lucee-dockerfiles/commit/518b15940bb56153ae75f220514922291f4ba1c7
so it looks like it's best to use the canonical prewarm.sh . for now, it's looking like that does what we'd expect it to.
i know at one point, i advised you to use LUCEE_ENABLE_WARMUP=true /usr/local/tomcat/bin/catalina.sh start so i want to make a correction.jamiejackson
08/09/2023, 9:09 PMjamiejackson
08/09/2023, 9:15 PMtrace forever since they're useful, and not very verbose.bdw429s
08/09/2023, 9:23 PMjamiejackson
08/09/2023, 9:25 PMprewarm.sh didn't export it, either, but something must have changed. i'm going to switch to prewarm.sh, though, so if something changes again in the future, it should be more reliable.bdw429s
08/09/2023, 9:28 PMAdam Cameron
jamiejackson
08/22/2023, 4:18 PMLUCEE_ENABLE_WARMUP=true /usr/local/tomcat/bin/catalina.sh is worse than useless, since it's misleading. it plain doesn't work (and maybe never did). besides, it's not canonical.
• prewarm.sh works. it does what i expect under the covers and it hasn't let me down since i switched to it a couple weeks ago. it's canonical, to boot.
• if you're NOT using the OFFICIAL docker image, you may have to do this instead (untested):
# the `export` seems to be key.
export LUCEE_ENABLE_WARMUP=true
# now tomcat will actually wait for installation to complete before shutting down
/usr/local/tomcat/bin/catalina.sh start
Or the Dockerfile equivalent:
RUN export LUCEE_ENABLE_WARMUP=true \
&& /usr/local/tomcat/bin/catalina.sh startAdam Cameron