Showing posts with label logging. Show all posts
Showing posts with label logging. Show all posts

Saturday, December 20, 2025

Weblogic 14.1.2 change logging date format pattern on system logs to YYYY-MM-DD

 

HOWTO

Customizing Domain Wide Server Parameters

To customize domain wide server parameters in WebLogic Server, configure setUserOverrides.cmd (Windows) or setUserOverrides.sh (UNIX) libraries by specifying the required Java command line options and environment variables to it.

Every domain includes dynamically generated domain and server startup scripts, such as setDomainEnv. Oracle recommends that you do not modify these startup scripts, as any changes you make to them will be overwritten during subsequent domain upgrade operations.

To enable you to customize server startup parameters that apply to the servers in a domain, there are two scripts that you can provide: setUserOverrides.cmd and setUserOverridesLate.cmd (Windows) or setUserOverrides.sh and setUserOverridesLate.sh (UNIX). The setUserOverrides script will be executed early in the setDomainEnv script, before any domain extension template properties have been set. The setUserOverridesLate script will be executed later after the domain extension template properties have been set. These scripts can be configured to, for example, add custom libraries to the WebLogic Server classpath, specify additional java command line options for running the servers, or specify additional environment variables. Any customizations you add to these files are preserved during domain upgrade operations and are carried over to remote servers when using the pack and unpack commands.

To assure your customizations effectively override all product defaults, add your customizations to the setUserOverridesLate script, otherwise your customizations may be overridden by product extensions when using setUserOverrides.

Log format pattern - set via Weblogic console or WLST



dave@dave:/app/domains/dave_domain$ grep -2  pattern  config/config.xml 
  </security-configuration>
  <log>
    <date-format-pattern>yyyy-MM-dd'T'HH:mm:ss,SSSz</date-format-pattern>
  </log>
  <server>
--
    </ssl>
    <log>
      <date-format-pattern>yyyy-MM-dd'T'HH:mm:ss,SSSz</date-format-pattern>
    </log>
    <listen-address></listen-address>


setUserOverrides.sh called from setDomainEnv.sh 

# Set user overrides, if available.

if [ -f ${DOMAIN_HOME}/bin/setUserOverrides.sh ] ; then
        . ${DOMAIN_HOME}/bin/setUserOverrides.sh
fi

Add into start script

#!/bin/sh

# WARNING: This file is created by the Configuration Wizard.
# Any changes to this script may be lost when adding extensions to this configuration.

DOMAIN_HOME="/app/domains/dave_domain"

export JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.util.logging.config.file=/app/domains/dave_domain/logging.properties"

${DOMAIN_HOME}/bin/startWebLogic.sh $*

Add logging.properties file for domain

dave@dave:~$ cat /app/domains/dave_domain/logging.properties
# WebLogic Unified Logging Configuration
# Forces all Java Util Logging to use WebLogic's log format

# Use WebLogic's log handler
handlers = weblogic.logging.ServerLoggingHandler

# Default logging level
.level = INFO

# Configure WebLogic handler to use the standard format
weblogic.logging.ServerLoggingHandler.level = INFO
weblogic.logging.ServerLoggingHandler.formatter = weblogic.logging.WLLogFormatter

# Subsystem-specific logging levels
weblogic.wsee.level = INFO
weblogic.wsee.runtime.level = INFO


Weblogic start log 


ave@dave:/app/domains/dave_domain$ ./startWebLogic.sh 
.
.
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000
.
CLASSPATH=/home/app/weblogic-14.1.2/wlserver/../oracle_common/modules/com.oracle.webservices.wls.wls-jaxrpc.jar::/home/app/weblogic-14.1.2/wlserver/server/lib/weblogic.jar:/home/app/weblogic-14.1.2/wlserver/../oracle_common/modules/thirdparty/ant-contrib-1.0b3.jar:/home/app/weblogic-14.1.2/wlserver/modules/features/oracle.wls.common.nodemanager.jar::/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbynet.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbytools.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyclient.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derby.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyshared.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyoptionaltools.jar
.
PATH=/app/domains/dave_domain/bin:/home/app/weblogic-14.1.2/wlserver/server/bin:/home/app/weblogic-14.1.2/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/apache-ant/bin:/usr/lib/jvm/jdk-21.0.5-oracle-x64/bin:/usr/lib/jvm/jdk-21.0.5-oracle-x64/bin:/app/weblogic/oracle_common/modules/thirdparty/apache-maven_bundle/3.6.1.0.0/apache-maven-3.6.1//bin:/app/weblogic/wit/imagetool/bin:/app/weblogic-deploy/bin/:/usr/java/jdk-21/bin:/usr/share/maven/bin:/opt/google:/opt/jmc/jmc-8.3.1_linux-x64/JDK_Mission_Control:/app/weblogic/oracle_common/modules/thirdparty/apache-maven_bundle/3.6.1.0.0/apache-maven-3.6.1//bin:/app/weblogic/wit/imagetool/bin:/app/weblogic-deploy/bin/:/home/dave/.local/bin:/home/dave/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/var/lib/snapd/snap/bin
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
Starting WLS with line:
/usr/lib/jvm/jdk-21.0.5-oracle-x64/bin/java -server   -Xms256m -Xmx512m -XX:CompileThreshold=8000 -cp /home/app/weblogic-14.1.2/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=AdminServer -Djava.security.policy=/home/app/weblogic-14.1.2/wlserver/server/lib/weblogic.policy  -Djava.util.logging.config.file=/app/domains/dave_domain/logging.properties -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -Dweblogic.log.RedirectStdoutToServerLogEnabled=true -Dweblogic.log.StdoutSeverity=Info -Duser.language=en -Duser.country=US  -javaagent:/home/app/weblogic-14.1.2/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/home/app/weblogic-14.1.2/wlserver/server -Dweblogic.home=/home/app/weblogic-14.1.2/wlserver/server      weblogic.Server
[0.027s][warning][cds] Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.oracle.classloader.weblogic.LaunchClassLoader"). To use archived non-system classes, this property must not be set
<Dec 21, 2025, 9:55:42 PM Central European Standard Time> <Info> <Default> <BEA-000000> <JceConfig is unknown> 
<Dec 21, 2025, 9:55:42 PM Central European Standard Time> <Info> <Default> <BEA-000000> <FIPS compliant operation not available for configuration type OTHER> 
<Dec 21, 2025, 9:55:42 PM Central European Standard Time> <Info> <Default> <BEA-000000> <JceConfig is in non-FIPS mode> 
<Dec 21, 2025, 9:55:42 PM Central European Standard Time> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 21.0.5+9-LTS-239 from Oracle Corporation.> 
<Dec 21, 2025, 9:55:42 PM Central European Standard Time> <Info> <Management> <BEA-141107> <Version: WebLogic Server 14.1.2.0.0  Tue Nov 26 02:40:45 GMT 2024 2171472> 
<Dec 21, 2025, 9:55:43 PM Central European Standard Time> <Info> <Management> <BEA-141340> <Server starting with ProductionModeEnabled=false> 
<Dec 21, 2025, 9:55:43 PM Central European Standard Time> <Info> <Management> <BEA-141341> <Server starting with SecureModeEnabled=false> 
<Dec 21, 2025, 9:55:44 PM Central European Standard Time> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> 
<Dec 21, 2025, 9:55:44 PM Central European Standard Time> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.> 
<2025-12-21T21:55:44,226CET> <Info> <WebLogicServer> <BEA-000214> <WebLogic Server "AdminServer" version:
WebLogic Server 14.1.2.0.0  Tue Nov 26 02:40:45 GMT 2024 2171472 Copyright (c) 1995,2024, Oracle and/or its affiliates. All rights reserved.> 
<2025-12-21T21:55:44,243CET> <Info> <Server> <BEA-002622> <The protocol "t3" is now configured.> 
<2025-12-21T21:55:44,243CET> <Info> <Server> <BEA-002622> <The protocol "t3s" is now configured.> 
<2025-12-21T21:55:44,244CET> <Info> <Server> <BEA-002622> <The protocol "http" is now configured.> 
<2025-12-21T21:55:44,245CET> <Info> <Server> <BEA-002622> <The protocol "https" is now configured.> 
<2025-12-21T21:55:44,246CET> <Info> <Server> <BEA-002622> <The protocol "iiop" is now configured.> 
<2025-12-21T21:55:44,246CET> <Info> <Server> <BEA-002622> <The protocol "iiops" is now configured.> 
<2025-12-21T21:55:44,247CET> <Info> <Server> <BEA-002622> <The protocol "ldap" is now configured.> 
<2025-12-21T21:55:44,248CET> <Info> <Server> <BEA-002622> <The protocol "ldaps" is now configured.> 
<2025-12-21T21:55:44,250CET> <Info> <Server> <BEA-002622> <The protocol "cluster" is now configured.> 
<2025-12-21T21:55:44,250CET> <Info> <Server> <BEA-002622> <The protocol "clusters" is now configured.> 
<2025-12-21T21:55:44,253CET> <Info> <Server> <BEA-002622> <The protocol "snmp" is now configured.> 
<2025-12-21T21:55:44,254CET> <Info> <Server> <BEA-002622> <The protocol "admin" is now configured.> 
<2025-12-21T21:55:44,254CET> <Info> <Server> <BEA-002624> <The administration protocol is "t3s" and is now configured.> 
<2025-12-21T21:55:44,291CET> <Info> <RJVM> <BEA-000570> <Network Configuration for Channel "AdminServer"
 Listen Address         :7001
 Public Address         N/A
 Http Enabled         true
 Tunneling Enabled     true
 Outbound Enabled     false
 Admin Traffic Enabled     true ResolveDNSName Enabled     false> 
<2025-12-21T21:55:44,291CET> <Info> <RJVM> <BEA-000570> <Network Configuration for Channel "AdminServer"
 Listen Address         :7002 (SSL)
 Public Address         N/A
 Http Enabled         true
 Tunneling Enabled     true
 Outbound Enabled     false
 Admin Traffic Enabled     true ResolveDNSName Enabled     false> 
<2025-12-21T21:55:44,333CET> <Info> <Server> <BEA-002609> <Channel Service initialized.> 
<2025-12-21T21:55:44,582CET> <Info> <XML> <BEA-130036> <Initializing XMLRegistry> 
<2025-12-21T21:55:44,599CET> <Info> <Socket> <BEA-000436> <Allocating 4 reader threads.> 
<2025-12-21T21:55:44,599CET> <Info> <Socket> <BEA-000446> <Native I/O enabled.> 
<2025-12-21T21:55:44,610CET> <Info> <Management> <BEA-141278> <Java entropy configuration is: System property "java.security.egd= null"; JRE's java.security file property "securerandom.source= file:/dev/random"; Blocking Config= true; JDK version= 21.0.5; Operating System= Linux.> 
<2025-12-21T21:55:44,611CET> <Info> <Management> <BEA-141279> <Detected BLOCKING java entropy configuration. This is the most secure setting, but may cause performance issues on machines with few sources of entropy.> 
<2025-12-21T21:55:44,611CET> <Info> <Management> <BEA-141187> <Java system properties are defined as follows: 
file.encoding = UTF-8
file.separator = /
java.class.path = /home/app/weblogic-14.1.2/wlserver/../oracle_common/modules/com.oracle.webservices.wls.wls-jaxrpc.jar:/home/app/weblogic-14.1.2/wlserver/server/lib/weblogic.jar:/home/app/weblogic-14.1.2/wlserver/modules/features/oracle.wls.common.nodemanager.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbynet.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbytools.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyclient.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derby.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyshared.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyoptionaltools.jar
java.class.version = 65.0
java.home = /usr/lib/jvm/jdk-21.0.5-oracle-x64
java.io.tmpdir = /tmp
java.library.path = ::/home/app/weblogic-14.1.2/wlserver/server/native/linux/x86_64:/home/app/weblogic-14.1.2/wlserver/server/native/linux/x86_64/oci920_8:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory
java.naming.factory.url.pkgs = weblogic.jndi.factories:weblogic.corba.j2ee.naming.url:weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 21.0.5+9-LTS-239
java.security.policy = /home/app/weblogic-14.1.2/wlserver/server/lib/weblogic.policy
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 21
java.system.class.loader = com.oracle.classloader.weblogic.LaunchClassLoader
java.util.logging.config.file = /app/domains/dave_domain/logging.properties
java.vendor = Oracle Corporation
java.vendor.url = https://java.oracle.com/
java.vendor.url.bug = https://bugreport.java.com/bugreport/
java.version = 21.0.5
java.version.date = 2024-10-15
java.vm.compressedOopsMode = 32-bit
java.vm.info = mixed mode, sharing
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 21
java.vm.vendor = Oracle Corporation
java.vm.version = 21.0.5+9-LTS-239
javax.management.builder.initial = weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder
javax.rmi.CORBA.PortableRemoteObjectClass = weblogic.iiop.PortableRemoteObjectDelegateImpl
javax.rmi.CORBA.UtilClass = weblogic.iiop.UtilDelegateImpl
jdk.debug = release
launch.use.env.classpath = true
native.encoding = UTF-8
org.omg.CORBA.ORBClass = weblogic.corba.orb.ORB
org.omg.CORBA.ORBSingletonClass = weblogic.corba.orb.ORB
os.arch = amd64
os.name = Linux
os.version = 6.17.12-300.fc43.x86_64
path.separator = :
stderr.encoding = UTF-8
stdout.encoding = UTF-8
sun.arch.data.model = 64
sun.boot.library.path = /usr/lib/jvm/jdk-21.0.5-oracle-x64/lib
sun.cpu.endian = little
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = weblogic.Server
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = UTF-8
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
user.country = US
user.dir = /home/app/domains/dave_domain
user.home = /home/dave
user.language = en
user.name = dave
user.timezone = Europe/Prague
vde.home = /home/app/domains/dave_domain/servers/AdminServer/data/ldap
weblogic.Name = AdminServer
weblogic.home = /home/app/weblogic-14.1.2/wlserver/server
weblogic.log.RedirectStdoutToServerLogEnabled = true
weblogic.log.StdoutSeverity = Info
wls.home = /home/app/weblogic-14.1.2/wlserver/server
.> 
<Dec 21, 2025, 9:55:44,633 PM Central European Standard Time> <Notice> <LoggingService> <BEA-320400> <The log file /home/app/domains/dave_domain/servers/AdminServer/logs/AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms, such as Windows.> 
<Dec 21, 2025, 9:55:44,634 PM Central European Standard Time> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /home/app/domains/dave_domain/servers/AdminServer/logs/AdminServer.log00020. Log messages will continue to be logged in /home/app/domains/dave_domain/servers/AdminServer/logs/AdminServer.log.> 
<2025-12-21T21:55:44,653CET> <Notice> <Log Management> <BEA-170019> <The server log file weblogic.logging.FileStreamHandler instance=323078282
Current log file=/home/app/domains/dave_domain/servers/AdminServer/logs/AdminServer.log
Rotation dir=/home/app/domains/dave_domain/servers/AdminServer/logs
 is opened. All server side log events will be written to this file.> 
<2025-12-21T21:55:44,659CET> <Info> <Log Management> <BEA-170023> <The Server Logging is initialized with Java Logging API implementation.> 
<2025-12-21T21:55:44,684CET> <Info> <Log Management> <BEA-170025> <Initialized Domain Logging. Domain log events will be written to /home/app/domains/dave_domain/servers/AdminServer/logs/dave_domain.log.> 
<2025-12-21T21:55:44,690CET> <Info> <IIOP> <BEA-002014> <IIOP subsystem enabled.> 
<2025-12-21T21:55:44,752CET> <Info> <Diagnostics> <BEA-320001> <The ServerDebug service initialized successfully.> 
<2025-12-21T21:55:44,846CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WLS_DIAGNOSTICS" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/data/store/diagnostics requestedWritePolicy="Disabled" fileLockingEnabled=false driver="wlfileio3".> 
<2025-12-21T21:55:44,866CET> <Info> <Store> <BEA-280103> <The persistent file store "WLS_DIAGNOSTICS" will cache in weblogic.store.io.file.direct.FileMapping[granularity=4096 io=mapped].> 
<2025-12-21T21:55:44,881CET> <Info> <Store> <BEA-280009> <The persistent file store "WLS_DIAGNOSTICS" (0b690f1c-259f-4179-b92b-1e7fb949e926) has been opened: blockSize=512 actualWritePolicy="Disabled(single-handle-non-direct)" explicitIOEnforced=false records=33.> 
<2025-12-21T21:55:45,092CET> <Notice> <Security> <BEA-090946> <Security pre-initializing using security realm: myrealm> 
<2025-12-21T21:55:45,100CET> <Info> <Security> <BEA-090909> <Using the configured custom SSL Hostname Verifier implementation: weblogic.security.utils.SSLWLSHostnameVerifier$NullHostnameVerifier.> 
<2025-12-21T21:55:45,247CET> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias DemoIdentity from the pkcs12 keystore file /app/domains/dave_domain/security/DemoIdentity.p12.> 
<2025-12-21T21:55:45,451CET> <Info> <Security> <BEA-000000> <Starting OpenJPA 1.1.1> 
<2025-12-21T21:55:45,525CET> <Info> <Security> <BEA-000000> <StoreServiceImpl.initJDO - StoreService is initialized with Id = ldap_e4nPimS/9S88e4AguhAtdPpVgdI=> 
<2025-12-21T21:55:45,566CET> <Info> <Security> <BEA-090516> <The Authenticator provider has pre-existing LDAP data.> 
<2025-12-21T21:55:45,623CET> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the pkcs12 keystore file /app/domains/dave_domain/security/DemoTrust.p12.> 
<2025-12-21T21:55:45,643CET> <Notice> <Security> <BEA-090947> <Security post-initializing using security realm: myrealm> 
<2025-12-21T21:55:45,660CET> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /home/app/weblogic-14.1.2/wlserver/server/lib/DemoTrust.jks.> 
<2025-12-21T21:55:45,662CET> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /usr/lib/jvm/jdk-21.0.5-oracle-x64/lib/security/cacerts.> 
<2025-12-21T21:55:45,668CET> <Info> <WebLogicServer> <BEA-000307> <Exportable key maximum lifespan set to 500 uses.> 
<2025-12-21T21:55:45,774CET> <Info> <Security> <BEA-090516> <The Authorizer provider has preexisting LDAP data.> 
<2025-12-21T21:55:47,010CET> <Info> <Security> <BEA-090516> <The CredentialMapper provider has preexisting LDAP data.> 
<2025-12-21T21:55:47,017CET> <Info> <Security> <BEA-090516> <The RoleMapper provider has preexisting LDAP data.> 
<2025-12-21T21:55:47,129CET> <Notice> <Security> <BEA-090082> <Security initialized using administrative security realm: myrealm> 
<2025-12-21T21:55:47,320CET> <Info> <Connector> <BEA-190000> <Initializing Java EE Connector Service.> 
<2025-12-21T21:55:47,329CET> <Info> <Connector> <BEA-190001> <Java EE Connector Service initialized successfully.> 
<2025-12-21T21:55:47,368CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "_WLS_AdminServer" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/data/store/default requestedWritePolicy="Direct-Write" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:47,387CET> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://192.168.0.115:7001/jndi/weblogic.management.mbeanservers.runtime.> 
<2025-12-21T21:55:47,469CET> <Info> <JMS> <BEA-040305> <JMS service is initialized and in standby mode.> 
<2025-12-21T21:55:47,514CET> <Info> <JMS> <BEA-040090> <Deployed 8 default connection factories.> 
<2025-12-21T21:55:47,517CET> <Info> <messaging.interception> <BEA-400000> <Initializing message interception service.> 
<2025-12-21T21:55:47,521CET> <Info> <JMS> <BEA-040407> <Default connection factory "DefaultConnectionFactory" with its JNDI name "weblogic.jms.ConnectionFactory" is started.> 
<2025-12-21T21:55:47,522CET> <Info> <JMS> <BEA-040407> <Default connection factory "TopicConnectionFactory" with its JNDI name "javax.jms.TopicConnectionFactory" is started.> 
<2025-12-21T21:55:47,522CET> <Info> <JMS> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory1" with its JNDI name "weblogic.jms.XAConnectionFactory1" is started.> 
<2025-12-21T21:55:47,523CET> <Info> <JMS> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory0" with its JNDI name "weblogic.jms.XAConnectionFactory0" is started.> 
<2025-12-21T21:55:47,523CET> <Info> <JMS> <BEA-040407> <Default connection factory "PlatformDefaultConnectionFactory" with its JNDI name "weblogic.jms.DefaultConnectionFactory" is started.> 
<2025-12-21T21:55:47,524CET> <Info> <JMS> <BEA-040407> <Default connection factory "QueueConnectionFactory" with its JNDI name "javax.jms.QueueConnectionFactory" is started.> 
<2025-12-21T21:55:47,527CET> <Info> <JMS> <BEA-040407> <Default connection factory "MessageDrivenBeanConnectionFactory" with its JNDI name "weblogic.jms.MessageDrivenBeanConnectionFactory" is started.> 
<2025-12-21T21:55:47,531CET> <Info> <JMS> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory" with its JNDI name "weblogic.jms.XAConnectionFactory" is started.> 
<2025-12-21T21:55:47,532CET> <Info> <JMS> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory2" with its JNDI name "weblogic.jms.XAConnectionFactory2" is started.> 
<2025-12-21T21:55:47,533CET> <Info> <JMS> <BEA-040306> <JMS service is active now.> 
<2025-12-21T21:55:47,583CET> <Info> <Store> <BEA-280009> <The persistent file store "_WLS_AdminServer" (78fff7ef-2dfc-438c-b24e-00fc9e8d8802) has been opened: blockSize=512 actualWritePolicy="Direct-Write(read-buffered)" explicitIOEnforced=false records=19.> 
<2025-12-21T21:55:47,657CET> <Info> <JDBC> <BEA-001135> <Initializing the JDBC service.> 
<2025-12-21T21:55:47,686CET> <Info> <JDBC> <BEA-001137> <Initialization complete.> 
<2025-12-21T21:55:47,686CET> <Info> <JDBC> <BEA-001138> <Resuming the JDBC service.> 
<2025-12-21T21:55:47,687CET> <Info> <JDBC> <BEA-001140> <Resume complete.> 
<2025-12-21T21:55:47,722CET> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://192.168.0.115:7001/jndi/weblogic.management.mbeanservers.domainruntime.> 
<2025-12-21T21:55:47,744CET> <Info> <HTTP> <BEA-101128> <Initializing HTTP services.> 
<2025-12-21T21:55:47,758CET> <Info> <HTTP> <BEA-101135> <AdminServer is the default Web server.> 
<2025-12-21T21:55:47,758CET> <Info> <HTTP> <BEA-101052> <[HttpServer (defaultWebserver) name: AdminServer] Initialized> 
<2025-12-21T21:55:47,767CET> <Info> <HTTP> <BEA-101129> <Initializing the Web application container.> 
<2025-12-21T21:55:47,782CET> <Info> <Server> <BEA-002622> <The protocol "[admin, iiops, snmp, ldaps, cluster-broadcast-secure, iiop, t3s, ldap, cluster-broadcast, http, https, t3]" is now configured.> 
<2025-12-21T21:55:47,836CET> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://192.168.0.115:7001/jndi/weblogic.management.mbeanservers.edit.> 
<2025-12-21T21:55:47,958CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "bea_wls_internal"> 
<2025-12-21T21:55:47,960CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "bea_wls_internal"> 
<2025-12-21T21:55:48,168CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="bea_wls_internal")> 
<2025-12-21T21:55:48,176CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="bea_wls_internal")> 
<2025-12-21T21:55:48,180CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="bea_wls_internal", workmanager="default")> 
<2025-12-21T21:55:48,182CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="bea_wls_internal", workmanager="default")> 
<2025-12-21T21:55:49,334CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.> 
<2025-12-21T21:55:49,334CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> 
<2025-12-21T21:55:49,376CET> <Notice> <Log Management> <BEA-170036> <The Logging monitoring service timer has started to check for logged message counts every 30 seconds.> 
<2025-12-21T21:55:49,378CET> <Info> <Log Management> <BEA-170031> <The Server Logging bridge has initialized successfully.> 
<2025-12-21T21:55:49,383CET> <Info> <SAFService> <BEA-281003> <The SAF service has been initialized.> 
<2025-12-21T21:55:49,384CET> <Info> <SAFService> <BEA-281002> <The SAF service has been started.> 
<2025-12-21T21:55:49,407CET> <Info> <Deployer> <BEA-149209> <The Slave Deployer is resuming.> 
<2025-12-21T21:55:49,495CET> <Info> <EJB> <BEA-015076> <EJB module [mejb.jar] created.> 
<2025-12-21T21:55:49,572CET> <Info> <SAFService> <BEA-281007> <SAF Agent "ReliableWseeJaxwsSAFAgent@AdminServer" has been successfully prepared.> 
<2025-12-21T21:55:49,577CET> <Info> <SAFService> <BEA-281007> <SAF Agent "ReliableWseeSAFAgent@AdminServer" has been successfully prepared.> 
<2025-12-21T21:55:49,604CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeFileStore" for recovery: directory=/home/app/domains/dave_domain/WseeFileStore requestedWritePolicy="Direct-Write" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:49,873CET> <Info> <Store> <BEA-280009> <The persistent file store "WseeFileStore" (fa105a8a-d3e8-4dbb-bd63-c410031063bc) has been opened: blockSize=512 actualWritePolicy="Direct-Write(read-buffered)" explicitIOEnforced=false records=21.> 
<2025-12-21T21:55:49,906CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeJaxwsFileStore" for recovery: directory=/home/app/domains/dave_domain/WseeJaxwsFileStore requestedWritePolicy="Direct-Write" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,197CET> <Info> <Store> <BEA-280009> <The persistent file store "WseeJaxwsFileStore" (717f6ab0-a7a9-410a-b219-1ac90f21ba29) has been opened: blockSize=512 actualWritePolicy="Direct-Write(read-buffered)" explicitIOEnforced=false records=23.> 
<2025-12-21T21:55:50,217CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeSoapjmsFileStore" for recovery: directory=/home/app/domains/dave_domain/WseeSoapjmsFileStore requestedWritePolicy="Direct-Write" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,495CET> <Info> <Store> <BEA-280009> <The persistent file store "WseeSoapjmsFileStore" (464fe2f7-c512-411b-8b85-dbd36491586f) has been opened: blockSize=512 actualWritePolicy="Direct-Write(read-buffered)" explicitIOEnforced=false records=11.> 
<2025-12-21T21:55:50,508CET> <Info> <JMS> <BEA-040321> <JMSServer "ReliableWseeJaxwsSAFAgent" is resuming.> 
<2025-12-21T21:55:50,536CET> <Info> <Messaging> <BEA-282003> <The messaging kernel ReliableWseeJaxwsSAFAgent will use up to 178,956,970 bytes of memory before paging begins.> 
<2025-12-21T21:55:50,541CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "ReliableWseeJaxwsSAFAgent" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/tmp requestedWritePolicy="Non-Durable" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,548CET> <Info> <Messaging> <BEA-282001> <The messaging kernel ReliableWseeJaxwsSAFAgent is beginning recovery of its persistent state.> 
<2025-12-21T21:55:50,554CET> <Info> <Messaging> <BEA-282002> <The messaging kernel ReliableWseeJaxwsSAFAgent has recovered 0 persistent messages.> 
<2025-12-21T21:55:50,570CET> <Info> <SAFService> <BEA-281008> <SAF Agent "ReliableWseeJaxwsSAFAgent@AdminServer" has been successfully activated.> 
<2025-12-21T21:55:50,573CET> <Info> <JMS> <BEA-040321> <JMSServer "ReliableWseeSAFAgent" is resuming.> 
<2025-12-21T21:55:50,574CET> <Info> <Messaging> <BEA-282003> <The messaging kernel ReliableWseeSAFAgent will use up to 178,956,970 bytes of memory before paging begins.> 
<2025-12-21T21:55:50,579CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "ReliableWseeSAFAgent" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/tmp requestedWritePolicy="Non-Durable" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,580CET> <Info> <Messaging> <BEA-282001> <The messaging kernel ReliableWseeSAFAgent is beginning recovery of its persistent state.> 
<2025-12-21T21:55:50,584CET> <Info> <Messaging> <BEA-282002> <The messaging kernel ReliableWseeSAFAgent has recovered 0 persistent messages.> 
<2025-12-21T21:55:50,588CET> <Info> <SAFService> <BEA-281008> <SAF Agent "ReliableWseeSAFAgent@AdminServer" has been successfully activated.> 
<2025-12-21T21:55:50,590CET> <Info> <JMS> <BEA-040321> <JMSServer "WseeJaxwsJmsServer" is resuming.> 
<2025-12-21T21:55:50,590CET> <Info> <Messaging> <BEA-282003> <The messaging kernel WseeJaxwsJmsServer will use up to 178,956,970 bytes of memory before paging begins.> 
<2025-12-21T21:55:50,596CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeJaxwsJmsServer" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/tmp requestedWritePolicy="Non-Durable" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,597CET> <Info> <Messaging> <BEA-282001> <The messaging kernel WseeJaxwsJmsServer is beginning recovery of its persistent state.> 
<2025-12-21T21:55:50,609CET> <Info> <Messaging> <BEA-282002> <The messaging kernel WseeJaxwsJmsServer has recovered 0 persistent messages.> 
<2025-12-21T21:55:50,618CET> <Info> <JMS> <BEA-040321> <JMSServer "WseeJmsServer" is resuming.> 
<2025-12-21T21:55:50,618CET> <Info> <Messaging> <BEA-282003> <The messaging kernel WseeJmsServer will use up to 178,956,970 bytes of memory before paging begins.> 
<2025-12-21T21:55:50,622CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeJmsServer" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/tmp requestedWritePolicy="Non-Durable" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,623CET> <Info> <Messaging> <BEA-282001> <The messaging kernel WseeJmsServer is beginning recovery of its persistent state.> 
<2025-12-21T21:55:50,631CET> <Info> <Messaging> <BEA-282002> <The messaging kernel WseeJmsServer has recovered 0 persistent messages.> 
<2025-12-21T21:55:50,634CET> <Info> <JMS> <BEA-040321> <JMSServer "WseeSoapjmsJmsServer" is resuming.> 
<2025-12-21T21:55:50,635CET> <Info> <Messaging> <BEA-282003> <The messaging kernel WseeSoapjmsJmsServer will use up to 178,956,970 bytes of memory before paging begins.> 
<2025-12-21T21:55:50,639CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeSoapjmsJmsServer" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/tmp requestedWritePolicy="Non-Durable" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,640CET> <Info> <Messaging> <BEA-282001> <The messaging kernel WseeSoapjmsJmsServer is beginning recovery of its persistent state.> 
<2025-12-21T21:55:50,645CET> <Info> <Messaging> <BEA-282002> <The messaging kernel WseeSoapjmsJmsServer has recovered 0 persistent messages.> 
<2025-12-21T21:55:50,655CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "WseeJaxwsJmsModule"> 
<2025-12-21T21:55:50,655CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "WseeJaxwsJmsModule"> 
<2025-12-21T21:55:50,700CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="WseeJaxwsJmsModule")> 
<2025-12-21T21:55:50,700CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="WseeJaxwsJmsModule")> 
<2025-12-21T21:55:50,702CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="WseeJaxwsJmsModule", workmanager="default")> 
<2025-12-21T21:55:50,703CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="WseeJaxwsJmsModule", workmanager="default")> 
<2025-12-21T21:55:51,069CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "WseeJmsModule"> 
<2025-12-21T21:55:51,070CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "WseeJmsModule"> 
<2025-12-21T21:55:51,079CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="WseeJmsModule")> 
<2025-12-21T21:55:51,080CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="WseeJmsModule")> 
<2025-12-21T21:55:51,080CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="WseeJmsModule", workmanager="default")> 
<2025-12-21T21:55:51,081CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="WseeJmsModule", workmanager="default")> 
<2025-12-21T21:55:51,121CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "WseeSoapjmsJmsModule"> 
<2025-12-21T21:55:51,122CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "WseeSoapjmsJmsModule"> 
<2025-12-21T21:55:51,130CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="WseeSoapjmsJmsModule")> 
<2025-12-21T21:55:51,131CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="WseeSoapjmsJmsModule")> 
<2025-12-21T21:55:51,131CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="WseeSoapjmsJmsModule", workmanager="default")> 
<2025-12-21T21:55:51,132CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="WseeSoapjmsJmsModule", workmanager="default")> 
<2025-12-21T21:55:51,171CET> <Info> <JMS> <BEA-040108> <User connection factory "WseeSoapjmsJmsModule!com.oracle.webservices.api.jms.ConnectionFactory" is started.> 
<2025-12-21T21:55:51,185CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "state-management-provider-memory-rar"> 
<2025-12-21T21:55:51,185CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "state-management-provider-memory-rar"> 
<2025-12-21T21:55:51,188CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "basicWebappEjb"> 
<2025-12-21T21:55:51,189CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "basicWebappEjb"> 
<2025-12-21T21:55:51,270CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="basicWebappEjb")> 
<2025-12-21T21:55:51,270CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="basicWebappEjb")> 
<2025-12-21T21:55:51,271CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="basicWebappEjb", workmanager="default")> 
<2025-12-21T21:55:51,272CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="basicWebappEjb", workmanager="default")> 
<2025-12-21T21:55:51,275CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="state-management-provider-memory-rar")> 
<2025-12-21T21:55:51,275CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="state-management-provider-memory-rar")> 
<2025-12-21T21:55:51,276CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="state-management-provider-memory-rar", workmanager="default")> 
<2025-12-21T21:55:51,277CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="state-management-provider-memory-rar", workmanager="default")> 


Wednesday, May 18, 2022

Disable Spring DEBUG in log4j2 logs on Weblogic

HOWTO 

 

There is dump of all environment variables in Weblogic log due to Spring initialization

2022-05-12 14:13:43,673;DEBUG;com.bea.core.repackaged.springframework.core.env.AbstractEnvironment;<init>();125;Initialized StandardEnvironment with PropertySources

 

To remove it add logger for com.bea.core.repackaged.springframework into log4j.xml file

    <logger name="com.bea.core.repackaged.springframework" additivity="false">
        <level value="error" />
        <appender-ref ref="some-appender"/>
    </logger>

 

Check in Weblogic logs

weblogic.log:<May 18, 2022 10:24:09,804 AM CEST> <Notice> <Stdout> <BEA-000000> <2022-05-18 10:24:09,804 [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' DEBUG Level value for com.bea.core.repackaged.springframework is [error].>
weblogic.log:<May 18, 2022 10:24:09,804 AM CEST> <Notice> <Stdout> <BEA-000000> <2022-05-18 10:24:09,804 [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' DEBUG com.bea.core.repackaged.springframework level set to ERROR>

Wednesday, March 16, 2022

JDK 11 - garbage collector logging

 HOWTO

 

 

GitHub 

* test class  https://github.com/dveselka/java-tutorial/blob/master/src/main/java/gc/LogGC.java

 

GC logs with  timestamp -Xlog:gc*::time

[2022-03-16T22:30:42.734+0100] GC(30) Pause Full (G1 Compaction Pause)
[2022-03-16T22:30:42.734+0100] GC(30) Phase 1: Mark live objects
[2022-03-16T22:30:43.663+0100] GC(30) Phase 1: Mark live objects 929.512ms
[2022-03-16T22:30:43.663+0100] GC(30) Phase 2: Prepare for compaction
[2022-03-16T22:30:43.941+0100] GC(30) Phase 2: Prepare for compaction 277.577ms
[2022-03-16T22:30:43.941+0100] GC(30) Phase 3: Adjust pointers
[2022-03-16T22:30:44.372+0100] GC(30) Phase 3: Adjust pointers 430.642ms
[2022-03-16T22:30:44.372+0100] GC(30) Phase 4: Compact heap
[2022-03-16T22:30:44.748+0100] GC(30) Phase 4: Compact heap 375.878ms
[2022-03-16T22:30:44.751+0100] GC(30) Eden regions: 0->0(99)
[2022-03-16T22:30:44.751+0100] GC(30) Survivor regions: 0->0(13)
[2022-03-16T22:30:44.751+0100] GC(30) Old regions: 1541->1539
[2022-03-16T22:30:44.751+0100] GC(30) Archive regions: 0->0
[2022-03-16T22:30:44.751+0100] GC(30) Humongous regions: 129->129
[2022-03-16T22:30:44.751+0100] GC(30) Metaspace: 3704K(3904K)->3704K(3904K) NonClass: 3407K(3520K)->3407K(3520K) Class: 297K(384K)->297K(384K)
[2022-03-16T22:30:44.751+0100] GC(30) Pause Full (G1 Compaction Pause) 3331M->3330M(3964M) 2017.026ms
[2022-03-16T22:30:44.751+0100] GC(30) User=15.35s Sys=0.02s Real=2.02s
[2022-03-16T22:30:44.751+0100] GC(17) Concurrent Rebuild Remembered Sets 3586.878ms
[2022-03-16T22:30:44.751+0100] GC(17) Concurrent Mark Abort
[2022-03-16T22:30:44.751+0100] GC(17) Concurrent Mark Cycle 5637.293ms
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.base/java.util.HashMap.resize(HashMap.java:702)
    at java.base/java.util.HashMap.putVal(HashMap.java:661)
    at java.base/java.util.HashMap.put(HashMap.java:610)
    at gc.LogGC.main(LogGC.java:15)
[2022-03-16T22:30:44.755+0100] Heap
[2022-03-16T22:30:44.755+0100]  garbage-first heap   total 4059136K, used 3412405K [0x0000000708400000, 0x0000000800000000)
[2022-03-16T22:30:44.755+0100]   region size 2048K, 1 young (2048K), 0 survivors (0K)
[2022-03-16T22:30:44.755+0100]  Metaspace       used 3801K, committed 3968K, reserved 1056768K
[2022-03-16T22:30:44.755+0100]   class space    used 307K, committed 384K, reserved 1048576K

GC logs with -Xlog:gc*

[0.002s][warning][logging] Output options for existing outputs are ignored.
[0.016s][info   ][gc     ] Using G1
[0.019s][info   ][gc,init] Version: 17.0.1+12 (release)
[0.019s][info   ][gc,init] CPUs: 8 total, 8 available
[0.019s][info   ][gc,init] Memory: 15849M
[0.019s][info   ][gc,init] Large Page Support: Disabled
[0.019s][info   ][gc,init] NUMA Support: Disabled
[0.019s][info   ][gc,init] Compressed Oops: Enabled (Zero based)
[0.019s][info   ][gc,init] Heap Region Size: 2M
[0.019s][info   ][gc,init] Heap Min Capacity: 8M
[0.019s][info   ][gc,init] Heap Initial Capacity: 248M
[0.019s][info   ][gc,init] Heap Max Capacity: 3964M
[0.019s][info   ][gc,init] Pre-touch: Disabled
[0.019s][info   ][gc,init] Parallel Workers: 8
[0.019s][info   ][gc,init] Concurrent Workers: 2
[0.019s][info   ][gc,init] Concurrent Refinement Workers: 8
[0.019s][info   ][gc,init] Periodic GC: Disabled


[4.399s][info][gc,heap     ] GC(31) Survivor regions: 12->12(12)
[4.399s][info][gc,heap     ] GC(31) Old regions: 1535->1563
[4.399s][info][gc,heap     ] GC(31) Archive regions: 0->0
[4.399s][info][gc,heap     ] GC(31) Humongous regions: 244->244
[4.399s][info][gc,metaspace] GC(31) Metaspace: 3706K(3904K)->3706K(3904K) NonClass: 3409K(3520K)->3409K(3520K) Class: 297K(384K)->297K(384K)
[4.399s][info][gc          ] GC(31) Pause Young (Normal) (G1 Preventive Collection) 3632M->3637M(3716M) 34.114ms
[4.399s][info][gc,cpu      ] GC(31) User=0.23s Sys=0.01s Real=0.04s
[4.407s][info][gc,start    ] GC(32) Pause Young (Normal) (G1 Preventive Collection)
[4.407s][info][gc,task     ] GC(32) Using 8 workers of 8 for evacuation
[4.429s][info][gc,phases   ] GC(32)   Pre Evacuate Collection Set: 0.2ms
[4.429s][info][gc,phases   ] GC(32)   Merge Heap Roots: 0.1ms
[4.429s][info][gc,phases   ] GC(32)   Evacuate Collection Set: 21.4ms
[4.429s][info][gc,phases   ] GC(32)   Post Evacuate Collection Set: 0.1ms
[4.429s][info][gc,phases   ] GC(32)   Other: 0.1ms
[4.429s][info][gc,heap     ] GC(32) Eden regions: 12->0(80)
[4.429s][info][gc,heap     ] GC(32) Survivor regions: 12->12(12)
[4.429s][info][gc,heap     ] GC(32) Old regions: 1563->1577
[4.429s][info][gc,heap     ] GC(32) Archive regions: 0->0
[4.429s][info][gc,heap     ] GC(32) Humongous regions: 244->244
[4.429s][info][gc,metaspace] GC(32) Metaspace: 3706K(3904K)->3706K(3904K) NonClass: 3409K(3520K)->3409K(3520K) Class: 297K(384K)->297K(384K)
[4.429s][info][gc          ] GC(32) Pause Young (Normal) (G1 Preventive Collection) 3661M->3666M(3716M) 21.847ms
[4.429s][info][gc,cpu      ] GC(32) User=0.14s Sys=0.00s Real=0.02s
[4.430s][info][gc,start    ] GC(33) Pause Young (Normal) (G1 Humongous Allocation)
[4.430s][info][gc,task     ] GC(33) Using 8 workers of 8 for evacuation
[4.443s][info][gc,phases   ] GC(33)   Pre Evacuate Collection Set: 0.1ms
[4.443s][info][gc,phases   ] GC(33)   Merge Heap Roots: 0.0ms
[4.443s][info][gc,phases   ] GC(33)   Evacuate Collection Set: 11.5ms
[4.443s][info][gc,phases   ] GC(33)   Post Evacuate Collection Set: 0.5ms
[4.443s][info][gc,phases   ] GC(33)   Other: 0.1ms
[4.443s][info][gc,heap     ] GC(33) Eden regions: 2->0(93)
[4.443s][info][gc,heap     ] GC(33) Survivor regions: 12->2(12)
[4.443s][info][gc,heap     ] GC(33) Old regions: 1577->1591
[4.443s][info][gc,heap     ] GC(33) Archive regions: 0->0
[4.443s][info][gc,heap     ] GC(33) Humongous regions: 244->244
[4.443s][info][gc,metaspace] GC(33) Metaspace: 3706K(3904K)->3706K(3904K) NonClass: 3409K(3520K)->3409K(3520K) Class: 297K(384K)->297K(384K)
[4.443s][info][gc          ] GC(33) Pause Young (Normal) (G1 Humongous Allocation) 3670M->3672M(3816M) 12.175ms
[4.443s][info][gc,cpu      ] GC(33) User=0.07s Sys=0.00s Real=0.01s
[4.443s][info][gc,ergo     ] Attempting full compaction
[4.443s][info][gc,task     ] GC(34) Using 8 workers of 8 for full compaction
[4.443s][info][gc,start    ] GC(34) Pause Full (G1 Compaction Pause)
[4.449s][info][gc,phases,start] GC(34) Phase 1: Mark live objects
[5.430s][info][gc,phases      ] GC(34) Phase 1: Mark live objects 980.544ms
[5.430s][info][gc,phases,start] GC(34) Phase 2: Prepare for compaction
[5.443s][info][gc,phases      ] GC(34) Phase 2: Prepare for compaction 13.229ms
[5.443s][info][gc,phases,start] GC(34) Phase 3: Adjust pointers
[5.738s][info][gc,phases      ] GC(34) Phase 3: Adjust pointers 295.030ms
[5.738s][info][gc,phases,start] GC(34) Phase 4: Compact heap
[5.756s][info][gc,phases      ] GC(34) Phase 4: Compact heap 17.952ms
[5.785s][info][gc,heap        ] GC(34) Eden regions: 0->0(99)
[5.785s][info][gc,heap        ] GC(34) Survivor regions: 2->0(12)
[5.785s][info][gc,heap        ] GC(34) Old regions: 1591->1541
[5.785s][info][gc,heap        ] GC(34) Archive regions: 0->0
[5.785s][info][gc,heap        ] GC(34) Humongous regions: 244->129
[5.785s][info][gc,metaspace   ] GC(34) Metaspace: 3706K(3904K)->3706K(3904K) NonClass: 3409K(3520K)->3409K(3520K) Class: 297K(384K)->297K(384K)
[5.785s][info][gc             ] GC(34) Pause Full (G1 Compaction Pause) 3672M->3331M(3964M) 1341.941ms
[5.785s][info][gc,cpu         ] GC(34) User=9.83s Sys=0.22s Real=1.35s
[5.785s][info][gc,ergo        ] Attempting maximum full compaction clearing soft references
[5.785s][info][gc,task        ] GC(35) Using 8 workers of 8 for full compaction
[5.786s][info][gc,start       ] GC(35) Pause Full (G1 Compaction Pause)
[5.786s][info][gc,phases,start] GC(35) Phase 1: Mark live objects
[6.797s][info][gc,phases      ] GC(35) Phase 1: Mark live objects 1011.022ms
[6.797s][info][gc,phases,start] GC(35) Phase 2: Prepare for compaction
[7.091s][info][gc,phases      ] GC(35) Phase 2: Prepare for compaction 293.850ms
[7.091s][info][gc,phases,start] GC(35) Phase 3: Adjust pointers
[7.551s][info][gc,phases      ] GC(35) Phase 3: Adjust pointers 460.264ms
[7.551s][info][gc,phases,start] GC(35) Phase 4: Compact heap
[7.967s][info][gc,phases      ] GC(35) Phase 4: Compact heap 416.610ms
[7.971s][info][gc,heap        ] GC(35) Eden regions: 0->0(99)
[7.971s][info][gc,heap        ] GC(35) Survivor regions: 0->0(12)
[7.971s][info][gc,heap        ] GC(35) Old regions: 1541->1540
[7.971s][info][gc,heap        ] GC(35) Archive regions: 0->0
[7.971s][info][gc,heap        ] GC(35) Humongous regions: 129->129
[7.971s][info][gc,metaspace   ] GC(35) Metaspace: 3706K(3904K)->3706K(3904K) NonClass: 3409K(3520K)->3409K(3520K) Class: 297K(384K)->297K(384K)
[7.971s][info][gc             ] GC(35) Pause Full (G1 Compaction Pause) 3331M->3330M(3964M) 2185.032ms
[7.971s][info][gc,cpu         ] GC(35) User=15.44s Sys=0.03s Real=2.18s
[7.971s][info][gc,marking     ] GC(19) Concurrent Mark From Roots 5527.878ms
[7.971s][info][gc,marking     ] GC(19) Concurrent Mark Abort
[7.971s][info][gc             ] GC(19) Concurrent Mark Cycle 5539.567ms
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.base/java.util.HashMap.resize(HashMap.java:702)
    at java.base/java.util.HashMap.putVal(HashMap.java:661)
    at java.base/java.util.HashMap.put(HashMap.java:610)
    at gc.LogGC.main(LogGC.java:15)
[7.973s][info][gc,heap,exit   ] Heap
[7.973s][info][gc,heap,exit   ]  garbage-first heap   total 4059136K, used 3412405K [0x0000000708400000, 0x0000000800000000)
[7.973s][info][gc,heap,exit   ]   region size 2048K, 1 young (2048K), 0 survivors (0K)
[7.973s][info][gc,heap,exit   ]  Metaspace       used 3802K, committed 3968K, reserved 1056768K
[7.973s][info][gc,heap,exit   ]   class space    used 307K, committed 384K, reserved 1048576K

 

Wednesday, December 22, 2021

Refactor log4j project to slf4j

HOWTO 

 

Create simple Java project using Maven archetype

$     mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4

Define value for property 'groupId': : dave
Define value for property 'artifactId': : simple
Define value for property 'version':  1.0-SNAPSHOT: : 
Define value for property 'package':  dave: : 
Confirm properties configuration:
groupId: dave
artifactId: simple
version: 1.0-SNAPSHOT
package: dave
 Y: : Y 
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: maven-archetype-quickstart:1.4
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: dave
[INFO] Parameter: artifactId, Value: simple
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: dave
[INFO] Parameter: packageInPathFormat, Value: dave
[INFO] Parameter: package, Value: dave
[INFO] Parameter: groupId, Value: dave
[INFO] Parameter: artifactId, Value: simple
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Archetype in dir: /git/simple/simple
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  36.314 s
[INFO] Finished at: 2021-12-22T22:03:21+01:00
[INFO] ------------------------------------------------------------------------
[dave@dave simple]$ find
.
./simple
./simple/pom.xml
./simple/src
./simple/src/main
./simple/src/main/java
./simple/src/main/java/dave
./simple/src/main/java/dave/App.java
./simple/src/test
./simple/src/test/java
./simple/src/test/java/dave
./simple/src/test/java/dave/AppTest.java
[dave@dave simple]$ 

Add log4j Maven dependency
  <!-- https://mvnrepository.com/artifact/log4j/log4j -->
   <dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
   </dependency>

Add log4j 1.2 call
package dave;

// Import log4j classes.
import org.apache.log4j.*;

/**
 * Hello world!
 *
 */
public class App
{
    public static void main( String[] args )
    {

   // get a logger instance named "com.foo"
   Logger  logger = Logger.getLogger("com.foo");

   Logger barlogger = Logger.getLogger("com.foo.Bar");

   // This request is enabled, because WARN >= INFO.
   logger.warn("Low fuel level.");

   // This request is disabled, because DEBUG < INFO.
   logger.debug("Starting search for nearest gas station.");

   // The logger instance barlogger, named "com.foo.Bar",
   // will inherit its level from the logger named
   // "com.foo" Thus, the following request is enabled
   // because INFO >= INFO.
   barlogger.info("Located nearest gas station.");

   // This request is disabled, because DEBUG < INFO.
   barlogger.debug("Exiting gas station search");
    }

}

Add rewrite plugin
      <plugin>
        <groupId>org.openrewrite.maven</groupId>
        <artifactId>rewrite-maven-plugin</artifactId>
        <version>4.14.1</version>
        <configuration>
          <activeRecipes>
            <recipe>org.openrewrite.java.logging.slf4j.Log4jToSlf4j</recipe>
          </activeRecipes>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.openrewrite.recipe</groupId>
            <artifactId>rewrite-logging-frameworks</artifactId>
            <version>0.9.0</version>
          </dependency>
        </dependencies>
      </plugin>

Discover
[INFO] Available Recipes:
[INFO]                 org.openrewrite.DeleteSourceFiles
[INFO]                 org.openrewrite.FindSourceFiles
[INFO]                 org.openrewrite.RenameFile
[INFO]                 org.openrewrite.hcl.format.AutoFormat
[INFO]                 org.openrewrite.hcl.format.NormalizeFormat
[INFO]                 org.openrewrite.hcl.format.RemoveTrailingWhitespace
[INFO]                 org.openrewrite.hcl.format.Spaces
[INFO]                 org.openrewrite.hcl.format.TabsAndIndents
[INFO]                 org.openrewrite.java.AddLicenseHeader
[INFO]                 org.openrewrite.java.ChangeMethodAccessLevel
[INFO]                 org.openrewrite.java.ChangeMethodName
[INFO]                 org.openrewrite.java.ChangeMethodTargetToStatic
[INFO]                 org.openrewrite.java.ChangeMethodTargetToVariable
[INFO]                 org.openrewrite.java.ChangePackage
[INFO]                 org.openrewrite.java.ChangeType
[INFO]                 org.openrewrite.java.DeleteMethodArgument
[INFO]                 org.openrewrite.java.GenerateGetter
[INFO]                 org.openrewrite.java.NoStaticImport
[INFO]                 org.openrewrite.java.OrderImports
[INFO]                 org.openrewrite.java.RemoveAnnotation
[INFO]                 org.openrewrite.java.RemoveUnusedImports
[INFO]                 org.openrewrite.java.ReorderMethodArguments
[INFO]                 org.openrewrite.java.SimplifyMethodChain
[INFO]                 org.openrewrite.java.UseStaticImport
[INFO]                 org.openrewrite.java.cleanup.AtomicPrimitiveEqualsUsesGet
[INFO]                 org.openrewrite.java.cleanup.BigDecimalRoundingConstantsToEnums
[INFO]                 org.openrewrite.java.cleanup.BooleanChecksNotInverted
[INFO]                 org.openrewrite.java.cleanup.CaseInsensitiveComparisonsDoNotChangeCase
[INFO]                 org.openrewrite.java.cleanup.CatchClauseOnlyRethrows
[INFO]                 org.openrewrite.java.cleanup.ControlFlowIndentation
[INFO]                 org.openrewrite.java.cleanup.CovariantEquals
[INFO]                 org.openrewrite.java.cleanup.DefaultComesLast
[INFO]                 org.openrewrite.java.cleanup.EmptyBlock
[INFO]                 org.openrewrite.java.cleanup.EqualsAvoidsNull
[INFO]                 org.openrewrite.java.cleanup.ExplicitInitialization
[INFO]                 org.openrewrite.java.cleanup.ExplicitLambdaArgumentTypes
[INFO]                 org.openrewrite.java.cleanup.ExternalizableHasNoArgsConstructor
[INFO]                 org.openrewrite.java.cleanup.FallThrough
[INFO]                 org.openrewrite.java.cleanup.FinalClass
[INFO]                 org.openrewrite.java.cleanup.FinalizeLocalVariables
[INFO]                 org.openrewrite.java.cleanup.FixSerializableFields
[INFO]                 org.openrewrite.java.cleanup.ForLoopControlVariablePostfixOperators
[INFO]                 org.openrewrite.java.cleanup.ForLoopIncrementInUpdate
[INFO]                 org.openrewrite.java.cleanup.HiddenField
[INFO]                 org.openrewrite.java.cleanup.HideUtilityClassConstructor
[INFO]                 org.openrewrite.java.cleanup.IndexOfChecksShouldUseAStartPosition
[INFO]                 org.openrewrite.java.cleanup.IndexOfReplaceableByContains
[INFO]                 org.openrewrite.java.cleanup.IndexOfShouldNotCompareGreaterThanZero
[INFO]                 org.openrewrite.java.cleanup.IsEmptyCallOnCollections
[INFO]                 org.openrewrite.java.cleanup.LambdaBlockToExpression
[INFO]                 org.openrewrite.java.cleanup.MethodNameCasing
[INFO]                 org.openrewrite.java.cleanup.MethodParamPad
[INFO]                 org.openrewrite.java.cleanup.MinimumSwitchCases
[INFO]                 org.openrewrite.java.cleanup.MissingOverrideAnnotation
[INFO]                 org.openrewrite.java.cleanup.ModifierOrder
[INFO]                 org.openrewrite.java.cleanup.MultipleVariableDeclarations
[INFO]                 org.openrewrite.java.cleanup.NeedBraces
[INFO]                 org.openrewrite.java.cleanup.NestedEnumsAreNotStatic
[INFO]                 org.openrewrite.java.cleanup.NewStringBuilderBufferWithCharArgument
[INFO]                 org.openrewrite.java.cleanup.NoDoubleBraceInitialization
[INFO]                 org.openrewrite.java.cleanup.NoEmptyCollectionWithRawType
[INFO]                 org.openrewrite.java.cleanup.NoEqualityInForCondition
[INFO]                 org.openrewrite.java.cleanup.NoFinalizer
[INFO]                 org.openrewrite.java.cleanup.NoRedundantJumpStatements
[INFO]                 org.openrewrite.java.cleanup.NoToStringOnStringType
[INFO]                 org.openrewrite.java.cleanup.NoValueOfOnStringType
[INFO]                 org.openrewrite.java.cleanup.NoWhitespaceAfter
[INFO]                 org.openrewrite.java.cleanup.NoWhitespaceBefore
[INFO]                 org.openrewrite.java.cleanup.OperatorWrap
[INFO]                 org.openrewrite.java.cleanup.PadEmptyForLoopComponents
[INFO]                 org.openrewrite.java.cleanup.PrimitiveWrapperClassConstructorToValueOf
[INFO]                 org.openrewrite.java.cleanup.RedundantFileCreation
[INFO]                 org.openrewrite.java.cleanup.RemoveExtraSemicolons
[INFO]                 org.openrewrite.java.cleanup.RemoveUnusedLocalVariables
[INFO]                 org.openrewrite.java.cleanup.RemoveUnusedPrivateMethods
[INFO]                 org.openrewrite.java.cleanup.RenameLocalVariablesToCamelCase
[INFO]                 org.openrewrite.java.cleanup.RenameMethodsNamedHashcodeEqualOrTostring
[INFO]                 org.openrewrite.java.cleanup.SimplifyBooleanExpression
[INFO]                 org.openrewrite.java.cleanup.SimplifyBooleanReturn
[INFO]                 org.openrewrite.java.cleanup.StaticMethodNotFinal
[INFO]                 org.openrewrite.java.cleanup.StringLiteralEquality
[INFO]                 org.openrewrite.java.cleanup.TypecastParenPad
[INFO]                 org.openrewrite.java.cleanup.UnnecessaryCloseInTryWithResources
[INFO]                 org.openrewrite.java.cleanup.UnnecessaryExplicitTypeArguments
[INFO]                 org.openrewrite.java.cleanup.UnnecessaryParentheses
[INFO]                 org.openrewrite.java.cleanup.UnnecessaryPrimitiveAnnotations
[INFO]                 org.openrewrite.java.cleanup.UnnecessaryThrows
[INFO]                 org.openrewrite.java.cleanup.UseCollectionInterfaces
[INFO]                 org.openrewrite.java.cleanup.UseDiamondOperator
[INFO]                 org.openrewrite.java.cleanup.UseFilesCreateTempDirectory
[INFO]                 org.openrewrite.java.cleanup.UseJavaStyleArrayDeclarations
[INFO]                 org.openrewrite.java.cleanup.UseLambdaForFunctionalInterface
[INFO]                 org.openrewrite.java.cleanup.WhileInsteadOfFor
[INFO]                 org.openrewrite.java.cleanup.WriteOctalValuesAsDecimal
[INFO]                 org.openrewrite.java.format.AutoFormat
[INFO]                 org.openrewrite.java.format.BlankLines
[INFO]                 org.openrewrite.java.format.EmptyNewlineAtEndOfFile
[INFO]                 org.openrewrite.java.format.NormalizeFormat
[INFO]                 org.openrewrite.java.format.NormalizeLineBreaks
[INFO]                 org.openrewrite.java.format.NormalizeTabsOrSpaces
[INFO]                 org.openrewrite.java.format.RemoveTrailingWhitespace
[INFO]                 org.openrewrite.java.format.SingleLineComments
[INFO]                 org.openrewrite.java.format.Spaces
[INFO]                 org.openrewrite.java.format.TabsAndIndents
[INFO]                 org.openrewrite.java.format.WrappingAndBraces
[INFO]                 org.openrewrite.java.logging.PrintStackTraceToLogError
[INFO]                 org.openrewrite.java.logging.log4j.PrependRandomName
[INFO]                 org.openrewrite.java.logging.logback.Log4jAppenderToLogback
[INFO]                 org.openrewrite.java.logging.logback.Log4jLayoutToLogback
[INFO]                 org.openrewrite.java.logging.slf4j.Log4jToSlf4j
[INFO]                 org.openrewrite.java.logging.slf4j.ParameterizedLogging
[INFO]                 org.openrewrite.java.search.FindAnnotations
[INFO]                 org.openrewrite.java.search.FindDeprecatedClasses
[INFO]                 org.openrewrite.java.search.FindDeprecatedFields
[INFO]                 org.openrewrite.java.search.FindDeprecatedMethods
[INFO]                 org.openrewrite.java.search.FindDeprecatedUses
[INFO]                 org.openrewrite.java.search.FindEmptyClasses
[INFO]                 org.openrewrite.java.search.FindFields
[INFO]                 org.openrewrite.java.search.FindFieldsOfType
[INFO]                 org.openrewrite.java.search.FindMethods
[INFO]                 org.openrewrite.java.search.FindMissingTypes
[INFO]                 org.openrewrite.java.search.FindText
[INFO]                 org.openrewrite.java.search.FindTypes
[INFO]                 org.openrewrite.java.search.ResultOfMethodCallIgnored
[INFO]                 org.openrewrite.json.ChangeKey
[INFO]                 org.openrewrite.json.ChangeValue
[INFO]                 org.openrewrite.json.DeleteKey
[INFO]                 org.openrewrite.json.search.FindKey
[INFO]                 org.openrewrite.maven.AddDependency
[INFO]                 org.openrewrite.maven.AddPlugin
[INFO]                 org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId
[INFO]                 org.openrewrite.maven.ChangeDependencyScope
[INFO]                 org.openrewrite.maven.ChangePropertyValue
[INFO]                 org.openrewrite.maven.ExcludeDependency
[INFO]                 org.openrewrite.maven.ManageDependencies
[INFO]                 org.openrewrite.maven.OrderPomElements
[INFO]                 org.openrewrite.maven.RemoveDependency
[INFO]                 org.openrewrite.maven.RemoveExclusion
[INFO]                 org.openrewrite.maven.RemovePlugin
[INFO]                 org.openrewrite.maven.RemoveProperty
[INFO]                 org.openrewrite.maven.RemoveRedundantDependencyVersions
[INFO]                 org.openrewrite.maven.UpgradeDependencyVersion
[INFO]                 org.openrewrite.maven.UpgradeParentVersion
[INFO]                 org.openrewrite.maven.UpgradePluginVersion
[INFO]                 org.openrewrite.maven.search.DependencyInsight
[INFO]                 org.openrewrite.maven.search.FindDependency
[INFO]                 org.openrewrite.maven.search.FindPlugin
[INFO]                 org.openrewrite.maven.search.FindProperties
[INFO]                 org.openrewrite.properties.ChangePropertyKey
[INFO]                 org.openrewrite.properties.ChangePropertyValue
[INFO]                 org.openrewrite.properties.DeleteProperty
[INFO]                 org.openrewrite.properties.search.FindProperties
[INFO]                 org.openrewrite.text.ChangeText
[INFO]                 org.openrewrite.text.CreateTextFile
[INFO]                 org.openrewrite.xml.AutoFormat
[INFO]                 org.openrewrite.xml.search.FindTags
[INFO]                 org.openrewrite.yaml.ChangeKey
[INFO]                 org.openrewrite.yaml.ChangePropertyKey
[INFO]                 org.openrewrite.yaml.ChangeValue
[INFO]                 org.openrewrite.yaml.CoalesceProperties
[INFO]                 org.openrewrite.yaml.CopyValue
[INFO]                 org.openrewrite.yaml.DeleteKey
[INFO]                 org.openrewrite.yaml.DeleteProperty
[INFO]                 org.openrewrite.yaml.MergeYaml
[INFO]                 org.openrewrite.yaml.cleanup.RemoveUnused
[INFO]                 org.openrewrite.yaml.format.Indents
[INFO]                 org.openrewrite.yaml.search.FindKey
[INFO]                 org.openrewrite.yaml.search.FindProperty
[INFO]                 org.openrewrite.java.logging.logback.Log4jToLogback
[INFO]                 org.openrewrite.java.cleanup.Cleanup
[INFO]                 org.openrewrite.java.cleanup.CommonStaticAnalysis
[INFO]                 org.openrewrite.java.AddApache2LicenseHeader
[INFO]                 org.openrewrite.java.search.FindSecrets
[INFO] 
[INFO] Available Styles:
[INFO]     com.netflix.genie.Style
[INFO]     org.openrewrite.java.SpringFormat
[INFO]     org.openrewrite.java.GoogleJavaFormat
[INFO]     com.netflix.eureka.Style
[INFO] 
[INFO] Active Styles:
[INFO] 
[INFO] Active Recipes:
[INFO]                 org.openrewrite.java.logging.slf4j.Log4jToSlf4j
[INFO] 
[INFO] Found 173 available recipes and 4 available styles.
[INFO] Configured with 1 active recipes and 1 active styles.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

Run rewrite
[dave@dave simple]$ mvn rewrite:run
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------------< dave:simple >-----------------------------
[INFO] Building simple 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] >>> rewrite-maven-plugin:4.14.1:run (default-cli) > process-test-classes @ simple >>>
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ simple ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /git/simple/simple/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ simple ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /git/simple/simple/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ simple ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /git/simple/simple/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ simple ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] <<< rewrite-maven-plugin:4.14.1:run (default-cli) < process-test-classes @ simple <<<
[INFO] 
[INFO] 
[INFO] --- rewrite-maven-plugin:4.14.1:run (default-cli) @ simple ---
[INFO] Using active recipe(s) [org.openrewrite.java.logging.slf4j.Log4jToSlf4j]
[INFO] Using active styles(s) []
[INFO] Validating active recipes...
[INFO] Parsing Java main files...
[INFO] Parsing Java test files...
[INFO] Running recipe(s)...
[WARNING] Changes have been made to src/main/java/dave/App.java by:
[WARNING]     org.openrewrite.java.logging.slf4j.Log4jToSlf4j
[WARNING] Please review and commit the results.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

Refactored code - log4j replaced with slf4j
 git diff src/main/java/dave/App.java
diff --git a/src/main/java/dave/App.java b/src/main/java/dave/App.java
index 179d8ff..39a78c9 100644
--- a/src/main/java/dave/App.java
+++ b/src/main/java/dave/App.java
@@ -1,7 +1,9 @@
 package dave;
 
 // Import log4j classes.
-import org.apache.log4j.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Hello world!
@@ -13,14 +15,14 @@ public class App
     {
 
    // get a logger instance named "com.foo"
-   Logger  logger = Logger.getLogger("com.foo");
+   Logger  logger = LoggerFactory.getLogger("com.foo");
 

-   Logger barlogger = Logger.getLogger("com.foo.Bar");
+   Logger barlogger = LoggerFactory.getLogger("com.foo.Bar");
 
    // This request is enabled, because WARN >= INFO.
    logger.warn("Low fuel level.");

package dave;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Hello world!
 *
 */
public class App
{
    public static void main( String[] args )
    {

   // get a logger instance named "com.foo"
   Logger  logger = LoggerFactory.getLogger("com.foo");

   Logger barlogger = LoggerFactory.getLogger("com.foo.Bar");

   // This request is enabled, because WARN >= INFO.
   logger.warn("Low fuel level.");

   // This request is disabled, because DEBUG < INFO.
   logger.debug("Starting search for nearest gas station.");

   // The logger instance barlogger, named "com.foo.Bar",
   // will inherit its level from the logger named
   // "com.foo" Thus, the following request is enabled
   // because INFO >= INFO.
   barlogger.info("Located nearest gas station.");

   // This request is disabled, because DEBUG < INFO.
   barlogger.debug("Exiting gas station search");
    }

}

Saturday, September 26, 2020

Access Weblogic log information through Elasticsearch and Kibana

Elastic

Kibana


WebLogic Logging Exporter 

 https://github.com/oracle/weblogic-logging-exporter


Install WebLogic Logging Exporter 



Copy JAR to domain
cp ~/Downloads/weblogic-logging-exporter-1.0.0.jar /app/domains/base_domain/

Start Weblogic domain
[dave@dave ~]$ cd /app/domains/base_domain/
[dave@dave base_domain]$ ./startWebLogic.sh 

Access Weblogic console via browser at
http://localhost:7001/console/
Add StarUp class In the Administration Console, navigate to "Environment" then "Startup and Shutdown classes" in the main menu. Add a new Startup class. You may choose any descriptive name and the class name must be weblogic.logging.exporter.Startup. Target the startup class to each server that you want to export logs from.
base_domain]$ more config/config.xml

  <startup-class>
    <name>StartupClass-weblogic.logging.exporter</name>
    <target>AdminServer</target>
    <class-name>weblogic.logging.exporter.Startup</class-name>
  </startup-class>

Download org.yaml:snakeyaml https://search.maven.org/artifact/org.yaml/snakeyaml/1.27/bundle
 cp ~/Downloads/snakeyaml-1.27.jar /app/domains/base_domain/

Add CLASSPATH into bin/setDomainEnv.sh
ls snakeyaml-1.27.jar 
snakeyaml-1.27.jar
[dave@dave base_domain]$ grep snake bin/setDomainEnv.sh 
export CLASSPATH=$DOMAIN_HOME/weblogic-logging-exporter-1.0.0.jar:snakeyaml-1.27.jar:$CLASSPATH

Add WebLogic Logging Exporter config file
vi config/WebLogicLoggingExporter.yaml

more   config/WebLogicLoggingExporter.yaml
publishHost:  localhost
publishPort:  9200
domainUID:  base_domain
weblogicLoggingExporterEnabled: true
weblogicLoggingIndexName:  base_domain_wls
weblogicLoggingExporterSeverity:  Notice
weblogicLoggingExporterBulkSize: 1
weblogicLoggingExporterFilters:
- filterExpression:  'severity > Warning'

Install Docker ElasticSearch https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.9.2
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.9.2


ocker pull docker.elastic.co/elasticsearch/elasticsearch:7.9.2
7.9.2: Pulling from elasticsearch/elasticsearch
f1feca467797: Pull complete 
2b669da077a4: Pull complete 
e5b4c466fc6d: Pull complete 
3b660c013f1a: Pull complete 
0e7ad1133ad1: Pull complete 
b50d6e48f432: Pull complete 
bff3705905f9: Pull complete 
9509765886ad: Pull complete 
b7f06f509306: Pull complete 
Digest: sha256:2be3302537236874fdeca184c78a49aed17d5aca0f8fc3f6192a80e93e817cb4
Status: Downloaded newer image for docker.elastic.co/elasticsearch/elasticsearch:7.9.2
docker.elastic.co/elasticsearch/elasticsearch:7.9.2

Run Docker Elastic


docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.9.2


Install Kibana https://www.elastic.co/guide/en/kibana/current/docker.html
docker pull docker.elastic.co/kibana/kibana:7.9.2
Start dev Kibana
docker run -d                           --name kibana                         -p 5601:5601                          --link elasticsearch:elasticsearch    -e "ELASTICSEARCH_URL=http://elasticsearch:9200"   docker.elastic.co/kibana/kibana:7.9.2

Docker containers
 docker ps
CONTAINER ID        IMAGE                                                 COMMAND                  CREATED             STATUS              PORTS                                            NAMES
8ba52c43304f        docker.elastic.co/kibana/kibana:7.9.2                 "/usr/local/bin/dumb…"   4 seconds ago       Up 3 seconds        0.0.0.0:5601->5601/tcp                           kibana
9fdc569676e0        docker.elastic.co/elasticsearch/elasticsearch:7.9.2   "/tini -- /usr/local…"   6 minutes ago       Up 6 minutes        0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp   elasticsearch

Weblogic start log when Elastic cannot be reached
======================= Weblogic Logging Exporter Startup class called
Reading configuration from file name: /app/domains/base_domain/config/WebLogicLoggingExporter.yaml
<Sep 26, 2020 10:24:49,146 AM CEST> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.> 
Config{weblogicLoggingIndexName='domain1-wls', publishHost='localhost', publishPort=9200, weblogicLoggingExporterSeverity='Notice', weblogicLoggingExporterBulkSize='1', enabled=true, weblogicLoggingExporterFilters=[FilterConfig{expression='null', servers=[]}], domainUID='domain1'}
javax.ws.rs.ProcessingException: java.net.ConnectException: Tried all: '2' addresses, but could not connect over HTTP to server: 'localhost', port: '9200'
 failed reasons:
  [0] address:'localhost/127.0.0.1',port:'9200' : java.net.ConnectException: Connection refused
  [1] address:'localhost/0:0:0:0:0:0:0:1',port:'9200' : java.net.ConnectException: Connection refused

    at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:260)
    at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:254)
    at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$0(JerseyInvocation.java:729)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:205)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:390)
    at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:728)
    at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:421)
    at org.glassfish.jersey.client.JerseyInvocation$Builder.put(JerseyInvocation.java:310)
    at weblogic.logging.exporter.LogExportHandler.executePutOrPostOnUrl(LogExportHandler.java:170)
    at weblogic.logging.exporter.LogExportHandler.createMappings(LogExportHandler.java:300)
    at weblogic.logging.exporter.LogExportHandler.<init>(LogExportHandler.java:56)
    at weblogic.logging.exporter.Startup.main(Startup.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeMain(ClassDeploymentManager.java:449)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:359)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$100(ClassDeploymentManager.java:63)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:286)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:273)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:344)
    at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClassDeployment(ClassDeploymentManager.java:272)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClassDeployments(ClassDeploymentManager.java:253)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.runStartupsAfterAppAdminState(ClassDeploymentManager.java:215)
    at weblogic.management.deploy.classdeployment.StartupClassPrelistenService.start(StartupClassPrelistenService.java:29)
    at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:76)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1268)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:309)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:351)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:678)
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:54)
    at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:188)
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:211)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:334)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:677)
    at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
    at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
    at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
    at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
    at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:651)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:360)
Caused by: java.net.ConnectException: Tried all: '2' addresses, but could not connect over HTTP to server: 'localhost', port: '9200'
 failed reasons:
  [0] address:'localhost/127.0.0.1',port:'9200' : java.net.ConnectException: Connection refused
  [1] address:'localhost/0:0:0:0:0:0:0:1',port:'9200' : java.net.ConnectException: Connection refused

    at weblogic.net.http.HttpClient.openServer(HttpClient.java:408)
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:511)
    at weblogic.net.http.HttpClient.New(HttpClient.java:313)
    at weblogic.net.http.HttpClient.New(HttpClient.java:292)
    at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:295)
    at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:685)
    at weblogic.net.http.SOAPHttpURLConnection.getInputStream(SOAPHttpURLConnection.java:42)
    at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1546)
    at org.glassfish.jersey.client.internal.HttpUrlConnector._apply(HttpUrlConnector.java:366)
    at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:258)

Weblogic good start with Elastic running in Docker
======================= Weblogic Logging Exporter Startup class called
Reading configuration from file name: /app/domains/base_domain/config/WebLogicLoggingExporter.yaml
<Sep 26, 2020 10:35:23,780 AM CEST> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.> 
Config{weblogicLoggingIndexName='domain1-wls', publishHost='localhost', publishPort=9200, weblogicLoggingExporterSeverity='Notice', weblogicLoggingExporterBulkSize='1', enabled=true, weblogicLoggingExporterFilters=[FilterConfig{expression='null', servers=[]}], domainUID='domain1'}

dave@dave base_domain]$ curl "localhost:9200/_cat/indices?v"
health status index       uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   domain1-wls SQqMMWxgTCi6nhWyDSmeyg   1   1         25            0     39.6kb         39.6kb


Verify that logs were posted


Running Elasticsearch and Kibana locally for testing



Kibana



Access Kibana at http://localhost:5601/ 


 Getting
Kibana server is not ready yet



Used newest version - but there are some issues
Caused by: org.elasticsearch.index.mapper.MapperParsingException: Root mapping definition has unsupported parameters:  [doc : {properties={severity={type=keyword}, sequenceNumber={type=keyword}, subSystem={type=keyword}, level={type=keyword}, serverName={type=keyword}, messageID={type=keyword}, domainUID={type=keyword}, userId={type=keyword}, threadName={type=keyword}, machineName={type=keyword}, transactionId={type=keyword}, loggerName={type=keyword}, timestamp={type=date}}}]",
"at org.elasticsearch.index.mapper.DocumentMapperParser.checkNoRemainingFields(DocumentMapperParser.java:148) ~[elasticsearch-7.9.2.jar:7.9.2]",
"at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:136) ~[elasticsearch-7.9.2.jar:7.9.2]",
"at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:88) ~[elasticsearch-7.9.2.jar:7.9.2]",
"at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:421) ~[elasticsearch-7.9.2.jar:7.9.2]",
"... 23 more"] }

Older version 6.2.2
docker run -d                       --name elasticsearch              -p 9200:9200                      -p 9300:9300                      -e "discovery.type=single-node"   docker.elastic.co/elasticsearch/elasticsearch:6.2.2
d8308574a82fc0f36e43c71846db51c7e26e567c53927c207730cde61b2512f5




docker run -d                       --name elasticsearch              -p 9200:9200                      -p 9300:9300                      -e "discovery.type=single-node"   docker.elastic.co/elasticsearch/elasticsearch:6.2.2

docker run -d                           --name kibana                         -p 5601:5601                          --link elasticsearch:elasticsearch    -e "ELASTICSEARCH_URL=http://elasticsearch:9200"   docker.elastic.co/kibana/kibana:6.2.2
ba259c96db5564c02e80116820bb78db65fd2c8919e33449d3c0ed3a6da4fb5a

Running
 docker ps
CONTAINER ID        IMAGE                                                 COMMAND                  CREATED              STATUS              PORTS                                            NAMES
ba259c96db55        docker.elastic.co/kibana/kibana:6.2.2                 "/bin/bash /usr/loca…"   34 seconds ago       Up 34 seconds       0.0.0.0:5601->5601/tcp                           kibana
d8308574a82f        docker.elastic.co/elasticsearch/elasticsearch:6.2.2   "/usr/local/bin/dock…"   About a minute ago   Up About a minute   0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp   elasticsearch

Weblogic log
======================= Weblogic Logging Exporter Startup class called
Reading configuration from file name: /app/domains/base_domain/config/WebLogicLoggingExporter.yaml
<Sep 26, 2020 10:53:58,858 AM CEST> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.> 
Config{weblogicLoggingIndexName='domain1-wls', publishHost='localhost', publishPort=9200, weblogicLoggingExporterSeverity='Notice', weblogicLoggingExporterBulkSize='1', enabled=true, weblogicLoggingExporterFilters=[FilterConfig{expression='null', servers=[]}], domainUID='domain1'}

Elasticsearch Kibana errors
Caused by: org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
    at org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedException(ClusterBlocks.java:182) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.handleBlockExceptions(TransportReplicationAction.java:813) ~[elasticsearch-6.2.2.jar:6.2.2]

[2020-09-26T09:03:43,980][WARN ][o.e.x.m.e.l.LocalExporter] unexpected error while indexing monitoring document
org.elasticsearch.xpack.monitoring.exporter.ExportException: ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]
    at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.lambda$throwExportException$2(LocalBulk.java:140) ~[?:?]
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_161]
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_161]
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:1.8.0_161]
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_161]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_161]
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_161]
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_161]
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_161]
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_161]
    at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.throwExportException(LocalBulk.java:141) ~[?:?]
    at org.elasticsearch.xpack.monitoring.exporter.local.LocalBulk.lambda$doFlush$0(LocalBulk.java:123) ~[?:?]
    at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:43) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:85) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:81) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.bulk.TransportBulkAction$BulkRequestModifier.lambda$wrapActionListenerIfNeeded$0(TransportBulkAction.java:571) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.finishHim(TransportBulkAction.java:380) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.onFailure(TransportBulkAction.java:375) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.TransportAction$1.onFailure(TransportAction.java:91) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.finishAsFailed(TransportReplicationAction.java:909) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.handleBlockException(TransportReplicationAction.java:827) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.handleBlockExceptions(TransportReplicationAction.java:815) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.doRun(TransportReplicationAction.java:713) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.replication.TransportReplicationAction.doExecute(TransportReplicationAction.java:170) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.replication.TransportReplicationAction.doExecute(TransportReplicationAction.java:98) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:167) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.apply(SecurityActionFilter.java:133) ~[?:?]
    at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:165) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:139) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:81) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation.doRun(TransportBulkAction.java:350) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.bulk.TransportBulkAction.executeBulk(TransportBulkAction.java:462) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.bulk.TransportBulkAction.doExecute(TransportBulkAction.java:175) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.bulk.TransportBulkAction.lambda$processBulkIndexIngestRequest$4(TransportBulkAction.java:514) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.ingest.PipelineExecutionService$2.doRun(PipelineExecutionService.java:103) [elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:672) [elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.2.2.jar:6.2.2]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_161]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_161]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
Caused by: org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
    at org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedException(ClusterBlocks.java:182) ~[elasticsearch-6.2.2.jar:6.2.2]
    at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.handleBlockExceptions(TransportReplicationAction.java:813) ~[elasticsearch-6.2.2.jar:6.2.2]

docker images
REPOSITORY                                      TAG                 IMAGE ID            CREATED             SIZE
<none>                                          <none>              233dc2c81588        14 hours ago        423MB
<none>                                          <none>              0aa94d9613a1        14 hours ago        615MB
oracle/serverjre                                8                   9e58399899c9        14 hours ago        359MB
docker.elastic.co/kibana/kibana                 7.9.2               ba296c26886a        3 days ago          1.18GB
docker.elastic.co/elasticsearch/elasticsearch   7.9.2               caa7a21ca06e        3 days ago          763MB
alpine                                          latest              a24bb4013296        3 months ago        5.57MB
oracle/weblogic                                 12.2.1.4-slim       9f08a7ac6c5a        11 months ago       817MB
<none>                                          <none>              fdf24d1eabc2        11 months ago       1.2GB
12214-weblogic-domain-generic                   latest              93dc22395c42        11 months ago       1.26GB
oracle/weblogic                                 12.2.1.4-generic    b67e91a22473        11 months ago       1.26GB
<none>                                          <none>              ba227fc7cf16        11 months ago       2.99GB
oraclelinux                                     7-slim              874477adb545        13 months ago       118MB
hello-world                                     latest              fce289e99eb9        21 months ago       1.84kB
docker.elastic.co/kibana/kibana                 6.2.2               87fb54648d86        2 years ago         985MB
docker.elastic.co/elasticsearch/elasticsearch   6.2.2               576825ff4f5a        2 years ago         574MB