Problems With NRDP Clients - Windows and Mac

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Problems With NRDP Clients - Windows and Mac

Post by tgriep »

One thought I have is the remote client is checking in and there is an update but the following error it causing the update to not happen.

Code: Select all

2017-03-01 09:56:53,512 - NRDS - INFO - invoking NRDS Taylor
2017-03-01 09:56:53,512 - NRDS - DEBUG - entering debug mode
2017-03-01 09:56:53,512 - NRDS - DEBUG - remove silent install arguments
2017-03-01 09:56:53,512 - NRDS - DEBUG - working file =/usr/local/nrdp/win_clients/tmp/NRDS_Win_64.nsi
sh: /usr/local/nsis/bin/makensis: No such file or directory
Can you check this folder

Code: Select all

/usr/local/nsis/bin/
and verify the file is there and is executible by user, group and other?
Be sure to check out our Knowledgebase for helpful articles and solutions!
TCN-Link
Posts: 30
Joined: Tue Dec 13, 2016 2:05 pm

Re: Problems With NRDP Clients - Windows and Mac

Post by TCN-Link »

I've checked. The bin folder doesn't exist. Here's what I have instead:

Code: Select all

[centos@ip-172-31-18-160 Win]$ cd /usr/local/nsis/
[centos@ip-172-31-18-160 nsis]$ ls
share
[centos@ip-172-31-18-160 nsis]$ cd share/
[centos@ip-172-31-18-160 share]$ ls
nsis
[centos@ip-172-31-18-160 share]$ cd nsis/
[centos@ip-172-31-18-160 nsis]$ ls
Contrib  Docs      Include       makensisw.exe  NSIS.chm      NSIS.exe  Stubs
COPYING  Examples  makensis.exe  Menu           nsisconf.nsh  Plugins
[centos@ip-172-31-18-160 nsis]$
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Problems With NRDP Clients - Windows and Mac

Post by tgriep »

You may want to re-install the NRDS server component so it will re-install the missing makensis file.
If you can, make a full backup of the server in case you need to go back.
On the Nagios XI server, go to this folder

Code: Select all

/usr/local/nagiosxi/html/includes/components/nrdsconfigmanager
If you see a file called installed.nrds in that folder, delete it.
Then run the install script by running

Code: Select all

./install.sh
Then check to see if the /usr/local/nsis/bin/makensis file exists.
If so, see if the remote systems start to function normally by downloading the configs, checking in, etc...
Be sure to check out our Knowledgebase for helpful articles and solutions!
TCN-Link
Posts: 30
Joined: Tue Dec 13, 2016 2:05 pm

Re: Problems With NRDP Clients - Windows and Mac

Post by TCN-Link »

Thank you. I did as you instructed, @tgrlep, and waited for an hour and a half. No updating, no bin folder still. The only folder in /usr/local/nsis/ is share/nsis/, and within there appears to be some items meant for Windows. The installation script didn't create the directory. I ran the script under sudo -i; I couldn't access the directory otherwise.

I'm running Nagios XI 5.4.2 on the server right now. Should I try and reinstall it from another source? Is there a more updated version of NRDS for the server which I need?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Problems With NRDP Clients - Windows and Mac

Post by tgriep »

Did you receive any errors when you ran the ./install.sh scripts?
It should only take a few minutes at the most to download and install that component so the system will need to be able to connect to the internet while the script is running.
Running the install.sh should download the required components and any updates so it should be the latest version that is installed on the XI server.

You can login to the server and then switch to the root account by running the following.

Code: Select all

su -
That should elevate you to the root account but you may have to know the password.
Then try and run the script and post ant errors.
Be sure to check out our Knowledgebase for helpful articles and solutions!
TCN-Link
Posts: 30
Joined: Tue Dec 13, 2016 2:05 pm

Re: Problems With NRDP Clients - Windows and Mac

Post by TCN-Link »

Here is what happened when I ran install.sh:

Code: Select all

[root@ip-172-31-18-160 nrdsconfigmanager]# ./install.sh
--2017-03-06 06:40:14--  https://assets.nagios.com/downloads/nrdp/nrds-1.2.4.tar.gz
Resolving assets.nagios.com (assets.nagios.com)... 72.14.181.71, 2600:3c00::f03c:91ff:fedf:b821
Connecting to assets.nagios.com (assets.nagios.com)|72.14.181.71|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19769298 (19M) [application/x-gzip]
Saving to: ‘nrds-1.2.4.tar.gz’

100%[==============================================================================>] 19,769,298  11.8MB/s   in 1.6s

2017-03-06 06:40:16 (11.8 MB/s) - ‘nrds-1.2.4.tar.gz’ saved [19769298/19769298]

--2017-03-06 06:40:16--  https://assets.nagios.com/downloads/nsis/nsis_0_1_1.tar.gz
Resolving assets.nagios.com (assets.nagios.com)... 72.14.181.71, 2600:3c00::f03c:91ff:fedf:b821
Connecting to assets.nagios.com (assets.nagios.com)|72.14.181.71|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6124270 (5.8M) [application/x-gzip]
Saving to: ‘nsis_0_1_1.tar.gz’

100%[==============================================================================>] 6,124,270   11.6MB/s   in 0.5s

2017-03-06 06:40:17 (11.6 MB/s) - ‘nsis_0_1_1.tar.gz’ saved [6124270/6124270]


    ##################################
    #
    # Adding NRDS to NRDP Server
    #
    ##################################

copying files...
Updating permissions...
updating NRDP server config...

    ##################################
    #
    # NRDS update complete.
    # You will also want to install the NRDS Config Manager
    # component if you have not done so already.
    #
    ##################################

/usr/local/nsis
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.advancedhosters.com
 * epel: mirror.cogentco.com
 * extras: mirror.cc.columbia.edu
 * updates: mirrors.advancedhosters.com
Package scons-2.5.1-1.el7.noarch already installed and latest version
Package gcc-c++-4.8.5-11.el7.x86_64 already installed and latest version
Nothing to do
patching file SCons/Config/gnu
patching file Source/DialogTemplate.cpp
patching file Source/Platform.h
patching file Source/Plugins.cpp
patching file Source/ResourceEditor.cpp
patching file Source/ResourceEditor.h
patching file Source/ResourceVersionInfo.cpp
patching file Source/fileform.cpp
patching file Source/mmap.cpp
patching file Source/script.cpp
patching file Source/util.cpp
scons: Reading SConscript files ...
Mkdir("build/release/config")
Delete("nsis-06-Mar-2017.cvs")
Delete(".instdist")
Delete(".test")
Using GNU tools configuration
Checking for linker flag $MAP_FLAG... yes
Checking for linker flag -s... yes
Checking for linker flag $MAP_FLAG... yes
Checking for linker flag -s... yes
Checking for memcpy requirement... no
Checking for memset requirement... no
Checking for linker flag -pthread... yes
Checking for __BIG_ENDIAN__... no

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 459, in <module>
Checking for C library gdi32... no
Checking for C library user32... no
Checking for C library pthread... yes
Checking for C library iconv... no

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 543, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 615, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 630, in <module>

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/tmp/nsis/nsis-2.46-src/SConstruct", line 674, in <module>
Checking for C library dl... yes
Checking for C library gdi32... no
Checking for C library iconv... no
Checking for C library pthread... yes
Checking for C library user32... no
Checking for C++ library cppunit... no
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/release/makensis/build.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/build.cpp
In file included from Source/writer.h:22:0,
                 from Source/fileform.h:21,
                 from Source/build.cpp:25:
Source/crc32.h:27:79: warning: '__stdcall__' attribute ignored [-Wattributes]
 crc32_t NSISCALL CRC32(crc32_t crc, const unsigned char *buf, unsigned int len);
                                                                               ^
In file included from Source/build.cpp:31:0:
Source/exehead/api.h:66:47: warning: '__stdcall__' attribute ignored [-Wattributes]
   int (NSISCALL *ExecuteCodeSegment)(int, HWND);
                                               ^
Source/exehead/api.h:67:44: warning: '__stdcall__' attribute ignored [-Wattributes]
   void (NSISCALL *validate_filename)(char *);
                                            ^
Source/exehead/api.h:68:69: warning: '__stdcall__' attribute ignored [-Wattributes]
   int (NSISCALL *RegisterPluginCallback)(HMODULE, NSISPLUGINCALLBACK); // returns 0 on success, 1 if already registered and < 0 on errors
                                                                     ^
Source/build.cpp: In member function 'int CEXEBuild::ProcessPages()':
Source/build.cpp:1716:14: warning: variable 'dir_used' set but not used [-Wunused-but-set-variable]
   int dir=0, dir_used;
              ^
g++ -o build/release/makensis/clzma.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/clzma.cpp
gcc -o build/release/makensis/crc32.o -c -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/crc32.c
In file included from Source/crc32.c:18:0:
Source/crc32.h:27:1: warning: '__stdcall__' attribute ignored [-Wattributes]
 crc32_t NSISCALL CRC32(crc32_t crc, const unsigned char *buf, unsigned int len);
 ^
Source/crc32.c:24:1: warning: '__stdcall__' attribute ignored [-Wattributes]
 {
 ^
g++ -o build/release/makensis/DialogTemplate.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/DialogTemplate.cpp
g++ -o build/release/makensis/dirreader.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/dirreader.cpp
g++ -o build/release/makensis/fileform.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/fileform.cpp
In file included from Source/writer.h:22:0,
                 from Source/fileform.h:21,
                 from Source/fileform.cpp:17:
Source/crc32.h:27:79: warning: '__stdcall__' attribute ignored [-Wattributes]
 crc32_t NSISCALL CRC32(crc32_t crc, const unsigned char *buf, unsigned int len);
                                                                               ^
g++ -o build/release/makensis/growbuf.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/growbuf.cpp
g++ -o build/release/makensis/icon.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/icon.cpp
g++ -o build/release/makensis/lang.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/lang.cpp
Source/lang.cpp: In member function 'int CEXEBuild::GenerateLangTable(LanguageTable*, int)':
Source/lang.cpp:592:19: warning: variable 'index' set but not used [-Wunused-but-set-variable]
               int index;
                   ^
g++ -o build/release/makensis/lineparse.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/lineparse.cpp
g++ -o build/release/makensis/makenssi.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/makenssi.cpp
g++ -o build/release/makensis/manifest.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/manifest.cpp
g++ -o build/release/makensis/mmap.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/mmap.cpp
g++ -o build/release/makensis/Plugins.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/Plugins.cpp
g++ -o build/release/makensis/ResourceEditor.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/ResourceEditor.cpp
g++ -o build/release/makensis/ResourceVersionInfo.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/ResourceVersionInfo.cpp
g++ -o build/release/makensis/script.o -c -Wno-non-virtual-dtor -Wall -O2 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/script.cpp
In file included from Source/script.cpp:30:0:
Source/exehead/api.h:66:47: warning: '__stdcall__' attribute ignored [-Wattributes]
   int (NSISCALL *ExecuteCodeSegment)(int, HWND);
                                               ^
Source/exehead/api.h:67:44: warning: '__stdcall__' attribute ignored [-Wattributes]
   void (NSISCALL *validate_filename)(char *);
                                            ^
Source/exehead/api.h:68:69: warning: '__stdcall__' attribute ignored [-Wattributes]
   int (NSISCALL *RegisterPluginCallback)(HMODULE, NSISPLUGINCALLBACK); // returns 0 on success, 1 if already registered and < 0 on errors
                                                                     ^
In file included from Source/script.cpp:22:0:
Source/util.h: In instantiation of 'void __free_with_close::operator()(T&) [with T = int]':
Source/util.h:114:32:   required from 'ResourceManager<_RESOURCE, _FREE_RESOURCE>::~ResourceManager() [with _RESOURCE = int; _FREE_RESOURCE = __free_with_close]'
Source/script.cpp:6460:1:   required from here
Source/util.h:128:59: error: 'close' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   template <typename T> void operator()(T& x) { freefunc(x); } \
                                                           ^
Source/util.h:145:1: note: in expansion of macro 'RM_DEFINE_FREEFUNC'
 RM_DEFINE_FREEFUNC(close);
 ^
In file included from Source/script.cpp:46:0:
/usr/include/unistd.h:353:12: note: 'int close(int)' declared here, later in the translation unit
 extern int close (int __fd);
            ^
scons: *** [build/release/makensis/script.o] Error 1
scons: building terminated because of errors.
NRDS Server component installed sucessfully

[root@ip-172-31-18-160 nrdsconfigmanager]# cd /usr/local/nsis/bin/
-bash: cd: /usr/local/nsis/bin/: No such file or directory
[root@ip-172-31-18-160 nrdsconfigmanager]# cd /usr/local/nsis/
[root@ip-172-31-18-160 nsis]# ls
share
It appears a number of errors occurred. Since, as you can see from the prompts, that I ran this as root, permissions should not have been a problem.

I tried it again starting with using su - instead of using sudo -i to elevate as root. It went about the same way; errors.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Problems With NRDP Clients - Windows and Mac

Post by tgriep »

What OS and release number is the XI software installed on?
Can you run the following commands as root and post the output?

Code: Select all

uname -a
cat /etc/*release*
Another thing you can try is to run through the Manual Upgrade process as outlined in the document below but instead of running

Code: Select all

./upgrade
run

Code: Select all

./upgrade -f
Which will force the upgrade to reinstall all of the components and hopefully that will install the /usr/local/nsis/bin/makensis file on the XI server and fix the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
TCN-Link
Posts: 30
Joined: Tue Dec 13, 2016 2:05 pm

Re: Problems With NRDP Clients - Windows and Mac

Post by TCN-Link »

Here's the OS on the server:
Linux ip-172-31-18-160.ec2.internal 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.3.1611 (Core)
Derived from Red Hat Enterprise Linux 7.3 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
cpe:/o:centos:centos:7


I ran the upgrade manually per your instructions (as root), forcing component reinstallation. Still no bin folder within /usr/local/nsis/.

This bin directory just isn't being created by any scripted or automated means, it seems. Can you provide the bin folder and its contents in a zip file so I can just place it in the /usr/local/nsis/ directory? Will it work that way or will manually copying it in break something else?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Problems With NRDP Clients - Windows and Mac

Post by tgriep »

There seems a compatibility issue with compiling the nsis package on Centos7 that comes with that version of XI.
The procedure below will upgrade to a newer version of nrds and the nsis packages. I tested it on my system this morning and it compiled the /usr/local/nsis/bin/makensis file that is missing.
Login as root to the server and run the following commands

Code: Select all

cd /usr/local/nagiosxi/html/includes/components/nrdsconfigmanager/
rm installed.nrds 
edit the nrds_version.txt file and change the following from

Code: Select all

nrds-1.2.4.tar.gz
to

Code: Select all

nrds-1.2.5.tar.gz
Save the file

edit the nsis_version.txt file and change the following from

Code: Select all

nsis_0_1_1.tar.gz
to

Code: Select all

nsis_0_1_2.tar.gz
Then run the following to install the updated packages.

Code: Select all

./install.sh
The check to see after a remote client has checked it with the Nagios XI server, that the updates are pushed to them and that the status of the checks are updated.
Be sure to check out our Knowledgebase for helpful articles and solutions!
TCN-Link
Posts: 30
Joined: Tue Dec 13, 2016 2:05 pm

Re: Problems With NRDP Clients - Windows and Mac

Post by TCN-Link »

Oddly enough, the two text files you asked me to edit already had what you requested should be there. No edits were necessary. I suspect the forced reinstall already took care of that?
Deleted the installed.nrds file and ran the install script. Lo and behold...
[root@ip-172-31-18-160 nsis]# cd /usr/local/nsis/bin/
[root@ip-172-31-18-160 bin]# ls
makensis


At this point, just wait on the checks to be made and see if I finally get undefined objects as normal? Or do I need to do anything else before that?
Locked