NSClient++ Help (#1) - NSCLient++ only works in test mode (#652) - Message List
Hi,
I have a windows 2000 server machine on which I have installed 0.3.8.75
My problem is that when I try to start the software as a service it failes, where as if I try to start in test mode it starts up just fine. What differences are there between the two modes that might cause something like this?
I do not get any output in the log even using debug mode. Then again the application does crash instantly when I try to use either /start or just call the program without any parameters. In test mode I get the following output:
C:\Program Files\NSClient++>nsclient++ /test Launching test mode - client mode d NSClient++.cpp(1178) Enabling debug mode... d NSClient++.cpp(551) Attempting to start NSCLient++ - 0.3.8.75 2010-05-27 d NSClient++.cpp(969) Loading plugin: CheckDisk... d NSClient++.cpp(969) Loading plugin: Event log Checker.... d NSClient++.cpp(969) Loading plugin: Check External Scripts... d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_antivir.pl d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_automanage.pl -d xxxstep d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_backup.pl -w 8 -c 15 -n "C:\Program Files\BakBone Software\Ne tVault" d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_ftp.pl -d xxx-db2.xxxx.xxx d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_http.pl -d xxx-db2.xxxx.xxx d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_ooapilog.pl -d xxxstep d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_oracle.pl -w 93 -c 96 -d xxxstep -t all d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_rman.pl -w @wL@ -c @cL@ -l @path to logfile folder@ d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_http.pl -d xxx-db2.xxxx.xxx --string="Ruby on Rails" -w 2 -c 3 d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_step5.pl d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_tablemanage.pl -d xxxstep d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_http.pl -d xxx-db2.xxxx.xxx -p @port@ --url /IntegrationAPI/A uthenticationWS --string "Hi there, this is a Web service" d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_http.pl -d xxx-db2.xxxx.xxx -p 9090 d \CheckExternalScripts.h(82) Adding: perlArgs: nrpe\check_http.pl -d xxx-db2.xxxx.xxx -p @port@ --url /IntegrationAPI/A uthenticationWS --string "Dies ist ein Web Service" d NSClient++.cpp(969) Loading plugin: Helper function... d NSClient++.cpp(969) Loading plugin: CheckSystem... d NSClient++.cpp(969) Loading plugin: File logger... d \PDHCollector.cpp(73) Autodetected w2k or later, using w2k PDH counters. l \FileLogger.cpp(93) Log path is: C:\Program Files\NSClient++\\nsclient.log d \PDHCollector.cpp(110) Using index to retrive counternames d NSClient++.cpp(969) Loading plugin: NRPE server (w/ SSL)... d \NRPEListener.cpp(90) Non-standard buffer length (hope you have recompiled check_nrpe changing #define MAX_PACKETBUFFE R_LENGTH = 4096 d \NRPEListener.cpp(91) Loading all commands (from NRPE) d \NRPEListener.cpp(121) Starting NRPE socket... d NSClient++.cpp(969) Loading plugin: NSClient server... d \Socket.h(669) Bound to: 0.0.0.0:5666 d NSClient++.cpp(671) NSCLient++ - 0.3.8.75 2010-05-27 Started! d \Socket.h(669) Bound to: 0.0.0.0:12489 d \PDHCollector.cpp(130) Found countername: CPU: \Processor(_total)\% Processor Time l NSClient++.cpp(455) Using settings from: INI-file d \PDHCollector.cpp(131) Found countername: UPTIME: \System\System Up Time l NSClient++.cpp(456) Enter command to inject or exit to terminate... d \PDHCollector.cpp(132) Found countername: MCL: \Memory\Commit Limit d \PDHCollector.cpp(133) Found countername: MCB: \Memory\Committed Bytes
My nsc.ini looks like this:
[modules]
;# NSCLIENT++ MODULES
;# A list with DLLs to load at startup.
; You will need to enable some of these for NSClient++ to work.
; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
; * *
; * N O T I C E ! ! ! - Y O U H A V E T O E D I T T H I S *
; * *
; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
;SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
;CheckWMI.dll
;
; Script to check external scripts and/or internal aliases.
CheckExternalScripts.dll
;
; NSCA Agent if you enable this NSClient++ will talk to NSCA hosts repeatedly (so dont enable unless you want to use NSCA)
;NSCAAgent.dll
;
; LUA script module used to write your own "check deamon".
;LUAScript.dll
;
; RemoteConfiguration IS AN EXTREM EARLY IDEA SO DONT USE FOR PRODUCTION ENVIROMNEMTS!
;RemoteConfiguration.dll
; Check other hosts through NRPE extreme beta and probably a bit dangerous! :)
;NRPEClient.dll
; Extreamly early beta of a task-schedule checker
;CheckTaskSched.dll
[Settings]
;# OBFUSCATED PASSWORD
; This is the same as the password option but here you can store the password in an obfuscated manner.
; *NOTICE* obfuscation is *NOT* the same as encryption, someone with access to this file can still figure out the
; password. Its just a bit harder to do it at first glance.
;obfuscated_password=Jw0KAUUdXlAAUwASDAAB
;
;# PASSWORD
; This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly.
;password=secret-password
;
;# This defines the max length of the string used in the internal buffer
string_length=5120
;# ALLOWED HOST ADDRESSES
; This is a comma-delimited list of IP address of hosts that are allowed to talk to the all daemons.
; If leave this blank anyone can access the deamon remotly (NSClient still requires a valid password).
; The syntax is host or ip/mask so 192.168.0.0/24 will allow anyone on that subnet access
allowed_hosts=
;
;# USE THIS FILE
; Use the INI file as opposed to the registry if this is 0 and the use_reg in the registry is set to 1
; the registry will be used instead.
use_file=1
;
; # USE SHARED MEMORY CHANNELS
; This is the "new" way for using the system tray based on an IPC framework on top shared memmory channels and events.
; It is brand new and (probably has bugs) so dont enable this unless for testing!
; If set to 1 shared channels will be created and system tray icons created and such and such...
;shared_session=0
[EventLog]
buffer_size=223149
[log]
;# LOG DEBUG
; Set to 1 if you want debug message printed in the log file (debug messages are always printed to stdout when run with -test)
debug=0
;
;# LOG FILE
; The file to print log statements to
;file=nsclient.log
;
;# LOG DATE MASK
; The format to for the date/time part of the log entry written to file.
;date_mask=%Y-%m-%d %H:%M:%S
;
;# LOG ROOT FOLDER
; The root folder to use for logging.
; exe = the folder where the executable is located
; local-app-data = local application data (probably a better choice then the old default)
;root_folder=exe
[NSClient]
;# ALLOWED HOST ADDRESSES
; This is a comma-delimited list of IP address of hosts that are allowed to talk to NSClient deamon.
; If you leave this blank the global version will be used instead.
;allowed_hosts=
;
;# NSCLIENT PORT NUMBER
; This is the port the NSClientListener.dll will listen to.
;port=12489
;
;# BIND TO ADDRESS
; Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname.
; Leaving this blank will bind to all avalible IP adresses.
;bind_to_address=
;
;# SOCKET TIMEOUT
; Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out.
;socket_timeout=30
[NRPE]
;# NRPE PORT NUMBER
; This is the port the NRPEListener.dll will listen to.
port=5666
;
;# This defines the max length of the string to be returned
string_length=4096
;# COMMAND TIMEOUT
; This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off.
command_timeout=120
;
;# COMMAND ARGUMENT PROCESSING
; This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
allow_arguments=1
;
;# COMMAND ALLOW NASTY META CHARS
; This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow_nasty_meta_chars=1
;
;# USE SSL SOCKET
; This option controls if SSL should be used on the socket.
use_ssl=1
;
;# BIND TO ADDRESS
; Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname.
; Leaving this blank will bind to all avalible IP adresses.
; bind_to_address=
;
;# ALLOWED HOST ADDRESSES
; This is a comma-delimited list of IP address of hosts that are allowed to talk to NRPE deamon.
; If you leave this blank the global version will be used instead.
allowed_hosts=
;
;# SCRIPT DIRECTORY
; All files in this directory will become check commands.
; *WARNING* This is undoubtedly dangerous so use with care!
;script_dir=scripts\
;
;# SOCKET TIMEOUT
; Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out.
socket_timeout=60
[Check System]
;# CPU BUFFER SIZE
; Can be anything ranging from 1s (for 1 second) to 10w for 10 weeks. Notice that a larger buffer will waste memory
; so don't use a larger buffer then you need (ie. the longest check you do +1).
;CPUBufferSize=30m
;
;# CHECK RESOLUTION
; The resolution to check values (currently only CPU).
; The value is entered in 1/10:th of a second and the default is 10 (which means ones every second)
;CheckResolution=10
;
;# CHECK ALL SERVICES
; Configure how to check services when a CheckAll is performed.
; ...=started means services in that class *has* to be running.
; ...=stopped means services in that class has to be stopped.
; ...=ignored means services in this class will be ignored.
;check_all_services[SERVICE_BOOT_START]=ignored
;check_all_services[SERVICE_SYSTEM_START]=ignored
;check_all_services[SERVICE_AUTO_START]=started
;check_all_services[SERVICE_DEMAND_START]=ignored
;check_all_services[SERVICE_DISABLED]=stopped
[External Script]
;# COMMAND TIMEOUT
; This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off.
command_timeout=60
;
;# COMMAND ARGUMENT PROCESSING
; This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
allow_arguments=1
;
;# COMMAND ALLOW NASTY META CHARS
; This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow_nasty_meta_chars=1
;
;# SCRIPT DIRECTORY
; All files in this directory will become check commands.
; *WARNING* This is undoubtedly dangerous so use with care!
;script_dir=c:\my\script\dir
[Script Wrappings]
;#####################################################
;# Section to be modified by data center operator #
;#####################################################
[External Scripts]
;###########################################
;#Backup checks #
;###########################################
check_backup=perl nrpe\check_backup.pl -w 8 -c 15 -n "C:\Program Files\BakBone Software\NetVault"
check_rman=perl nrpe\check_rman.pl -w @wL@ -c @cL@ -l @path to logfile folder@
;###########################################
;#DB checks #
;###########################################
check_oracle=perl nrpe\check_oracle.pl -w 93 -c 96 -d xxxstep -t all
check_ooapilog=perl nrpe\check_ooapilog.pl -d xxxstep
check_automanage=perl nrpe\check_automanage.pl -d xxxstep
check_tablemanage=perl nrpe\check_tablemanage.pl -d xxxstep
;###########################################
;#App1 checks #
;###########################################
check_sensors=perl nrpe\check_sensorsq.pl
;###########################################
;#App2 checks #
;###########################################
check_websphere=perl nrpe\check_http.pl -d xxx-db2.xxxx.xxx -p @port@ --url /IntegrationAPI/AuthenticationWS --string "Hi there, this is a Web service"
check_websphere_german=perl nrpe\check_http.pl -d xxx-db2.xxxx.xxx -p @port@ --url /IntegrationAPI/AuthenticationWS --string "Dies ist ein Web Service"
check_websphere462=perl nrpe\check_http.pl -d xxx-db2.xxxx.xxx -p 9090
check_ruby_on_rails=perl nrpe\check_http.pl -d xxx-db2.xxxx.xxx --string="Ruby on Rails" -w 2 -c 3
;###########################################
;#Other software check #
;###########################################
check_antivir=perl nrpe\check_antivir.pl
;###########################################
;#System checks #
;###########################################
check_http=perl nrpe\check_http.pl -d xxx-db2.xxxx.xxx
check_ftp=perl nrpe\check_ftp.pl -d xxx-db2.xxxx.xxx
[External Alias]
check_diskfree_dba=CheckDriveSize ShowAll=long MinWarnFree=0 MinCritFree=0 Drive=C:\ Drive=E:\ Drive=J:\ Drive=K:\ Drive=M:\
check_diskfree=CheckDriveSize MinWarnFree=10 MinCritFree=5 Drive=C:\ Drive=E:\ Drive=J:\ Drive=K:\ Drive=M:\
check_dba_disk=CheckDriveSize ShowAll=long CheckAll MaxWarn=90% MaxCrit=95% FilterType=FIXED
check_eventlog=CheckEventLog file=application file=system MaxWarn=1 MaxCrit=5 truncate=1023 file=system file=application MaxWarn=1 MaxCrit=5 filter-eventType==info filter-eventSource=regexp:Print filter-eventSource=regexp:TermServDevices filter-eventSource=regexp:WinVNC4 filter-eventSource=regexp:DnsApi filter-eventID==1106 filter-eventSource=regexp:WSH filter-eventSource=substr:EntObj filter-eventID==257 filter-eventSource=PerfDisk filter-eventSource=regexp:W32Time filter-eventSource=regexp:hpqilo2
check_load=checkCPU warn=80 crit=90 time=20m time=10s time=4
check_uptime=CheckUpTime MinWarn=30m ShowAll
check_mem=checkMem MaxWarn=95% MaxCrit=99% ShowAll type=physical ShowAll
check_swap=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=page ShowAll
;###########################################
;# App 3 checks #
;###########################################
check_backappi=CheckProcState ShowAll backappWebServer.exe=started
check_backapp=CheckProcState ShowAll backapp.exe=started
check_ui=CheckProcState ShowAll MinCritCount=0 MaxCritCount=2 gui.exe=started
;#####################################################
[Wrapped Scripts]
[NSCA Agent]
[NSCA Commands]
[NRPE Client Handlers]
Any help would be greatly appriciated.
-
Message #1943
You have a few options here.
The simplest is to grab DebugView? from http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx as before the "log file" is written to all messages are delivered as debug messages (which are displayed with this tool).
Another one is to grab the "zip" and use some debugging tools to debug it (it comes with debug symbols) which in addition to the sources are fairly useful to detect where things "crash" (this requires some basic debugging skills). There is also a guide for this here on the wiki.
Yet another option is to create a crash dump and send it to me.
And finally you can try to "disable" (in the settings file) your way back to a working client and see if you can figure out what causes the crash.
Michael Medin
mickem08/22/10 15:29:31 (18 months ago)







