bug #9236
closed
stopping an instance breaks the centralized logging
Added by Andreas Kohlbecker over 3 years ago.
Updated about 2 years ago.
Description
since switching to centralized logging through logback MDC (#7085) the logging gets broken when an cdm-webapp instance in the cdm-server is being stopped. Also (some) web services are broken afterwards.
To reproduce:
- stop an instance in the cdm-server management console
- ==> the last entry in the log file is
e.e.cdm.server.instance.CdmInstance - lifeCycleStopping
and no more logs are received.
IMPORTANT This has also observed on the production sever in a situation when some cdm instances have showed strange behavior. So this issue is critical and it is highly recommended not to stop an instance on the production server as long as this issue is not solved.
- Related to bug #7085: cdmserver logfiles getting too big, use RollingFileAppender added
- Description updated (diff)
Further test showed that some service endpoints in fact are broken in the situation described above.
- Description updated (diff)
- Subject changed from stopping an intance breaks the centralized logging to stopping an instance breaks the centralized logging
- Target version changed from Release 5.19 to Release 5.21
- Target version changed from Release 5.21 to Release 5.22
- Target version changed from Release 5.22 to Release 5.25
- Target version changed from Release 5.25 to Release 5.45
The problem is caused by the LoggerContext
being shutdown by the LogbackServletContextListener
in LogbackServletContextListener.contextDestroyed(ServletContextEvent sce)
.
This effectively stops the shared logging context of all web-app instances.
The proposed solution is to
- unregister the LogbackServletContextListener, or
- to register a alternative ContextListener that checks the number of cdm-remote instances that are still running. The
LoggerContext
only is shut down when no more instances are available.
- Status changed from New to In Progress
- Status changed from In Progress to Resolved
- % Done changed from 0 to 50
- Assignee changed from Andreas Kohlbecker to Katja Luther
solved by excluding the LogbackServletContainerInitializer from the configuration.
Please review
- Status changed from Resolved to Closed
- Assignee changed from Katja Luther to Andreas Kohlbecker
- Target version changed from Release 5.45 to Release 5.29
Also available in: Atom
PDF