Logging issues in 5.3.9

We’re a little late to the 5.3.9 party. I saw some posts related to logging, but we’re seeing an issue related to logging I’m not sure has been addressed elsewhere.

We log to a MySQL datasource. After installing 5.3.9 everything generally works fine, but our log table remains empty when it should contain a number of records. If the Lucee service is stopped and restarted, we see the exception below and can’t access any application or the Administrator.

javax.servlet.ServletException: datasource [logs] doesn't exist
	lucee.runtime.config.ConfigImpl.getDataSource(ConfigImpl.java:2534)
	lucee.commons.io.log.log4j2.appender.DatasourceAppender.pool(DatasourceAppender.java:199)
	lucee.commons.io.log.log4j2.appender.DatasourceAppender.getConnection(DatasourceAppender.java:206)
	lucee.commons.io.log.log4j2.appender.DatasourceAppender.touchTable(DatasourceAppender.java:154)
	lucee.commons.io.log.log4j2.appender.DatasourceAppender.<init>(DatasourceAppender.java:52)
	lucee.commons.io.log.log4j2.Log4j2Engine.getDatasourceAppender(Log4j2Engine.java:501)
	lucee.commons.io.log.log4j2.Log4j2Engine.getAppender(Log4j2Engine.java:334)
	lucee.commons.io.log.LoggerAndSourceData.getLog(LoggerAndSourceData.java:135)
	lucee.runtime.config.ConfigImpl.getLog(ConfigImpl.java:3705)
	lucee.runtime.config.ConfigImpl.getLog(ConfigImpl.java:3694)
	lucee.commons.io.log.LogUtil.log(LogUtil.java:107)
	lucee.commons.io.log.LogUtil.log(LogUtil.java:78)
	lucee.runtime.engine.CFMLEngineImpl.loadJSPFactory(CFMLEngineImpl.java:919)
	lucee.runtime.engine.CFMLEngineImpl.addServletConfig(CFMLEngineImpl.java:796)
	lucee.loader.engine.CFMLEngineWrapper.addServletConfig(CFMLEngineWrapper.java:87)
	lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:211)
	lucee.loader.servlet.CFMLServlet.init(CFMLServlet.java:42)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.base/java.lang.Thread.run(Unknown Source)

I checked C:\lucee\tomcat\lucee-server\context\lucee-server.xml and the “logs” datasource appears like the other datasources, which were working fine before the restart.

Is this related to any known regressions?

Thanks… Simon

OS: Windows 11
Java Version: 11.0.15
Tomcat Version: 9.0.62
Lucee Version: 5.3.9.141

It’s known - sort of … most recent conversation here - although a new dedicated thread may be helpful.

It’s my understanding that a 3rd release is intended.

LDEV log issues I’m keeping an eye on are:
[LDEV-3978] - Lucee - In the comments there’s a reference to the other saying it was fixed there.
[LDEV-4035] - Lucee - The fix version is marked 5.3.9.143 (snapshot).

While we see a snapshot of 150 in the admin, Searching JIRA, nothing goes beyond .148 - so for us, we’re holding/waiting for the next stable release.

@Simon_Goldschmidt Yes, this was a known issue. Ticket for this issue in Jira LDEV-4034 - Regression - application log datasource appender throws 500 – Internal Server Error on lucee restart.

Also, this issue was fixed in lucee 5.3.10.22-SNAPSHOT and 5.3.9.146-SNAPSHOT.
So please update your server to the latest snapshot 5.3.9.150-SNAPSHOT.

2 Likes

From the admin update page:

Snapshots : Snapshots are generated automatically with every push to the repository, when all bundled test cases pass successfully. Snapshots are NOT recommended for production environments.

Is this still production environment advice still accurate?

generally speaking, SNAPSHOTS post release are pretty stable, with only minor fixes

there are currently no known issues with the builds after 5.3.9.141, but you still need to test them out before running them on production (same goes for stable releases TBH)

1 Like

“there are currently no known issues with the builds after 5.3.9.141”

I mentioned on [LDEV-3978] - Lucee that 5.3.9.145-SNAPSHOT-nginx has seriously broken logging with CFlog - <cflog text="goo"/> doesn’t work (!)

There’s a full repo. case on the issue.

Thanks for the input. Updating to 5.3.9.150 sorted our logging issue.

5.3.9.150-SNAPSHOT-nginx still doesn’t write log files here

@thefalken
I did see this one about log levels being reset to ERROR
https://luceeserver.atlassian.net/browse/LDEV-4035

Did you double check the loglevel?

What log level ? This is a brand new empty site, not even a WEB-INF folder.

I can confirm we just bumped up against this again in our dev environment (windoze on a vm).

  • 5.3.9.150-SNAPSHOT does not appear to contain the needed fix.

If more details are needed, LMK but I believe LDEV-3978 contains the needed info.

Bump.