{"id":11039,"date":"2022-01-27T16:24:55","date_gmt":"2022-01-27T22:24:55","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/techblog\/?p=11039"},"modified":"2023-05-19T13:49:24","modified_gmt":"2023-05-19T19:49:24","slug":"upgrading-m-power-to-use-log4j-2","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/techblog\/?ht_kb=upgrading-m-power-to-use-log4j-2","title":{"rendered":"Upgrading m-Power to use log4j 2"},"content":{"rendered":"<p>m-Power currently utilizes log4j version 1 for various logging purposes. We at mrc are confident version 1 is <b>not<\/b> impacted by the log4j 2 vulnerability (CVE-2021-44228) discovered in December of 2021. Due to a lack of justifiable benefits, there is no plan to upgrade log4j to log4j 2 at this time. However, if it is your company policy to be on the latest version of software packages, please follow these steps.<\/p>\n<ol>\n<li>Go to the <a target=\"_blank\" href=\"https:\/\/logging.apache.org\/log4j\/2.x\/download.html\" rel=\"noopener\">Apache Log4j 2 Download Site.<\/a><\/li>\n<li>Click on the mirror link for &#8220;Apache Log4j 2 binary (zip). The link should be &#8220;apache-log4j-2.XX-bin.zip&#8221;.<\/li>\n<li>Download the zip file from the suggested link at the top of the page.<\/li>\n<li>There are many files in the zip file. You will only need 3. Find and extract the following 3 files to the m-Power server:\n<ul>\n<li>log4j-1.2-api-2.XX.X.jar<\/li>\n<li>log4j-api-2.XX.X.jar<\/li>\n<li>log4j-core-2.XX.X.jar<\/li>\n<\/ul>\n<\/li>\n<li>On the m-Power server, stop Tomcat.<\/li>\n<li>Go to \/mrcjava\/WEB-INF\/lib.<\/li>\n<li>Find and delete the existing log4j-1.X.X.jar file.<\/li>\n<li>Copy the three previously extracted log4j jar files to:\n<ul>\n<li>\/mrcjava\/WEB-INF\/lib<\/li>\n<li>\/mrcwebgui\/WEB-INF\/lib<\/li>\n<\/ul>\n<\/li>\n<li>Open a PC command line on the m-Power server.<\/li>\n<li>Type <code>cd C:\\Program Files\\mrc\\development\\m-power\\tomcat\\bin<\/code>.<br \/>\n  <b>Note:<\/b> Make sure this path is pointing to the correct m-Power installation.\n<\/li>\n<li>Next, type <code>tomcat9w \/\/ES\/\/TC9DEV<\/code> where TC9DEV is the service name of Tomcat.<br \/>\n  <b>Note:<\/b> If using Tomcat 7, please change all references of 9 to 7.<\/li>\n<li>A window will pop up. Switch to the Java tab.<\/li>\n<li>Add the following line to the bottom of the Java Options window:<br \/>\n  <code>-Dlog4j1.compatibility=true<\/code>\n<\/li>\n<li>Click <b>OK<\/b>.<\/li>\n<li>Start Tomcat.<\/li>\n<\/ol>\n<p>Repeat these steps for all installed instances of Tomcat.<\/p>\n<h3>Additional Notes<\/h3>\n<ul>\n<li>Steps 9-14 are specific to a Windows server. If m-Power is installed on a Linux server, you will need to add the java option from step 13 above to the \\m-power\\tomcat\\bin\\setenv.sh file.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>m-Power currently utilizes log4j version 1 for various logging purposes. We at mrc are confident version 1 is not impacted by the log4j 2 vulnerability (CVE-2021-44228) discovered in December of 2021. Due to a lack of justifiable benefits, there is no plan to upgrade log4j to log4j 2 at this&#8230;<\/p>\n","protected":false},"author":10,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[152],"ht-kb-tag":[],"class_list":["post-11039","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-administration"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/11039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11039"}],"version-history":[{"count":12,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/11039\/revisions"}],"predecessor-version":[{"id":11052,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/11039\/revisions\/11052"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11039"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-category&post=11039"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-tag&post=11039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}