exec_async - can't run powershell script

Tags: exec_async

#1 PeterF

Hello,

We have an issue where NXLog stops listening to the UDP port but nxlog remains running.  It posts a message to its log and I would like to run, via exec_async a powershell script that stops and restarts the nxlog service. However, I am unable to do so receiving this error:

ERROR if-else failed at line 9, character 97 in C:\Program Files (x86)\nxlog\conf\nxlog-self.conf. statement execution has been aborted; procedure 'exec_async' failed at line 9, character 97 in C:\Program Files (x86)\nxlog\conf\nxlog-self.conf. statement execution has been aborted; couldn't execute process C:\temp\restart; %1 is not a valid Win32 application.  

Does anybody know how to avoid this error and have nxlog run the script?

Thanks and regards

Peter

 

#2 b0ti Nxlog ✓
#1 PeterF
Hello, We have an issue where NXLog stops listening to the UDP port but nxlog remains running.  It posts a message to its log and I would like to run, via exec_async a powershell script that stops and restarts the nxlog service. However, I am unable to do so receiving this error: ERROR if-else failed at line 9, character 97 in C:\Program Files (x86)\nxlog\conf\nxlog-self.conf. statement execution has been aborted; procedure 'exec_async' failed at line 9, character 97 in C:\Program Files (x86)\nxlog\conf\nxlog-self.conf. statement execution has been aborted; couldn't execute process C:\temp\restart; %1 is not a valid Win32 application.   Does anybody know how to avoid this error and have nxlog run the script? Thanks and regards Peter  

Can you post the relevant piece from your configuration for exec_async()?

Please also provide the UDP errors to see if that's a known issue and also if you have details on how to reproduce it that would help.