VMware Cloud Community
BrianCoA
Contributor
Contributor
Jump to solution

Unable to apply log4j vulnerability workaround on LCM

https://kb.vmware.com/s/article/87097

I followed the instructions per the KB.  I get the following error when I attempt to run the script:

vmlcm-service-8.1.1-SNAPSHOT.jar: binary operator expected
vRSLCM services jar does not exist

Currently running  vRSLCM 8.6.0.20

0 Kudos
2 Solutions

Accepted Solutions
Techstarts
Expert
Expert
Jump to solution

Check if you have more than one .jar file in that folder.

Move the older Jar file in other folder and run. it works.

But remember if your version 8.4.x, then the jar file older than 8.4.x should  be removed.

in my case, the older jar file was 8.1.1 (e.g.vmlcm-service-8.1.1-SNAPSHOT.jar)

With Great Regards,

View solution in original post

BrianCoA
Contributor
Contributor
Jump to solution

The original KB has been updated to address this error.

Note: if you encounter the below error while executing the script rename the old version of vRSLCM SNAPSHOT.jar file and rerun the script./log4jfix.sh: line 4: [: vmlcm-service-8.1.1-SNAPSHOT.jar: binary operator expected
vRSLCM services jar does not exist

Steps to rename:

1.change directory to /var/lib/vrlcm

cd /var/lib/vrlcm
2. Run the below command to rename the file
mv vmlcm-service-8.1.1-SNAPSHOT.jar vmlcm-service-8.1.1-SNAPSHOT_old.jar

View solution in original post

0 Kudos
6 Replies
jlonsdale
Contributor
Contributor
Jump to solution

Having exactly the same issue.

Script immediately fails with the following;

./log4jfix.sh: line 4: [: vmlcm-service-8.1.1-SNAPSHOT.jar: binary operator expected
-bash: ./log4jfix.sh:: No such file or directory

0 Kudos
Techstarts
Expert
Expert
Jump to solution

Same here. Not working for me as well

With Great Regards,
0 Kudos
Techstarts
Expert
Expert
Jump to solution

Check if you have more than one .jar file in that folder.

Move the older Jar file in other folder and run. it works.

But remember if your version 8.4.x, then the jar file older than 8.4.x should  be removed.

in my case, the older jar file was 8.1.1 (e.g.vmlcm-service-8.1.1-SNAPSHOT.jar)

With Great Regards,
LanceV1
Contributor
Contributor
Jump to solution

Thank you, this worked for me, I also had two .jar files in /var/lib/vrlcm

Relocated vmlcm-service-8.1.1-SNAPSHOT.jar to another folder and the script has run

0 Kudos
Steven1973
Enthusiast
Enthusiast
Jump to solution

Removed the old .jar file and now getting this,,,,

zip warning: Local Entry CRC does not match CD: BOOT-INF/classes/log4j2.xml
(deflated 60%)
test of vmlcm-service-8.4.1-SNAPSHOT.jar OK
Zip action: 0
Waiting for vRLCM services to start.

 

0 Kudos
BrianCoA
Contributor
Contributor
Jump to solution

The original KB has been updated to address this error.

Note: if you encounter the below error while executing the script rename the old version of vRSLCM SNAPSHOT.jar file and rerun the script./log4jfix.sh: line 4: [: vmlcm-service-8.1.1-SNAPSHOT.jar: binary operator expected
vRSLCM services jar does not exist

Steps to rename:

1.change directory to /var/lib/vrlcm

cd /var/lib/vrlcm
2. Run the below command to rename the file
mv vmlcm-service-8.1.1-SNAPSHOT.jar vmlcm-service-8.1.1-SNAPSHOT_old.jar

0 Kudos