Wikis - Page

(UCMDB) Support Tip: UCMDB Data Flow Probe getting error after upgrade: File "logger", line 25, in <module>

1 Likes

UCMDB DFP (Data Flow Probe) 2018.11 - 2022.02

Situation

If the log4j shows error as follow:

Full error message: << Progress message, Severity: Error>>
Failed executing script, details: Traceback (most recent call last):
  File "logger", line 25, in <module>
AttributeError: type object 'com.mercury.topaz.cmdb.shared.base.log.LogFactory' has no attribute 'getEasyLog'


The old steps proposed are as followed:

Prepare UCMDB and Probes for Log4j Update
1. Copy 7-Zip directory from Jump Server (C:\Program Files\7-Zip) to UCMDB Server
a. Copyfrom Jump Server to E:\7-Zip on the UCMDB Server
2. Stop the UCMDB_Server and UCMDB_Integration Services on the UCMDB Server
3. Stop the UCMDB_Probe Windows service on each of the probe servers

On the UCMDB Server, delete content of following filesystems
Clear jetty cache

1. E:\hp\UCMDB\UCMDBServer\runtime\jetty-cache folder
and
2. E:\hp\UCMDB\UCMDBServer\integrations\runtime\temp folder
For Data Flow Probe, delete the content of
3. E:\UCMDB\DataFlowProbe_2021.11\runtime\temp folder
On the UCMDB Server
4. Remove E:\hp\UCMDB\UCMDBServer\deploy\rest-api folder
5. Remove log4j-core.jar under
E:\hp\UCMDB\UCMDBServer\deploy\ucmdb-ui\static\appletJars
This step will prevent Local Client component from downloading log4j-core.jar from UCMDB server.
6. Open Command Prompt (or run cmd.exe) as administrator and run the following commands:

cd /d E:\hp\UCMDB\UCMDBServer
for /R %f in (*log4j-core*.jar) do xcopy /y \\fepcd1\temp\UCMDB\Log4j\log4j-core-2.17.1.jar %f && rename %f log4j-core-2.17.1.jar
for /R %f in (*log4j-api*.jar) do xcopy /y \\fepcd1\temp\UCMDB\Log4j\log4j-api-2.17.1.jar %f && rename %f log4j-api-2.17.1.jar

On the Probe Servers

7. Open Command Prompt (or run cmd.exe) as administrator and run the following commands:

cd /d E:\UCMDB\DataFlowProbe_2021.11
for /R %f in (*log4j-core*.jar) do xcopy /y \\fepcd1\temp\UCMDB\Log4j\log4j-core-2.17.1.jar %f && rename %f log4j-core-2.17.1.jar
for /R %f in (*log4j-api*.jar) do xcopy /y \\fepcd1\temp\UCMDB\Log4j\log4j-api-2.17.1.jar %f && rename %f log4j-api-2.17.1.jar

On the UCMDB Server

8. Create WEB-INF\lib folder under E:\hp\UCMDB\UCMDBServer, and copy log4j-core-2.17.1.jar and log4j-api-2.17.1.jar into this folder and into E:\hp\UCMDB\UCMDBServer\lib

9. Open Command Prompt (or run cmd.exe) as administrator and run the following commands:

10. Delete newly created WEB-INF\lib folder(s) (E:\hp\UCMDB\UCMDBServer\WEB-INF\lib).

cd /d E:\hp\UCMDB\UCMDBServer

for /R %f in (ucmdb*_service.aar) do ("E:\7-Zip\7z" l %f | findstr /R ".*lib\\log4j-core.*.jar") && "E:\7-Zip\7z" d %f lib\log4j-core*.jar && "E:\7-Zip\7z" a %f lib\log4j-core-2.17.1.jar
for /R %f in (ucmdb*_service.aar) do ("E:\7-Zip\7z" l %f | findstr /R ".*lib\\log4j-api.*.jar") && "E:\7-Zip\7z" d %f lib\log4j-api*.jar && "E:\7-Zip\7z" a %f lib\log4j-api-2.17.1.jar
for /R %f in (rest-api*.war) do ("E:\7-Zip\7z" l %f | findstr /R ".*lib\\log4j-core.*.jar") && "E:\7-Zip\7z" d %f WEB-INF\lib\log4j-core*.jar && "E:\7-Zip\7z" a %f WEB-INF\lib\log4j-core-2.17.1.jar
for /R %f in (rest-api*.war) do ("E:\7-Zip\7z" l %f | findstr /R ".*lib\\log4j-api.*.jar") && "E:\7-Zip\7z" d %f WEB-INF\lib\log4j-api*.jar && "E:\7-Zip\7z" a %f WEB-INF\lib\log4j-api-2.17.1.jar

Restart Services and Cleanup

• Start the UCMDB_Server and UCMDB_Integration Services on the UCMDB Server

• Start the UCMDB_Probe Windows service on each of the probe servers.

• Delete E:\7-Zip and its contents from the UCMDB Server.

End of procedure.


Cause

This procedure is old and should not be used. After upgrade the in the DFP path
<DIsk drive>\UCMDB\UCMDBServer\lib there are files called log4j-api-2.17.0.jar and log4j-core-2.17.0.jar or
log4j-core-2.17.1.jar and log4j-core-2.17.1.jar
After upgrading the DFP it expects these files don't contain the version, so they should be named like:
log4j-api.jar and log4j-core.jar


Resolution

Backup the files and just rename them to log4j-core.jar and log4-api.jar. Do not touch log4j.jar

Labels:

Support Tips/Knowledge Docs
Comment List
Related
Recommended