"%1 is not a valid Win32 application."

Hi everyone!

I do need little help regarding the check_nscp_api command trying to check a process. This is the error I get through director:
“C:\Program Files\ICINGA2/sbin/check_nscp_api” --password df4RtgS! -a process=Microsoft.PowerBI.DataMovement.PersonalGateway.exe -q check_process -H localhost failed to execute: 193, “%1 is not a valid Win32 application.”

The same command works perfectly in the host’s terminal.

I’ve spent a bunch of time trying to fix it without any success, so any help would be greatly appreciated :slight_smile:

Thank you so much in advance!

Is the director executing the command on the correct endpoint?

Is the application a 32-bit application, but icinga is starting a 64-bit console or vice versa? In Powershell “sysnative” in the path is your friend then.

Thank you so much for your help, Rafael!

In the beginning, Director is executing the command on the correct endpoint as it’s monitoring the rest of the services properly for this host.

It’s a 64-bit application. It even happens with the explorer.exe process.

Any ideas?

Found it! There were two check_nscp_api files on the C:\Program Files\ICINGA2\sbin directory. One was the binary one and the other an empty file. I just deleted the latter and everything worked :slight_smile:

Thanks for your help!

1 Like

How do you manage to get two files of the same name in the same directory?

Alternatively, how did you delete one of them without deleting the other one
too?

Antony.

To be honest, I had no idea why there was an empty file with the same name as the binary one.

I’ve just deleted the empty file since Director was calling this one instead of the executable one.

I would expect that one was “.exe” and the other one had no extension. As windows strips off known extensions the files look like the same name, but they are not. When you NOT use full filename in your checks, the command need to “choose”… You end up with this configuration, when you copy your checks from linux, then you have the non exe linux version there too.

Thank you for both your help and the clarification, Antony!

To be fair, I did not provide the clarification - that was Raphael.

Regards,

Antony.

1 Like