NRPE Problem....CentOS 6/Solaris 10

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

NRPE Problem....CentOS 6/Solaris 10

Postby _JPL_ » Tue Sep 27, 2011 11:11 am

I've had a debian based nagios install working for sometime with nrpe 2.12 checking Solaris 10 servers. Both I believe were compiled against openssl0.9.8. Recently I am having to move the nagios monitoring to its own stand-alone server and now, naturally, I am getting the dreaded "CHECK_NRPE: Error - Could not complete SSL handshake.". Man, what a pain that is. I've tried recompiling the daemon on Solaris 10 against openssl1.0.0 headers and libraries as that is what CentOS 6 uses but I get a major fail compiling with an error that says
"/usr/local/ssl/include/openssl/ssl.h:1193:46: openssl/dtls1.h: No such file or directory" but that header is there and then tons more errors after that I am hoping are just related to the not found error.

I've read all the docs on Solaris and nrpe previously as I had to in order to get it working in the first place. Does anyone have this working on Solaris 10 as the daemon and CentOS 6 as the checker? If I can find headers for openssl0.9.8 for CentOS 6 and recompile check_nrpe against those headers do you think it will work without recompiling the daemon on Solaris?

Output (Shortened to fit) of make on Solaris when trying to build nrpe:

Code: Select all
cd ./src/; make ; cd ..
gcc -g -O2 -I/usr/local/ssl/include/openssl -I/usr/include/kerberosv5/ -DHAVE_CONFIG_H -o nrpe nrpe.c utils.c -L/usr/local/ssl/lib  -lssl -lcrypto -lnsl -lsocket   
In file included from ../include/config.h:238,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/local/ssl/include/openssl/rsa.h:90: error: syntax error before "RSA"
/usr/local/ssl/include/openssl/rsa.h:93: error: syntax error before "RSA"
/usr/local/ssl/include/openssl/rsa.h:96: error: syntax error before "RSA"
.
.
.
/usr/local/ssl/include/openssl/rsa.h:389: warning: data definition has no type or storage class
In file included from ../include/config.h:240,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/local/ssl/include/openssl/dh.h:101: error: syntax error before '*' token
.
.
.
/usr/local/ssl/include/openssl/dh.h:204: error: syntax error before '*' token
In file included from /usr/sfw/include/openssl/evp.h:141,
                 from /usr/local/ssl/include/openssl/pem.h:69,
                 from ../include/config.h:241,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/sfw/include/openssl/dsa.h:220: error: syntax error before '*' token
In file included from /usr/local/ssl/include/openssl/pem.h:70,
                 from ../include/config.h:241,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/sfw/include/openssl/x509.h:747: error: syntax error before '*' token
/usr/sfw/include/openssl/x509.h:747: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:748: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:749: error: syntax error before '*' token
/usr/sfw/include/openssl/x509.h:749: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:750: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:751: error: syntax error before '*' token
/usr/sfw/include/openssl/x509.h:751: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:752: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:780: error: syntax error before '*' token
/usr/sfw/include/openssl/x509.h:780: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:781: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:782: error: syntax error before '*' token
/usr/sfw/include/openssl/x509.h:782: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:783: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:784: error: syntax error before '*' token
/usr/sfw/include/openssl/x509.h:784: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:785: error: syntax error before "RSA"
/usr/sfw/include/openssl/x509.h:844: error: syntax error before '*' token
/usr/sfw/include/openssl/x509.h:845: error: syntax error before '*' token
/usr/sfw/include/openssl/x509.h:845: error: syntax error before '*' token
In file included from ../include/config.h:241,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/local/ssl/include/openssl/pem.h:417: error: syntax error before '*' token
/usr/local/ssl/include/openssl/pem.h:419: error: syntax error before '*' token
.
.
.
/usr/local/ssl/include/openssl/pem.h:505: warning: data definition has no type or storage class
/usr/local/ssl/include/openssl/pem.h:505: error: syntax error before '*' token
/usr/local/ssl/include/openssl/pem.h:505: error: syntax error before '*' token
In file included from ../include/config.h:242,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/local/ssl/include/openssl/ssl.h:382: error: syntax error before '*' token
.
.
.
/usr/local/ssl/include/openssl/ssl.h:1179: warning: data definition has no type or storage class
/usr/local/ssl/include/openssl/ssl.h:1184: error: syntax error before '}' token
In file included from /usr/local/ssl/include/openssl/ssl.h:1191,
                 from ../include/config.h:242,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/sfw/include/openssl/ssl3.h:398: error: syntax error before "DH"
/usr/sfw/include/openssl/ssl3.h:424: error: syntax error before '}' token
/usr/sfw/include/openssl/ssl3.h:432: error: syntax error before '}' token
In file included from ../include/config.h:242,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/local/ssl/include/openssl/ssl.h:1193:46: openssl/dtls1.h: No such file or directory
In file included from ../include/config.h:242,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/local/ssl/include/openssl/ssl.h:1255: error: syntax error before '*' token
.
.
.
/usr/local/ssl/include/openssl/ssl.h:1807: error: syntax error before '*' token
In file included from ../include/config.h:243,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/local/ssl/include/openssl/err.h:150: error: syntax error before "CRYPTO_THREADID"
/usr/local/ssl/include/openssl/err.h:150: warning: no semicolon at end of struct or union
.
.
.
/usr/local/ssl/include/openssl/err.h:376: warning: data definition has no type or storage class
/usr/local/ssl/include/openssl/err.h:379: error: syntax error before '*' token
In file included from ../include/config.h:244,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/local/ssl/include/openssl/rand.h:95: error: syntax error before '*' token
/usr/local/ssl/include/openssl/rand.h:96: error: syntax error before '*' token
/usr/local/ssl/include/openssl/rand.h:96: warning: data definition has no type or storage class
/usr/local/ssl/include/openssl/rand.h:100: error: syntax error before '*' token
/usr/local/ssl/include/openssl/rand.h:100: warning: data definition has no type or storage class
In file included from nrpe.c:21:
../include/common.h:71: error: 'packet' redeclared as different kind of symbol
/usr/local/ssl/include/openssl/ssl.h:1026: error: previous declaration of 'packet' was here
In file included from nrpe.c:27:
../include/dh.h:4: error: syntax error before '*' token
../include/dh.h: In function `get_dh512':
../include/dh.h:17: error: `DH' undeclared (first use in this function)
../include/dh.h:17: error: (Each undeclared identifier is reported only once
../include/dh.h:17: error: for each function it appears in.)
../include/dh.h:17: error: `dh' undeclared (first use in this function)
nrpe.c: At top level:
nrpe.c:36: error: syntax error before '*' token
nrpe.c:36: warning: data definition has no type or storage class
nrpe.c:37: error: syntax error before '*' token
nrpe.c:37: warning: data definition has no type or storage class
nrpe.c: In function `main':
nrpe.c:91: error: `DH' undeclared (first use in this function)
nrpe.c:91: error: `dh' undeclared (first use in this function)
nrpe.c: In function `handle_connection':
nrpe.c:1037: error: `SSL' undeclared (first use in this function)
nrpe.c:1037: error: `ssl' undeclared (first use in this function)
In file included from ../include/config.h:238,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/local/ssl/include/openssl/rsa.h:90: error: syntax error before "RSA"
.
.
.
/usr/local/ssl/include/openssl/rsa.h:389: error: syntax error before '*' token
/usr/local/ssl/include/openssl/rsa.h:389: warning: data definition has no type or storage class
In file included from ../include/config.h:240,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/local/ssl/include/openssl/dh.h:101: error: syntax error before '*' token
.
.
.
/usr/local/ssl/include/openssl/dh.h:204: error: syntax error before '*' token
In file included from /usr/sfw/include/openssl/evp.h:141,
                 from /usr/local/ssl/include/openssl/pem.h:69,
                 from ../include/config.h:241,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/sfw/include/openssl/dsa.h:220: error: syntax error before '*' token
In file included from /usr/local/ssl/include/openssl/pem.h:70,
                 from ../include/config.h:241,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/sfw/include/openssl/x509.h:747: error: syntax error before '*' token
/usr/sfw/include/openssl/x509.h:747: error: syntax error before "RSA"
.
.
.
/usr/sfw/include/openssl/x509.h:845: error: syntax error before '*' token
In file included from ../include/config.h:241,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/local/ssl/include/openssl/pem.h:417: error: syntax error before '*' token
.
.
.
/usr/local/ssl/include/openssl/pem.h:505: error: syntax error before "DH"
/usr/local/ssl/include/openssl/pem.h:505: warning: data definition has no type or storage class
/usr/local/ssl/include/openssl/pem.h:505: error: syntax error before '*' token
/usr/local/ssl/include/openssl/pem.h:505: error: syntax error before '*' token
In file included from ../include/config.h:242,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/local/ssl/include/openssl/ssl.h:382: error: syntax error before '*' token
/usr/local/ssl/include/openssl/ssl.h:383: error: syntax error before '*' token
.
.
.
/usr/local/ssl/include/openssl/ssl.h:1179: warning: data definition has no type or storage class
/usr/local/ssl/include/openssl/ssl.h:1184: error: syntax error before '}' token
In file included from /usr/local/ssl/include/openssl/ssl.h:1191,
                 from ../include/config.h:242,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/sfw/include/openssl/ssl3.h:398: error: syntax error before "DH"
/usr/sfw/include/openssl/ssl3.h:424: error: syntax error before '}' token
/usr/sfw/include/openssl/ssl3.h:432: error: syntax error before '}' token
In file included from ../include/config.h:242,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/local/ssl/include/openssl/ssl.h:1193:46: openssl/dtls1.h: No such file or directory
In file included from ../include/config.h:242,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/local/ssl/include/openssl/ssl.h:1255: error: syntax error before '*' token
.
.
.
/usr/local/ssl/include/openssl/ssl.h:1801: error: syntax error before '*' token
/usr/local/ssl/include/openssl/ssl.h:1803: error: syntax error before '*' token
/usr/local/ssl/include/openssl/ssl.h:1807: error: syntax error before '*' token
In file included from ../include/config.h:243,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/local/ssl/include/openssl/err.h:150: error: syntax error before "CRYPTO_THREADID"
.
.
.
/usr/local/ssl/include/openssl/err.h:379: error: syntax error before '*' token
In file included from ../include/config.h:244,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/local/ssl/include/openssl/rand.h:95: error: syntax error before '*' token
/usr/local/ssl/include/openssl/rand.h:96: error: syntax error before '*' token
/usr/local/ssl/include/openssl/rand.h:96: warning: data definition has no type or storage class
/usr/local/ssl/include/openssl/rand.h:100: error: syntax error before '*' token
/usr/local/ssl/include/openssl/rand.h:100: warning: data definition has no type or storage class
In file included from utils.c:32:
../include/common.h:71: error: 'packet' redeclared as different kind of symbol
/usr/local/ssl/include/openssl/ssl.h:1026: error: previous declaration of 'packet' was here
*** Error code 1
make: Fatal error: Command failed for target `nrpe'
Current working directory /export/home/laflammj/nrpe-2.12/src
*** Error code 1
make: Fatal error: Command failed for target `all'


I resolved most of the above by adding -I/usr/local/ssl/include to src/Makefile for nrpe but now my compile does the following:
Code: Select all
bash-3.00# make
cd ./src/; make ; cd ..
gcc -g -fPIC -Wall -O2 -I/usr/local/ssl/include -I/usr/local/ssl/include/openssl -I/usr/include/kerberosv5 -DHAVE_CONFIG_H -o nrpe nrpe.c utils.c -L/usr/local/ssl/lib  -lssl -lcrypto -lnsl -lsocket
In file included from ../include/config.h:249,
                 from ../include/common.h:24,
                 from nrpe.c:21:
/usr/include/kerberosv5/krb5.h:11: warning: ignoring #pragma ident
nrpe.c: In function `main':
nrpe.c:97: warning: implicit declaration of function `asprintf'
nrpe.c:211: warning: assignment discards qualifiers from pointer target type
nrpe.c: In function `wait_for_connections':
nrpe.c:701: warning: 'new_sd' might be used uninitialized in this function
In file included from ../include/config.h:249,
                 from ../include/common.h:24,
                 from utils.c:32:
/usr/include/kerberosv5/krb5.h:11: warning: ignoring #pragma ident
collect2: ld terminated with signal 8 [Arithmetic Exception], core dumped
ld: warning: global symbol '_END_' has non-global binding:
        (file /usr/local/ssl/lib/libssl.so value=LOCL);
ld: warning: global symbol '_START_' has non-global binding:
        (file /usr/local/ssl/lib/libssl.so value=LOCL);
*** Error code 1
make: Fatal error: Command failed for target `nrpe'
Current working directory /export/home/[EDITED]/nrpe-2.12/src
*** Error code 1
make: Fatal error: Command failed for target `all'
_JPL_
 
Posts: 1
Joined: Tue Sep 27, 2011 10:50 am

Return to Community Support

Who is online

Users browsing this forum: ckato, Google [Bot] and 32 guests