Skip to content

OSError: [WinError 259] No more data is available: '(originated from WTSEnumerateSessionsW)' #1258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yuing32 opened this issue Mar 31, 2025 · 0 comments

Comments

@yuing32
Copy link

yuing32 commented Mar 31, 2025

I tried to limit NCPA agent privilege in Windows server by using local os user for NCPA service.

The following command is what I do:

net user /add nagios Abcd1234
icacls "C:\Program Files\Nagios\NCPA" /grant "nagios:(OI)(CI)RX" /t
icacls "C:\Program Files\Nagios\NCPA\var" /grant "nagios:(OI)F" /t
sc.exe config "NCPA" obj=".\nagios" password="Abcd1234"

### Grant ServiceLogonRight to OS user - nagios
. "C:\Program Files\Nagios\NCPA\plugins\AddServiceLogonRight.ps1"
. "C:\Program Files\Nagios\NCPA\plugins\ListServiceLogonRight.ps1"

The result is positive and functional. But there is only one problem. The following error prompt in 'C:\Program Files\Nagios\NCPA\var\log\ncpa_listener.txt'

2025-03-28 00:23:38,464 listener ERROR [WinError 259] No more data is available: '(originated from WTSEnumerateSessionsW)'
Traceback (most recent call last):
File "listener\psapi.py", line 442, in get_root_node
File "listener\psapi.py", line 403, in get_user_node
File "psutil_init_.py", line 2377, in users
File "psutil_pswindows.py", line 491, in users
OSError: [WinError 259] No more data is available: '(originated from WTSEnumerateSessionsW)'

I tried to search the solution in google. But not much reference I can found.
I want to know why ncpa call this function, I didn't monitor Remote Desktop Session in my nagios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant