Installing NRPE into AIX 7.1

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kitkit
Posts: 2
Joined: Thu Dec 22, 2016 9:34 pm

Installing NRPE into AIX 7.1

Post by kitkit »

We successfully installed NAGIOS and NRPE from source on Linux platform and is running smooth. But when doing so on AIX 7.1 and hit some issues.

First there are reports of type issues during compilation using XLC.

Code: Select all

$ make all
        cd ./src/; make
        /opt/IBM/xlC/13.1.2/bin/xlc -g -I/usr/include/openssl -DHAVE_CONFIG_H -I ../include -I ./../include -c ./snprintf.c
        /opt/IBM/xlC/13.1.2/bin/xlc -g -I/usr/include/openssl -DHAVE_CONFIG_H -I ../include -I ./../include -o nrpe ./nrpe.c ./utils.c ./acl.c -L/usr/lib  -lssl -lcrypto -lnsl  ./snprintf.o 
./nrpe.c:
"./nrpe.c", line 261.14: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./nrpe.c", line 283.22: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./nrpe.c", line 287.22: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./nrpe.c", line 290.22: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./nrpe.c", line 293.22: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./nrpe.c", line 296.22: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./nrpe.c", line 1777.19: 1506-068 (W) Operation between types "struct ssl_cipher_st*" and "const struct ssl_cipher_st*" is not allowed.
./utils.c:
./acl.c:
        /opt/IBM/xlC/13.1.2/bin/xlc -g -I/usr/include/openssl -DHAVE_CONFIG_H -I ../include -I ./../include -o check_nrpe ./check_nrpe.c ./utils.c -L/usr/lib  -lssl -lcrypto -lnsl ./snprintf.o 
./check_nrpe.c:
"./check_nrpe.c", line 780.22: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./check_nrpe.c", line 784.30: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./check_nrpe.c", line 788.30: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./check_nrpe.c", line 791.30: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./check_nrpe.c", line 794.30: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./check_nrpe.c", line 797.30: 1506-068 (W) Operation between types "struct ssl_method_st*" and "const struct ssl_method_st*" is not allowed.
"./check_nrpe.c", line 968.39: 1506-196 (W) Initialization between types "struct ssl_cipher_st*" and "const struct ssl_cipher_st*" is not allowed.
./utils.c:
Target "all" is up to date.

*** Compile finished ***

You can now continue with the installation or upgrade process.

Read the PDF documentation (NRPE.pdf) for information on the next
steps you should take to complete the installation or upgrade.
We edit the code to change the type into const struct SSL_METHOD and const struct SSL_CIPHER and the build was success.

But when we tried to use check_nrpe (no matter on AIX 7.1 or the Linux one) to communicate with the NRPE, here comes the errors.

Code: Select all

$ ./check_nrpe -H 127.0.0.1
CHECK_NRPE: Error - Could not complete SSL handshake with 127.0.0.1: 1
$ ./check_nrpe -H 127.0.0.1 -n
CHECK_NRPE: Invalid packet version received from server.
$ ./check_nrpe -H 127.0.0.1 -n -2
CHECK_NRPE: Invalid packet version received from server.
$ ./check_nrpe -H 127.0.0.1 -2 
CHECK_NRPE: Error - Could not complete SSL handshake with 127.0.0.1: 1
Do anyone have any hints on how to solve this issue? Thanks.
Attachments
nrpe_aix71.zip
Some logs during installation
(20.24 KiB) Downloaded 146 times
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Installing NRPE into AIX 7.1

Post by dwhitfield »

Page 3 of https://assets.nagios.com/downloads/nag ... utions.pdf has the basics for the ssl issue.

As far as the compile issues, I know people in the past have found https://www.techwalla.com/articles/how- ... rpe-on-aix useful.

Please let us know if you are still having issues after running through both of those documents.
kitkit
Posts: 2
Joined: Thu Dec 22, 2016 9:34 pm

Re: Installing NRPE into AIX 7.1

Post by kitkit »

dwhitfield wrote:Page 3 of https://assets.nagios.com/downloads/nag ... utions.pdf has the basics for the ssl issue.

As far as the compile issues, I know people in the past have found https://www.techwalla.com/articles/how- ... rpe-on-aix useful.

Please let us know if you are still having issues after running through both of those documents.
Thank you for replying.

For the first link,
  • I double-checked 127.0.0.1 and my monitoring server are included at allowed_hosts
  • I could not find "only_from" or similar option for inetd.
  • Recompiled with "--enable-ssl" flag and nothing changed.
For the second link, I visited it before. It was using per-built binary (and it was a old one). I extracted nrpe binary from one rpm and get the same errors.

Other than using pre-built binary, I did try to install tcp-wrapper RPMs and build the NRPE with it but the source code have compilation errors.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Installing NRPE into AIX 7.1

Post by dwhitfield »

We don't have an AIX box to test against, but it looks like you will need the following prereqs:
fping
gawk
net-snmp
net-snmp-perl
net-snmp-utils
openldap
openssl
python
libldap.a
That seems like a weird set of dependencies to me, but that's what they used in https://support.nagios.com/forum/viewto ... 79&p=42713
Locked