This manual will guide you on how to delete the Dlog4j2.formatMsgNoLookups parameter on a Windows server.
This is required only if you are installing quilliup version 2.6.7 or above, and the parameter exists.
First, check if the parameter exists in both files service.bat & catalina.bat (“../quilliup/bin/catalina.bat").
Follow the next steps:
1. Copy “../quilliup/bin/service.bat" and “../quilliup/bin/catalina.bat" files to another
location, rename them, and save the files.
For example:
Rename to "service_backup.bat" and "catalina_backup.bat".
2. Go to the folder "...\quilliup\bin" and delete the parameter "-Dlog4j2.formatMsgNoLookups=true" from the next two files:
File“../quilliup/bin/service.bat":
Please delete the parameter:-Dlog4j2.formatMsgNoLookups=true; from the next
row:
--JvmOptions
"-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-Dja
va.endorsed.dirs=%CATALINA_HOME%\endorsed;-Djava.io.tmpdir=%CATALINA_BA
SE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Dja
va.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties;-XX:MaxPerm
Size=512m;-XX:PermSize=512m;-XX:+CMSClassUnloadingEnabled;-XX:+CMSPerm
GenSweepingEnabled;-Dlog4j2.formatMsgNoLookups=true;" ^File “../quilliup/bin/catalina.bat":
Please delete the parameter:-Dlog4j2.formatMsgNoLookups=true from the the
next row:
set JAVA_OPTS=-Xms8192m -Xmx8192m -XX:MaxPermSize=512m
-XX:+CMSClassUnloadingEnabled -Dlog4j2.formatMsgNoLookups=true
3. Open cmd -> right-click -> run CMD as Administrator:
a) Type to the quilliup installation folder, for example, cd/d"....\quilliup\bin"
b) Run next command: sc delete quilliup (quilliup is the service name).
c) Open the Services and refresh the list to ensure the quilliup service has been deleted.
d) Make sure the path is correctly set for the new Java version in the environment.
variables:
i) On the Windows taskbar, right-click the Windows icon and select System.
ii) In the Settings window, under Related Settings, click Advanced system settings.
iii) Check the user’s variables:
Add or Edit the JAVA_HOME and JRE_HOME environment
variables and set their values to the current correct path:
iv) System Variables:
Add or Edit the JAVA_HOME and JRE_HOME environment variables and set their values to the current correct path:
System Variable Path- set the correct path for the bin folder of the new Java version, for example:
%JAVA_HOME%\bin;%JRE_HOME%\bin; ……………
v) Note: close the services window before installing quilliup service.
Install the service by running the next command on cmd:
service.bat install quilliup
vi) Open the Services and refresh the list to make sure quilliup service has been created.
vii) Ensure that the quilliup service runs with the correct account name and password (from the Prerequisites section).
Go to the "..\quilliup\logs" folder and open the "catalina" log file or "quilliup-stderr" log file. Make sure that the log rows are updated with the new parameter set previously.
Make sure that the Java version is updated and that the log4j the parameter does not appear.
For example
Comments
0 comments
Please sign in to leave a comment.