Talks about one possible short-term solution
Edit the IntroscopeEnterpriseManager.properties file and change the value of introscope.enterprisemanager.maxConcurrentActions from the default of 5, which allows too many processes to compete for the shell command, to 1: http://tldp.org/LDP/abs/html/exitcodes.html
talks about exit code 2 for a bash shell
There were several cases about exit code 2. It appears that invalid syntax/unexpected characters are being used/sent.. And that is generating the error. The shell or perl in debug could tell you more.
Here is from the other case. Not perl but same approach
echo "%1" >> C:\mytest\simpleshellcmd.log
However, when you execute the action, the following error appears:
3/05/15 05:00:00 AM CET [ERROR] [Manager.Action] Action "WoW-Send msg" failed to execute shell command "date" with bad process exit value "2"
This error is due to the double quotes ("%1") in the script. The action should look like this instead:
echo %1 >> C:\mytest\simpleshellcmd.log
So, it is some sort of parameter issue usually
By setting the MOM to debug mode, we saw there was a perl module missing. After installing the perl module under the wily user, then the error went away.