-
1. Re: Script return code
mazz Feb 4, 2013 10:54 AM (in response to kbielecki)I think that should work, assuming the exit code really is 0. It looks like there is debug messages that will go to the agent log to help debug the problem. See the code at: http://git.fedorahosted.org/cgit/rhq/rhq.git/tree/modules/plugins/script/src/main/java/org/rhq/plugins/script/ScriptServerComponent.java
specifically when checking availability, I see:
if (!exitcodeMatches) {
if (log.isDebugEnabled()) {
logDebug("CLI exit code=[" + results.getExitCode() + "] != [" + availExitCodeRegex + "]. DOWN");
}
return false;
}so turn on agent debugging (you should be able to set the env var RHQ_AGENT_DEBUG=true and restart the agent or, at the agent prompt, enter "debug -e") and run it again. Then look in your agent log file for the message "CLI exit code=" and see what it says.
-
2. Re: Script return code
mazz Feb 4, 2013 10:57 AM (in response to kbielecki)oh, and looking at the code I linked earlier, if you set BOTH (availability exit code regex and output regex), then BOTH of them must pass the test for the resource to be considered UP/green
-
3. Re: Script return code
kbielecki Feb 5, 2013 4:47 AM (in response to mazz)When I delete everythink from script and left only EXIT /B 0
everythink is working.
Problem is timeout.