HP-UX 11.31 NRPE comile issue- SSL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
djjosephk
Posts: 16
Joined: Mon Aug 17, 2015 2:20 pm

HP-UX 11.31 NRPE comile issue- SSL

Post by djjosephk »

I'm attempting to compile NRPE for an HP ia64 box and am some issues. I've downloaded a zip from the below address and have uncompressed it.

Code: Select all

https://github.com/NagiosEnterprises/nrpe
I've executed

Code: Select all

./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/opt/openssl/lib/hpux64  --enable-command-args
and have received cannot find ssl libraries error (see below)

Code: Select all

checking for a BSD-compatible install... ./install-sh -c
checking build system type... ia64-hp-hpux11.31
checking host system type... ia64-hp-hpux11.31
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking getopt.h usability... no
checking getopt.h presence... no
checking for getopt.h... no
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdint.h... (cached) yes
checking for strings.h... (cached) yes
checking for string.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking tcpd.h usability... yes
checking tcpd.h presence... yes
checking for tcpd.h... yes
checking for unistd.h... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for sys/wait.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for int... yes
checking size of int... 4
checking for short... yes
checking size of short... 2
checking for long... yes
checking size of long... 4
checking for uint32_t... yes
checking for u_int32_t... no
checking for int32_t... yes
checking for va_copy... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for asprintf... no
checking for vasprintf... no
checking for C99 vsnprintf... no
checking for getopt_long... no
checking for getopt_long in -liberty... yes
checking for main in -lnsl... yes
checking for socket in -lsocket... no
checking for main in -lwrap... yes
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for closesocket... no
checking for socklen_t... yes
checking for type of socket size... size_t
checking for SSL headers... SSL headers found in /usr
checking for SSL libraries... configure: error: Cannot find ssl libraries
I have verified that SSL libs are in /opt/openssl/lib/hpux64

Code: Select all

# ls /opt/openssl/lib/hpux64
engines             libcrypto.0.9.8g.a  libcrypto.so        libcrypto.so.1      libssl.0.9.8g.a     libssl.so           libssl.so.1
libcrypto.0.9.7m.a  libcrypto.a         libcrypto.so.0      libssl.0.9.7m.a     libssl.a            libssl.so.0         pkgconfig
I've attached the config.log for review.

Does anyone have any suggestions?
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: HP-UX 11.31 NRPE comile issue- SSL

Post by jdalrymple »

I only have just my feet damp in HP-UX so I'm mostly ignorant. Namely I don't know why libs would end in sl instead of so.

That does appear to be what the configure script is looking for though.

Code: Select all

                        elif test "`uname -s`" = "HP-UX" ; then
                                soext="sl"
                        else
                                soext="so"
                        fi
                        if test -f "$dir/libssl.$soext"; then
                                found_ssl=yes
                                break
                        fi
Any idea why that would be?
djjosephk
Posts: 16
Joined: Mon Aug 17, 2015 2:20 pm

Re: HP-UX 11.31 NRPE compile issue- SSL

Post by djjosephk »

Frankly, this is the first and only HP-UX system I've ever had to deal with.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: HP-UX 11.31 NRPE comile issue- SSL

Post by jdalrymple »

http://stackoverflow.com/questions/1691 ... so-on-hpux

You could try to replace that 'sl' with 'so' (in the configure script) and see what kind of magic happens. I wouldn't get my hopes up :)
djjosephk
Posts: 16
Joined: Mon Aug 17, 2015 2:20 pm

Re: HP-UX 11.31 NRPE comile issue- SSL

Post by djjosephk »

I did and ultimately got it to work but I had to hack the nrpe.c file and define rfc931_timeout variable because libwrap is broken on HP-UX 11.31. I used this as reference
https://cyruspy.wordpress.com/2010/05/1 ... x-11-31-2/

I also got word from HP that .sl is the PARISC nomenclature. For ia64 it is .so
http://h30499.www3.hp.com/t5/Languages- ... lse#M47722

Turning into a fight to the finish...
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: HP-UX 11.31 NRPE comile issue- SSL

Post by jdalrymple »

Thanks for the legwork on this. I have no doubt this could potentially become a top reference thread for future users.

Are we good, installed, daemonized and running checks? Or are we just at the homestretch?
djjosephk
Posts: 16
Joined: Mon Aug 17, 2015 2:20 pm

Re: HP-UX 11.31 NRPE comile issue- SSL

Post by djjosephk »

We are installed and running checks as of now. I had some issues building the plugins and I will share for completeness.

I had some issues with the version of m4 I was running but after I got that sorted I kept getting the below error when attempting the make.

Code: Select all

ld: Unsatisfied symbol "strcasestr" in file check_http.o
1 errors.
collect2: ld returned 1 exit status
*** Error exit code 1
It would seem that the GCC/binutils build that I have doesn't support the non-standard strcasestr extension (http://linux.die.net/man/3/strcasestr). So I went in and replaced the strcasestr with strstr in the locate string subroutine in plugins/check_http.c ran make clean/make/make install and it worked. I don't have a http check set up yet but if I execute it at the cli it seems to be running as designed

Code: Select all

 ./check_http
check_http: Could not parse arguments
Usage:
 check_http -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]
       [-J <client certificate file>] [-K <private key>]
       [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-E] [-a auth]
       [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]
       [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]
       [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]
       [-A string] [-k string] [-S <version>] [--sni] [-C <warn_age>[,<crit_age>]]
       [-T <content-type>] [-j method]
The basic service/disk checks I have set up right now are running perfectly.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: HP-UX 11.31 NRPE comile issue- SSL

Post by jdalrymple »

Again - thanks a million for sharing your findings. Hopefully this can be of use to future community members undertaking the same tasks.
Locked