StR: 1) Install and launch Tomcat 5.5.28, set up in JON. 2) Go to it's INVENTORY > CONNECTION 3) Set Script Prefix == FOO=x (a valid sh prefix) 4) Perform the shutdown operation. You'll get: FileNotFoundException: The program to execute [FOO=x] does not exist Either I didn't understand what the Script Prefix is for, then please document it better, or this is a bug. ------------------------------------ java.lang.RuntimeException: Script returned error or non-zero exit code while shutting down the Tomcat instance. Exit code [null] at org.jboss.on.plugins.tomcat.TomcatServerOperationsDelegate.doShutdown(TomcatServerOperationsDelegate.java:315) at org.jboss.on.plugins.tomcat.TomcatServerOperationsDelegate.shutdown(TomcatServerOperationsDelegate.java:278) at org.jboss.on.plugins.tomcat.TomcatServerOperationsDelegate.shutdown(TomcatServerOperationsDelegate.java:274) at org.jboss.on.plugins.tomcat.TomcatServerOperationsDelegate.invoke(TomcatServerOperationsDelegate.java:128) at org.jboss.on.plugins.tomcat.TomcatServerComponent.invokeOperation(TomcatServerComponent.java:420) at sun.reflect.GeneratedMethodAccessor1873.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) at java.lang.Thread.run(Thread.java:595) Caused by: java.io.FileNotFoundException: The program to execute [FOO=x] does not exist at org.rhq.core.util.exec.ProcessExecutor.getFullProgramExecutablePath(ProcessExecutor.java:378) at org.rhq.core.util.exec.ProcessExecutor.getCommandLine(ProcessExecutor.java:427) at org.rhq.core.util.exec.ProcessExecutor.startProgram(ProcessExecutor.java:86) at org.rhq.core.util.exec.ProcessExecutor.execute(ProcessExecutor.java:62) at org.rhq.core.system.JavaSystemInfo.executeProcess(JavaSystemInfo.java:197) at org.rhq.core.system.NativeSystemInfo.executeProcess(NativeSystemInfo.java:243) at org.jboss.on.plugins.tomcat.TomcatServerOperationsDelegate.doShutdown(TomcatServerOperationsDelegate.java:304) ... 13 more
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs. keyword: new = Tracking + FutureFeature + SubBug
making sure we're not missing any bugs in rhq_triage
Needs to be reproduced to see if it is still a problem
Still the same: Caused by: java.io.FileNotFoundException: The program to execute [BAR=x] does not exist
The current implementation expects the full path of an executable program in the Script Prefix. The code will then attempt to execute "prefix-script tomcat-script" as one unit. The use case mentioned above (Bar=x) is not valid because commands are executed through Runtime.exec (which does not execute scripting constructors from system dependent shell environments). The recommendation is to clarify further the description for Script Prefix.
Updated the Script Prefix description to further clarify the concept. The description was updated for Tomcat, JBoss As4, and JBoss AS5 plugins. Old description for Script Prefix: "A prefix applied to script execution commands. Typically a sudo for applicable platforms. The prefix is applied verbatim. As such, a sudo user must be configured appropriately. Ignored if not set." New description for Script Prefix: "A prefix applied to script execution commands; this prefix is applied verbatim. The full path of the executable is required (e.g. /usr/bin/sudo). For applicable platforms, this is typically a sudo command, so a sudo user must be configured appropriately for the specified command. Ignored if not set."
Verified on build#540 (Version: 4.1.0-SNAPSHOT Build Number: 1919b71) The Script Prefix description at Inventory->Connection Settings->Operations displays below: "A prefix applied to script execution commands; this prefix is applied verbatim. The full path of the executable is required (e.g. /usr/bin/sudo). For applicable platforms, this is typically a sudo command, so a sudo user must be configured appropriately for the specified command. Ignored if not set." Verified for Tomcat5.5.28, JBoss As4, and JBoss AS5. Marking as verified.
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.