nsclient ignoring changes from .ini files

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.
Mapienator
Posts: 17
Joined: Thu Mar 26, 2015 10:09 am

nsclient ignoring changes from .ini files

Post by Mapienator »

i’m kinda new to this and this is driving me crazy. every time i change something in the nsclient file, its just ignored. when i re-installing the software all the settings from before come back and i have no idea what i’m doing wrong here. when i install nsclient i choose to use the ini file and it says its going to use/make nsclient.ini

Could anyone explain to me whats going on please?
I can send my config but that has no point. changing it does nothing :/

Ver: NSCP-0.4.2.114-Win32
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: nsclient ignoring changes

Post by jolson »

I assume you are attempting to change the file 'nsclient.ini?' If so, how are you opening the file for modification? It is possible that you don't have write permissions in your 'Program Files' directory and need to save the file on your desktop before you can move it into the NSCLIENT folder (over-writing the old nsclient.ini).

Edit: You will also need to stop and start NSClient before it takes the changes. To do so, please run the following commands in a command shell with admin privileges:

Code: Select all

C:\Windows\system32>net stop nscp

C:\Windows\system32>net start nscp
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Mapienator
Posts: 17
Joined: Thu Mar 26, 2015 10:09 am

Re: nsclient ignoring changes

Post by Mapienator »

jolson wrote:I assume you are attempting to change the file 'nsclient.ini?' If so, how are you opening the file for modification? It is possible that you don't have write permissions in your 'Program Files' directory and need to save the file on your desktop before you can move it into the NSCLIENT folder (over-writing the old nsclient.ini).

Edit: You will also need to stop and start NSClient before it takes the changes. To do so, please run the following commands in a command shell with admin privileges:

Code: Select all

C:\Windows\system32>net stop nscp

C:\Windows\system32>net start nscp

I know full permmision on the file. and when i test check_cpu localy (with cmd). it workes. When i empty the nsclient.ini. it still works (same with the nsclient.ini in appdata). Is there any file that i can post that might be of help to this? Like the boot.ini.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: nsclient ignoring changes from .ini files

Post by jolson »

Please post nsclient.log - this should be located in the root of your NSClient folder.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Mapienator
Posts: 17
Joined: Thu Mar 26, 2015 10:09 am

Re: nsclient ignoring changes from .ini files

Post by Mapienator »

jolson wrote:Please post nsclient.log - this should be located in the root of your NSClient folder.
Here it is. i did enable debugging with cmd

Code: Select all

2015-03-27 14:55:42: message:D:\source\nscp\service\cli_parser.cpp:419: Module: CommandClient
2015-03-27 14:55:42: message:D:\source\nscp\service\cli_parser.cpp:420: Command: 
2015-03-27 14:55:42: message:D:\source\nscp\service\cli_parser.cpp:421: Extra Query: 
2015-03-27 14:55:42: message:D:\source\nscp\service\cli_parser.cpp:422: Mode: 3
2015-03-27 14:55:42: message:D:\source\nscp\service\cli_parser.cpp:423: Boot: 1
2015-03-27 14:55:42: message:D:\source\nscp\service\cli_parser.cpp:424: Load All: 0
2015-03-27 14:55:42: message:D:\source\nscp\service\cli_parser.cpp:426: Warning module and boot specified only THAT module will be loaded
2015-03-27 14:55:42: message:D:\source\nscp\service\cli_parser.cpp:430: Arguments: 
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:253: NSClient++ 0.4.3.131 2015-02-15 w32 Loading settings and logger...
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: base-path
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: exe-path
2015-03-27 14:55:42: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:142: Boot.ini found in: c:\Program Files\NSClient++/boot.ini
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: shared-path
2015-03-27 14:55:42: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:160: Activating: ini://${shared-path}/nsclient.ini
2015-03-27 14:55:42: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:81: Creating instance for: ini://${shared-path}/nsclient.ini
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: shared-path
2015-03-27 14:55:42: debug:D:\source\nscp\include\settings/impl/settings_ini.hpp:260: Loading: c:\Program Files\NSClient++/nsclient.ini
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:262: NSClient++ 0.4.3.131 2015-02-15 w32 booting...
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:263: Booted settings subsystem...
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:409: booting::loading plugins
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:504: NSClient++ - 0.4.3.131 2015-02-15 Started!
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:775: c:\Program Files\NSClient++/modules\CommandClient.dll.dll
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:777: adding c:\Program Files\NSClient++/modules\CommandClient.dll
2015-03-27 14:55:42: debug:D:\source\nscp\service\NSClient++.cpp:964: Loading plugin: CommandClient.dll...
2015-03-27 14:55:42: debug:D:\source\nscp\modules\CommandClient\CommandClient.cpp:109: Enter command to execute, help for help or exit to exit...
2015-03-27 14:55:58: error:D:\source\nscp\service\NSClient++.cpp:893: Unknown command(s): check_cpu available commands: commands {}, plugins {}
2015-03-27 14:55:58: error:D:\source\nscp\include\nscapi\nscapi_core_wrapper.cpp:159: Failed to execute command
2015-03-27 14:55:58: error:D:\source\nscp\include\nscapi\nscapi_core_helper.cpp:95: Failed to execute command: check_cpu
2015-03-27 14:55:58: message:D:\source\nscp\modules\CommandClient\CommandClient.cpp:39: UNKNOWN: Unknown command(s): check_cpu
2015-03-27 14:56:06: message:D:\source\nscp\service\cli_parser.cpp:419: Module: CommandClient
2015-03-27 14:56:06: message:D:\source\nscp\service\cli_parser.cpp:420: Command: 
2015-03-27 14:56:06: message:D:\source\nscp\service\cli_parser.cpp:421: Extra Query: 
2015-03-27 14:56:06: message:D:\source\nscp\service\cli_parser.cpp:422: Mode: 3
2015-03-27 14:56:06: message:D:\source\nscp\service\cli_parser.cpp:423: Boot: 1
2015-03-27 14:56:06: message:D:\source\nscp\service\cli_parser.cpp:424: Load All: 0
2015-03-27 14:56:06: message:D:\source\nscp\service\cli_parser.cpp:426: Warning module and boot specified only THAT module will be loaded
2015-03-27 14:56:06: message:D:\source\nscp\service\cli_parser.cpp:430: Arguments: 
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:253: NSClient++ 0.4.3.131 2015-02-15 w32 Loading settings and logger...
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: base-path
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: exe-path
2015-03-27 14:56:06: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:142: Boot.ini found in: c:\Program Files\NSClient++/boot.ini
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: shared-path
2015-03-27 14:56:06: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:160: Activating: ini://${shared-path}/nsclient.ini
2015-03-27 14:56:06: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:81: Creating instance for: ini://${shared-path}/nsclient.ini
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: shared-path
2015-03-27 14:56:06: debug:D:\source\nscp\include\settings/impl/settings_ini.hpp:260: Loading: c:\Program Files\NSClient++/nsclient.ini
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:262: NSClient++ 0.4.3.131 2015-02-15 w32 booting...
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:263: Booted settings subsystem...
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:409: booting::loading plugins
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:504: NSClient++ - 0.4.3.131 2015-02-15 Started!
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:775: c:\Program Files\NSClient++/modules\CommandClient.dll.dll
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:777: adding c:\Program Files\NSClient++/modules\CommandClient.dll
2015-03-27 14:56:06: debug:D:\source\nscp\service\NSClient++.cpp:964: Loading plugin: CommandClient.dll...
2015-03-27 14:56:06: debug:D:\source\nscp\modules\CommandClient\CommandClient.cpp:109: Enter command to execute, help for help or exit to exit...
2015-03-27 14:56:32: message:D:\source\nscp\service\cli_parser.cpp:419: Module: CommandClient
2015-03-27 14:56:32: message:D:\source\nscp\service\cli_parser.cpp:420: Command: 
2015-03-27 14:56:32: message:D:\source\nscp\service\cli_parser.cpp:421: Extra Query: 
2015-03-27 14:56:32: message:D:\source\nscp\service\cli_parser.cpp:422: Mode: 3
2015-03-27 14:56:32: message:D:\source\nscp\service\cli_parser.cpp:423: Boot: 1
2015-03-27 14:56:32: message:D:\source\nscp\service\cli_parser.cpp:424: Load All: 0
2015-03-27 14:56:32: message:D:\source\nscp\service\cli_parser.cpp:426: Warning module and boot specified only THAT module will be loaded
2015-03-27 14:56:32: message:D:\source\nscp\service\cli_parser.cpp:430: Arguments: 
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:253: NSClient++ 0.4.3.131 2015-02-15 w32 Loading settings and logger...
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: base-path
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: exe-path
2015-03-27 14:56:32: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:142: Boot.ini found in: c:\Program Files\NSClient++/boot.ini
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: shared-path
2015-03-27 14:56:32: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:160: Activating: ini://${shared-path}/nsclient.ini
2015-03-27 14:56:32: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:81: Creating instance for: ini://${shared-path}/nsclient.ini
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: shared-path
2015-03-27 14:56:32: debug:D:\source\nscp\include\settings/impl/settings_ini.hpp:260: Loading: c:\Program Files\NSClient++/nsclient.ini
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:262: NSClient++ 0.4.3.131 2015-02-15 w32 booting...
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:263: Booted settings subsystem...
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:409: booting::loading plugins
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:504: NSClient++ - 0.4.3.131 2015-02-15 Started!
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:775: c:\Program Files\NSClient++/modules\CommandClient.dll.dll
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:777: adding c:\Program Files\NSClient++/modules\CommandClient.dll
2015-03-27 14:56:32: debug:D:\source\nscp\service\NSClient++.cpp:964: Loading plugin: CommandClient.dll...
2015-03-27 14:56:32: debug:D:\source\nscp\modules\CommandClient\CommandClient.cpp:109: Enter command to execute, help for help or exit to exit...
2015-03-27 14:56:43: message:D:\source\nscp\service\cli_parser.cpp:419: Module: CommandClient
2015-03-27 14:56:43: message:D:\source\nscp\service\cli_parser.cpp:420: Command: 
2015-03-27 14:56:43: message:D:\source\nscp\service\cli_parser.cpp:421: Extra Query: 
2015-03-27 14:56:43: message:D:\source\nscp\service\cli_parser.cpp:422: Mode: 3
2015-03-27 14:56:43: message:D:\source\nscp\service\cli_parser.cpp:423: Boot: 1
2015-03-27 14:56:43: message:D:\source\nscp\service\cli_parser.cpp:424: Load All: 0
2015-03-27 14:56:43: message:D:\source\nscp\service\cli_parser.cpp:426: Warning module and boot specified only THAT module will be loaded
2015-03-27 14:56:43: message:D:\source\nscp\service\cli_parser.cpp:430: Arguments: 
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:253: NSClient++ 0.4.3.131 2015-02-15 w32 Loading settings and logger...
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: base-path
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: exe-path
2015-03-27 14:56:43: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:142: Boot.ini found in: c:\Program Files\NSClient++/boot.ini
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: shared-path
2015-03-27 14:56:43: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:160: Activating: ini://${shared-path}/nsclient.ini
2015-03-27 14:56:43: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:81: Creating instance for: ini://${shared-path}/nsclient.ini
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: shared-path
2015-03-27 14:56:43: debug:D:\source\nscp\include\settings/impl/settings_ini.hpp:260: Loading: c:\Program Files\NSClient++/nsclient.ini
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:262: NSClient++ 0.4.3.131 2015-02-15 w32 booting...
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:263: Booted settings subsystem...
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:409: booting::loading plugins
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:504: NSClient++ - 0.4.3.131 2015-02-15 Started!
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:775: c:\Program Files\NSClient++/modules\CommandClient.dll.dll
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:777: adding c:\Program Files\NSClient++/modules\CommandClient.dll
2015-03-27 14:56:43: debug:D:\source\nscp\service\NSClient++.cpp:964: Loading plugin: CommandClient.dll...
2015-03-27 14:56:43: debug:D:\source\nscp\modules\CommandClient\CommandClient.cpp:109: Enter command to execute, help for help or exit to exit...
2015-03-27 14:56:47: error:D:\source\nscp\service\NSClient++.cpp:893: Unknown command(s): cls available commands: commands {}, plugins {}
2015-03-27 14:56:47: error:D:\source\nscp\include\nscapi\nscapi_core_wrapper.cpp:159: Failed to execute command
2015-03-27 14:56:47: error:D:\source\nscp\include\nscapi\nscapi_core_helper.cpp:95: Failed to execute command: cls
2015-03-27 14:56:47: message:D:\source\nscp\modules\CommandClient\CommandClient.cpp:39: UNKNOWN: Unknown command(s): cls
2015-03-27 14:56:51: message:D:\source\nscp\service\cli_parser.cpp:419: Module: CommandClient
2015-03-27 14:56:51: message:D:\source\nscp\service\cli_parser.cpp:420: Command: 
2015-03-27 14:56:51: message:D:\source\nscp\service\cli_parser.cpp:421: Extra Query: 
2015-03-27 14:56:51: message:D:\source\nscp\service\cli_parser.cpp:422: Mode: 3
2015-03-27 14:56:51: message:D:\source\nscp\service\cli_parser.cpp:423: Boot: 1
2015-03-27 14:56:51: message:D:\source\nscp\service\cli_parser.cpp:424: Load All: 0
2015-03-27 14:56:51: message:D:\source\nscp\service\cli_parser.cpp:426: Warning module and boot specified only THAT module will be loaded
2015-03-27 14:56:51: message:D:\source\nscp\service\cli_parser.cpp:430: Arguments: 
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:253: NSClient++ 0.4.3.131 2015-02-15 w32 Loading settings and logger...
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: base-path
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: exe-path
2015-03-27 14:56:51: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:142: Boot.ini found in: c:\Program Files\NSClient++/boot.ini
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: shared-path
2015-03-27 14:56:51: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:160: Activating: ini://${shared-path}/nsclient.ini
2015-03-27 14:56:51: debug:D:\source\nscp\libs\settings_manager\settings_manager_impl.cpp:81: Creating instance for: ini://${shared-path}/nsclient.ini
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:1467: Settings not ready so we cant lookup: shared-path
2015-03-27 14:56:51: debug:D:\source\nscp\include\settings/impl/settings_ini.hpp:260: Loading: c:\Program Files\NSClient++/nsclient.ini
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:262: NSClient++ 0.4.3.131 2015-02-15 w32 booting...
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:263: Booted settings subsystem...
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:409: booting::loading plugins
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:504: NSClient++ - 0.4.3.131 2015-02-15 Started!
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:775: c:\Program Files\NSClient++/modules\CommandClient.dll.dll
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:777: adding c:\Program Files\NSClient++/modules\CommandClient.dll
2015-03-27 14:56:51: debug:D:\source\nscp\service\NSClient++.cpp:964: Loading plugin: CommandClient.dll...
2015-03-27 14:56:51: debug:D:\source\nscp\modules\CommandClient\CommandClient.cpp:109: Enter command to execute, help for help or exit to exit...

Code: Select all

2015-03-30 09:21:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:24:09: error:D:\source\nscp\include\check_nt/server/protocol.hpp:66: Rejected connection from: 192.168.1.50
2015-03-30 09:24:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:24:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:25:29: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:31:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:34:09: error:D:\source\nscp\include\check_nt/server/protocol.hpp:66: Rejected connection from: 192.168.1.50
2015-03-30 09:34:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:34:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:35:29: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:41:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:44:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:44:09: error:D:\source\nscp\include\check_nt/server/protocol.hpp:66: Rejected connection from: 192.168.1.50
2015-03-30 09:44:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:45:29: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:51:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:54:09: error:D:\source\nscp\include\check_nt/server/protocol.hpp:66: Rejected connection from: 192.168.1.50
2015-03-30 09:54:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:54:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 09:55:29: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
2015-03-30 10:01:09: error:D:\source\nscp\include\nrpe/server/protocol.hpp:80: Rejected connection from: 192.168.1.50
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: nsclient ignoring changes from .ini files

Post by jdalrymple »

Mapienator wrote:every time i change something in the nsclient file, its just ignored.
What changes and how do you know it's being ignored?
Mapienator wrote:when i re-installing the software all the settings from before come back
Why are you reinstalling? It's not uncommon for programs to NOT overwrite prior configs upon reinstallation.
Mapienator
Posts: 17
Joined: Thu Mar 26, 2015 10:09 am

Re: nsclient ignoring changes from .ini files

Post by Mapienator »

jdalrymple wrote:
Mapienator wrote:every time I change something in the nsclient file, its just ignored.
What changes and how do you know it's being ignored?
When i run

Code: Select all

nscp test
I see that my allowed host is 192.168.1.50. But when I change the IP it does not change when I run it again. Also deleting/replacing the .ini in both exe-dir and appdata. does not change a thing. I've re-installed windows several times just to make sure its not that.

I just have no idea where the program gets its config from other then the main .ini

--
I really appreciate the help!
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: nsclient ignoring changes from .ini files

Post by jdalrymple »

You may want to post on the developer of nsclient++'s forums, this is definitely a nsclient++ problem.

http://www.nsclient.org/forums/

The one thing I notice is that it's still not clear if you're restarting your service after making changes to the ini or not. Your debug logs above are from the 27th but the failure messages are from the 30th. You must restart nsclient++ for it to read config file changes. If you're doing a full reinstall of the software that would *probably* restart the service also, but not certainly. It's possible for the software to maintain memory state if the developer didn't remove it in the uninstaller.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: nsclient ignoring changes from .ini files

Post by Box293 »

Do you have an nsclient.ini AND a nsc.ini file in the same location?

Is there a boot.ini file in the same location? If so, can you post the contents here in a code block please.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Mapienator
Posts: 17
Joined: Thu Mar 26, 2015 10:09 am

Re: nsclient ignoring changes from .ini files

Post by Mapienator »

jdalrymple wrote:You may want to post on the developer of nsclient++'s forums, this is definitely a nsclient++ problem.

http://www.nsclient.org/forums/

The one thing I notice is that it's still not clear if you're restarting your service after making changes to the ini or not. Your debug logs above are from the 27th but the failure messages are from the 30th. You must restart nsclient++ for it to read config file changes. If you're doing a full reinstall of the software that would *probably* restart the service also, but not certainly. It's possible for the software to maintain memory state if the developer didn't remove it in the uninstaller.

Just to make sure. i restart with

Code: Select all

net stop nscp
nscp service --stop
Reinstalling the software (and deleting all files) does not help..... The old config is still used. Even setting a IP and password in the installation wizard does not change the nsconfig.ini it creates. And no. I have no nsc.ini, just nsclient.ini

Here is my boot.ini. I have tried manual paths but with no noticeable changes

Code: Select all

[settings]
1=ini://${exe-path}/nsclient.ini
[main]
write=ini://${exe-path}/nsclient.ini
I did find this. but it does not seem to make any changes

Code: Select all

[settings]
1=old
2=ini
3=registry
Locked