Script timeout after upgrade to 4.2

Started by szabolcs, November 01, 2022, 12:54:57 PM

Previous topic - Next topic

szabolcs

Hey,

I've just upgraded from 4.1 to 4.2 and noticed most of my scripts on agents are timing out after 5 seconds

2022.11.01 11:36:17.798 *D* [comm.cs.1          ] H_ExternalTable called for "BackupList2" (separator=0x007C mode=S cmd="powershell -NoProfile C:\veeamscripts\Get-VeeamJobs-ExternalTable.ps1"
2022.11.01 11:36:17.798 *D* [exec               ] RunExternal called for "BackupList2" "Spowershell -NoProfile C:\veeamscripts\Get-VeeamJobs-ExternalTable.ps1"
2022.11.01 11:36:17.798 *D* [exec               ] RunExternal: command line is "powershell -NoProfile C:\veeamscripts\Get-VeeamJobs-ExternalTable.ps1"
2022.11.01 11:36:17.816 *D* [procexec           ] ProcessExecutor::execute(): process "CMD.EXE /C powershell -NoProfile C:\veeamscripts\Get-VeeamJobs-ExternalTable.ps1" started
2022.11.01 11:36:22.816 *D* [exec               ] RunExternal: external process execution timeout (command line "powershell -NoProfile C:\veeamscripts\Get-VeeamJobs-ExternalTable.ps1")
2022.11.01 11:36:22.823 *D* [procexec           ] ProcessExecutor::readOutput(): process termination detected

Tried adding DefaultExecutionTimeout=30000 to the agent config, but seems to have no effect whatsoever. Have no other timeout values defined in the config. Cannot figure out what agent setting should I mess with.

Thank you!

Filipp Sudanov

Hi!
There's a bug in recently released 4.2 - DefaultExecutionTimeout is not taken in account. This will be fixed in next patch release.

Try settingExternalMetricTimeout - it should affect external tables and external metrics.


Also, external tables now have a new, background mode of operations - command is called regularly, it's output is cached and instantly returned to server when it requests the table. See for more info: https://www.netxms.org/documentation/adminguide/agent-management.html?highlight=externaltable#externaltable

szabolcs

This did the trick, thank you! Great support as always. Will also look into this background mode as well.