Tuesday, 1 May 2012

Solaris/SunOS - xymond_client: fatal: libpcre.so.0: open failed: No such file or directory Killed

libpcre.so.0: open failed: No such file or directory Killed
This is an error which appeared in the logs during runtime of a client installation of some system monitoring software called Xymon.
The problem is that during runtime, the pcre shared object files cannot be located. This can be because we haven't installed the libraries, or we didn't link them properly when building from source.
The same solution may apply to any other software that relies on the pcre libraries.


Here are the steps to resolve the problem...

1. Ensure you have CSWpcre installed... You can do this using pkgutil
Code Snippet
  1. pkgutil -i pcre
End of Code Snippet

Check that the pcre shared objects and includes can be found in the csw directory..

/opt/csw/lib
/opt/csw/include


2. Navigate to the Xymon build directory and open the Solaris/SunOS Makefile...
Code Snippet
  1. vi Makefile.SunOS
End of Code Snippet


3. Add a reference to pcre to the linker..

REPLACE
NETLIBS = -lresolv -lsocket -lnsl
WITH
NETLIBS = -lresolv -lsocket -lnsl -lpcre


4. Use GNU make to make a new Xymon binary...

Code Snippet
  1. make -s
End of Code Snippet


Troubleshooting Xymon Client Connectivity
Logs are your friend! These are located in the Xymon log's directory.. (/xymon/client/logs)


Sending a test query to the Xymon server
Code Snippet
  1. /xymon/client/bin/xymon --debug XYMONSERVERIPADDRESS "query XYMONSERVERIPADDRESS conn"
End of Code Snippet

Troubleshooting client connection using the web server interface
You can view all client machine activity with Xymon server (even if the machine is not configured in hosts.cfg) by viewing Ghost Clients (http://XYMONSERVER/xymon-cgi/ghostlist.sh)... This may help you identify why some servers aren't showing up.

No comments: