Attempting to upgrade Jboss Minor version fails with WFLYPAT0018
search cancel

Attempting to upgrade Jboss Minor version fails with WFLYPAT0018

book

Article ID: 380061

calendar_today

Updated On:

Products

CA Identity Suite

Issue/Introduction

When attempting to upgrade JBoss  7.4 update 18 to apply bugs and vulnerability fixes the upgrade fails with:

 

./jboss-cli.sh

You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.

[disconnected /] patch apply /opt/patches/jboss-eap-7.4.18-patch.zip

{java.io.SyncFailedException: WFLYPAT0018: copied content does not mat
ch expected hash for item: ModuleItem{org.apache.logging.log4j.api:main}

}

Environment

Identity Manager running on JBOSS

Cause

Reviewing the opt/jboss/modules/system/layers/base/org/apache/logging/log4j/api/main folder from the error message we see a backup of the log4j folder which is interfering with the upgrade:

ls -ltr

total 4
-rw-r--r--. 1 jboss jboss 1561 Jun 23  2021 module.xml
drwxrwxr-x. 2 jboss jboss   30 Jul 19 19:32 log4j_backup

Resolution

Remove the backed up log4j folder outside the Jboss/Modules folder and retry the Jboss Patch.

Additional Information

If you encounter a Conflicts detected failure which mentions using the override all switch:

You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] patch apply /opt/patches/jboss-eap-7.4.18-patch.zip
Conflicts detected: org.apache.logging.log4j.api:main
Use the --override-all, --override=[] or --preserve=[] arguments in order to res
olve the conflict.


Please see Redhat documentation on this:  https://access.redhat.com/solutions/1137663 and use the override all switch when applying the patch:

./jboss-cli.sh

You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.

[disconnected /] patch apply /opt/patches/jboss-eap-7.4.18-patch.zip --override-module

{

    "outcome" : "success",

    "result" : {}

}