Liferay tomcat application issues

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text :slight_smile:

TIP 1: select at least one tag that further categorizes your topic. For example server for APM Server related questions, java for questions regarding the Elastic APM Java agent, or ui for questions about the APM App within Kibana.

TIP 2: Check out the troubleshooting guide first. Not only will it help you to resolve common problems faster but it also explains in more detail which information we need before we can properly help you.

Kibana version: 7.1.1

Elasticsearch version: 7.1.1

APM Server version: 7.1.1

APM Agent language and version: elastic-apm-agent-1.18.0.RC1.jar

Browser version: Chrome Version 84.0

Original install method (e.g. download page, yum, deb, from source, etc.) and version: downloaded the rpm files and installed them manually. started the components as services.

Fresh install or upgraded from other version?: fresh install

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

Steps to reproduce:

  1. Start the application with elastic apm agent parameters
  2. Check logs
  3. Observe catalina.out output

Errors in browser console (if relevant): no

Provide logs and/or server output (if relevant):

Starting the liferay application (runs in tomcat) without the agent outputs not errors inside catalina.out

However, starting the application with the elastic apm agent outputs some errors.

This is my setenv.sh file
Logs without the agent started
Logs with the agent started

The application is starting eventually, even the GET/POST requests are visible in Kibana->APM, however, I would very much like to solve the errors.

Can you help me guys?

Many thanks,
Catalin

Hi and welcome to the forum! :wave:

Thanks for reporting this issue. We have lately been dealing with issues related to the initialization of our logging, which relies on log4j.

This specific case seems to be a bug in the Tomcat's implementation for JUL - according to the stack trace you provided, the construction of an org.apache.juli.AsyncFileHandler instance causes the invocation of a static method of LocaleProviderAdapter, even though this happens during the LocaleProviderAdapter class's static initialization, which means a static method is invoked on a non-initialized class.

Nevertheless, it seems that we can avoid a lot of these problems by delaying our logging initialization. This is easier said (or written) than done, as we will need to distinguish logging of events before and after the initialization, so this is something we will have to look into.

Currently, as long as there are no other side effects, please continue using the Java agent and just ignore these errors until we decide how we deal with them. If you DO encounter side effects, please let us know.

Hi Eyal_Koren,

Thanks for the information provided.
I will keep you updated if something else appears.
So, most probably these errors will go away in a future release of the APM Agent, right?

Many thanks,
Catalin

I believe so, but I can't guarantee when. I will have a closer look when I get the chance.

It may already behave a bit differently in you use the latest snapshot from master, as we already applied some changes in this area.

All right.
I will try it and come back with feedback.

Thanks!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.