When i tried to make a host discovery (using nmap) i saw an error:
/u01/agent12c/agent_inst/discovery/nmap/bin/nmap: error while loading shared libraries: libsvn_client-1.so.0: cannot open shared object file: No such file or directory
001. INTRODUCTION
I don’t used an host discovery for a while after upgrade OMS to relese 4. Until now. Previously he worked without problems – and now i again must scan one host..
002 . PROBLEM IS DISCLOSED…
I created a new job to scan newly created machine. One address is defined as scan target.
When i tried to run this job – he end work with “Failed” state. But why?
Mark this line by clicking on it and next select “View Job Details“.
You will see, that Step: step1_run_nmap has failed.
Click on “Log Report” for details.
003. ERORR DETAILS
I saw “Output Log” with strange error:
1 |
/u01/agent12c/agent_inst/discovery/nmap/bin/nmap: error while loading shared libraries: libsvn_client-1.so.0: cannot open shared object file: No such file or directory |
Hmm – but why?
When i tried to run this file manually from OS, i saw same error…
[root@oem12c nmap]# /u01/agent12c/agent_inst/discovery/nmap/bin/nmap /u01/agent12c/agent_inst/discovery/nmap/bin/nmap: error while loading shared libraries: libsvn_client-1.so.0: cannot open shared object file: No such file or directory
Reason is simple – i don’t used nmap during last agent update – this is a new version without dependencies met.
004. REPAIRING
I have RHEL5, so i downloaded needed library (as a part of “subversion-1.6.6-1.el5.rfx.x86_64.rpm”) and installed it.
[root@oem12c instalki]# yum localinstall subversion-1.6.6-1.el5.rfx.x86_64.rpm --nogpgcheck
Loaded plugins: katello, product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Local Package Process
Examining subversion-1.6.6-1.el5.rfx.x86_64.rpm: subversion-1.6.6-1.el5.rfx.x86_64
Marking subversion-1.6.6-1.el5.rfx.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package subversion.x86_64 0:1.6.6-1.el5.rfx set to be updated
--> Processing Dependency: libapr-1.so.0()(64bit) for package: subversion
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: subversion
--> Running transaction check
---> Package apr.x86_64 0:1.2.7-11.el5_6.5 set to be updated
---> Package apr-util.x86_64 0:1.2.7-11.el5_5.2 set to be updated
--> Processing Dependency: libpq.so.4()(64bit) for package: apr-util
--> Running transaction check
---> Package postgresql-libs.x86_64 0:8.1.23-1.el5_7.3 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================================================
Installing:
subversion x86_64 1.6.6-1.el5.rfx /subversion-1.6.6-1.el5.rfx.x86_64 24 M
Installing for dependencies:
apr x86_64 1.2.7-11.el5_6.5 RHEL-5.8 120 k
apr-util x86_64 1.2.7-11.el5_5.2 RHEL-5.8 79 k
postgresql-libs x86_64 8.1.23-1.el5_7.3 RHEL-5.8 197 k
Transaction Summary
=========================================================================================================================================================
Install 4 Package(s)
Upgrade 0 Package(s)
Total size: 24 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : apr 1/4
Installing : postgresql-libs 2/4
Installing : apr-util 3/4
Installing : subversion 4/4
Installed products updated.
Installed:
subversion.x86_64 0:1.6.6-1.el5.rfx
Dependency Installed:
apr.x86_64 0:1.2.7-11.el5_6.5 apr-util.x86_64 0:1.2.7-11.el5_5.2 postgresql-libs.x86_64 0:8.1.23-1.el5_7.3
Complete!
Next i tried to run nmap.
Now – works without problem…
[root@oem12c instalki]# /u01/agent12c/agent_inst/discovery/nmap/bin/nmap
Nmap 6.40 ( http://nmap.org )
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION:
Can pass hostnames, IP addresses, networks, etc.
Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254
-iL <inputfilename>: Input from list of hosts/networks
-iR <num hosts>: Choose random targets
--exclude <host1[,host2][,host3],...>: Exclude hosts/networks
--excludefile <exclude_file>: Exclude list from file
(...)
Same in oem12c – after this nmap scan has been done without problems.
005. CONCLUSION
Repairing is simple and fast. It’s just a OS problem with needed libraries .
PS. If You have this library in other path, try to make link to it:
ln -n file_location_path destination_path
like:
ln -s /usr/lib/libsvn_client-1.so.1 libsvn_client-1.so.0
.