Rundeck Error on Windows Box

100 views
Skip to first unread message

Kumaravel Shanmugam

unread,
Jun 27, 2017, 11:49:20 AM6/27/17
to rundeck-discuss
HI,

i have setup Rundeck in windows servere 2012.

I'm trying to connect remote box to stop "XXX" Service. While i'm doing getting below error message. Can you please suggest to make it work.

Error Message:

SERVER @ userIDExecuting sc \\REMOTE_SERVER queryex "emshell2"
Stopping service emshell2
SERVER @ userIDsc \\REMOTE_SERVER stop "emshell2" > "E:/utils/DM_FARM/Linux_V2015R3X/log/Stopping_REMOTE_SERVER.log"
Failed: NonZeroResultCode: Result code was 2
Execution failed: 166 in project Testing: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [SERVER: NonZeroResultCode: Result code was 2]}, Node failures: {SERVER=[NonZeroResultCode: Result code was 2]}, status: failed]

Alex Honor

unread,
Jun 27, 2017, 12:55:00 PM6/27/17
to rundeck-discuss

Looks like that service command is completing with an exit code 2. Rundeck command step interprets non-zero exit code as a failure. You can use an error handler to look at the result code and perhaps ignore exit code 2. Your errorhandler can be a command step that evaluates the value of ${result.resultCode}.

eg roughly, IF "${result.resultCode}" EQU "2" (EXIT 0)

Reply all
Reply to author
Forward
0 new messages