IEM 9 Linux Server - Unmanaged Asset Importer issues

(imported topic written by dgowan777)

Dear dW,

I’m having a problem importing unmanaged assets after performing an asset discovery nmap scan. I’ve run several scans, where I know there are unmanaged assets, however, nothing is showing up in the unmanaged assets view. I viewed one of the nmap xml files (/var/opt/BESClient/BESScanner-NMAP/NMAP/nmap--.xml) and I could see that it discovered 3 systems in the IP range I supplied, so I know that the scans are working.

I turned on debugging for the UAI, which revealed the following, which repeat every 10 minutes:

[Thu Apr 25 20:14:19 2013] Encountered a fatal error: install_driver(DB2) failed: Can’t load ‘auto/DBD/DB2/DB2.so’ for module DBD::DB2: auto/DBD/DB2/DB2.so: cannot open shared object file: No such file or directory at /</var/opt/BESServer/AssetDiscovery/UAImporter-NMAP>DynaLoader.pm line 222.

at perlapp line 848.

Perhaps a required shared library or dll isn’t installed where expected

at UnmanagedAssetImporter-NMAP.pl line 184.

I’m unable to read UAImporter-NMAP, as it is compiled. DynaLoader.pm is located in two places, and they have different sizes and mod dates (which causes me to lean towards the one in /tmp):

[root@iem9lnx opt]# find / -name DynaLoader.pm

25033 May 2 2012 /usr/lib64/perl5/DynaLoader.pm

14269 Feb 28 18:30 /tmp/par-726f6f74/cache-445d5f7d4d6a16a7ff5875b5620826ea/inc/lib/DynaLoader.pm

I cannot find either of the remaining files (perlapp and UnmanagedAssetImporter-NMAP.pl), so my troubleshooting opportunities are pretty slim… D=

My env: VM=2CPU, 4GB RAM, RHEL 6.3, IEM 9.0.586, DB2 10.1

Any assistance is appreciated.

Thank you.

Darin

(imported comment written by kfriedheim)

Hi Darin,

A couple of questions for you:

  1. Is this a remote database (e.g. DB2 installed on this computer along side the IEM Server)?

  2. Can you confirm for me that the file /var/opt/BESServer/bes.info exists on this computer?

(imported comment written by dgowan777)

Hi. Thx for the post.

  1. I have DB2 10.1 installed on the IEM server (local DB)

  2. Yes, the bes.info exists, and here are the contents as well as a dir listing of the db2 lib:

[root@iem9lnx iem_license]# cd /var/opt/BESServer/

[root@iem9lnx BESServer]# ls

Applications besserver.config.default ConnectionLogs icudt49l.dat ServerSigningKey

AssetDiscovery besserver.obf Encryption Keys license UploadManagerData

bes.info ClientCAKey FillDBData Mirror Server wwwrootbes

besserver.config ClientRegisterData GatherDBData server_audit.log

[root@iem9lnx BESServer]# cat bes.info

DB2_ADMIN_USER=iemuser

DB2_LIB_PATH=:/db/iemuser/sqllib/lib32

[root@iem9lnx BESServer]# ls /db/iemuser/sqllib/lib32

db2rexx libdb2dasapi.so.1 libdb2install.so libdb2licm.so.1 libdb2sec.so

gskit libdb2dascmn.so libdb2install.so.1 libdb2locale.so libdb2sec.so.1

gskit_db2 libdb2dascmn.so.1 libdb2jcc2.so libdb2locale.so.1 libdb2.so

libcapro.so libdb2daswrap.so libdb2jcc2.so.1 libdb2osse_db2.so libdb2.so.1

libcapro.so.1 libdb2daswrap.so.1 libdb2jcct2.so libdb2osse_db2.so.1 libdb2trcapi.so

libdb2adtca.so libdb2g11n.so libdb2jcct2.so.1 libdb2osse.so libdb2trcapi.so.1

libdb2adtca.so.1 libdb2g11n.so.1 libdb2jdbc.so libdb2osse.so.1 libdb2xmrp.so

libdb2ar.so libdb2genreg.so libdb2jdbc.so.1 libdb2sdbin.so libdb2xmrp.so.1

libdb2dasapi.so libdb2genreg.so.1 libdb2licm.so libdb2sdbin.so.1 libdldap.a

Thanks again.

Darin

(imported comment written by kfriedheim)

I think you might have stumbled upon a bug – good find!!

Can you please try the following:

  1. Backup the file /var/opt/BESServer/Applications/Config/BESAssetDiscover.xml by copying to some unrelated directory.

  2. Modify the file /var/opt/BESServer/Applications/Config/BESAssetDiscover.xml (same file) such that it looks like this:

<?xml version="1.0"?>

BESAssetDiscovery

export DB2_HOME=/db/iemuser/sqllib/;export DB2LIB=/db/iemuser/sqllib/lib64/;export LD_LIBRARY_PATH=/db/iemuser/sqllib/lib64/;“/var/opt/BESServer/AssetDiscovery/UAImporter-NMAP”

0

true

then, in a terminal type the following:

pgrep “UAImporter-NMAP”

That gets you the process ID

kill -9

This kills the process (don’t worry it’ll respawn right away with the changes we just made) – where PID is the process ID we just captured in the previous step.

Let me know if things work for you now…

(imported comment written by dgowan777)

Excellent work kfriedheim!

Yes, correcting the db directory in the exported variables fixed the problem. The unmanaged assets view now lists the results from the multiple scans that I ran.

Thank you so much.

Darin