Brad,
I’m sorry. I did some more testing and discovered a few things. I will remind you that this is, again, on my Mac (high sierra).
-
As far as I can tell, the ping command seems to be the only command showing this behavior. I wasn’t able to reproduce it with other commands.
-
The command has to be wrapped in a try/catch. (I didn’t realize this yesterday when I asked about this. Sorry.)
-
When the above are true and you run the following command (first, make sure 127.0.0.10 isn’t a reachable address, otherwise ping is successful. Use a different IP if necessary) , you will get the stack trace I’ll include at the end of my reply. (I’m using the commandService’s "runCommandLine() method in my interceptor) :
`
command.runCommandLine(‘echo “ping -t 2 127.0.0.10 >/dev/null” | run’, true)
`
-
I was able to work around this problem with the following command, although I’m not exactly sure why it works:
command.runCommandLine('echo "ping -t 2 127.0.0.10 >/dev/null; echo $?" | run', true);
I’m guessing it has something to do with the way ping prints the echo replies to the console because it didn’t happen with other failing commands. Is it worth filing a bug report for? Since I found a work-around, I’m happy.
Are you using this module, because it does the same thing. https://forgebox.io/view/commandbox-hostupdater
We used that when it was first released but it didn’t have mac support at the time and, if memory serves, it required that you run ‘box.exe’ with elevated permissions and/or as root. I haven’t been watching that project so I’m not sure if they resolved those issues.
And finally, the stack trace:
CommandBox:myv2> server start
✘ | Starting Server
Command returned failing exit code [2]
ERROR (4.0.0+01015)
No active job
/Users/joel.clegg/.CommandBox/cfml/system/util/InteractiveJob.cfc: line 365
363: var pointer = getJobs();
364: if( !pointer.len() ) {
365: throw( ‘No active job’ );
366: }
367: // Declare a closure here for easy recursion
called from /Users/joel.clegg/.CommandBox/cfml/system/util/InteractiveJob.cfc: line 80
called from /Users/joel.clegg/.CommandBox/cfml/system/util/InteractiveJob.cfc: line 105
called from /Users/joel.clegg/.CommandBox/cfml/system/services/ServerEngineService.cfc: line 161
called from /Users/joel.clegg/.CommandBox/cfml/system/services/ServerEngineService.cfc: line 57
called from /Users/joel.clegg/.CommandBox/cfml/system/services/ServerEngineService.cfc: line 38
called from /Users/joel.clegg/.CommandBox/cfml/system/services/ServerService.cfc: line 750
called from /Users/joel.clegg/.CommandBox/cfml/system/modules_app/server-commands/commands/server/start.cfc: line 150
called from /Users/joel.clegg/.CommandBox/cfml/system/services/CommandService.cfc: line 337
called from /Users/joel.clegg/.CommandBox/cfml/system/services/CommandService.cfc: line 138
called from /Users/joel.clegg/.CommandBox/cfml/system/Shell.cfc: line 747
called from /Users/joel.clegg/.CommandBox/cfml/system/Shell.cfc: line 570
called from /Users/joel.clegg/.CommandBox/cfml/system/Bootstrap.cfm: line 160
lucee.runtime.exp.CustomTypeException: No active job
at lucee.runtime.tag.Throw._doStartTag(Throw.java:212)
at lucee.runtime.tag.Throw.doStartTag(Throw.java:201)
at throw_cfm$cf.udfCall(/throw.cfm:11)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:226)
at lucee.runtime.functions.system.CFFunction.call(CFFunction.java:99)
at system.util.interactivejob_cfc$cf.udfCall3(/commandbox/system/util/InteractiveJob.cfc:365)
at system.util.interactivejob_cfc$cf.udfCall(/commandbox/system/util/InteractiveJob.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:226)
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:771)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:756)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1718)
at system.util.interactivejob_cfc$cf.udfCall1(/commandbox/system/util/InteractiveJob.cfc:80)
at system.util.interactivejob_cfc$cf.udfCall(/commandbox/system/util/InteractiveJob.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:226)
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:771)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:756)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1718)
at system.util.interactivejob_cfc$cf.udfCall1(/commandbox/system/util/InteractiveJob.cfc:105)
at system.util.interactivejob_cfc$cf.udfCall(/commandbox/system/util/InteractiveJob.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:226)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:687)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:567)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1988)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:756)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1718)
at system.services.serverengineservice_cfc$cf.udfCall(/commandbox/system/services/ServerEngineService.cfc:161)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:226)
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:771)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:756)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1718)
at system.services.serverengineservice_cfc$cf.udfCall(/commandbox/system/services/ServerEngineService.cfc:57)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:212)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:780)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:833)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1737)
at system.services.serverengineservice_cfc$cf.udfCall(/commandbox/system/services/ServerEngineService.cfc:38)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:212)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:689)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:567)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:2005)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:833)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1737)
at system.services.serverservice_cfc$cf.udfCall1(/commandbox/system/services/ServerService.cfc:750)
at system.services.serverservice_cfc$cf.udfCall(/commandbox/system/services/ServerService.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:212)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:689)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:567)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:2005)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:833)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1737)
at system.modules_app.server_commands315.commands.server.start_cfc$cf.udfCall(/commandbox/system/modules_app/server-commands/commands/server/start.cfc:150)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:212)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:689)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:567)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:2005)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:833)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1737)
at system.services.commandservice_cfc$cf.udfCall1(/commandbox/system/services/CommandService.cfc:337)
at system.services.commandservice_cfc$cf.udfCall(/commandbox/system/services/CommandService.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:212)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:780)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:833)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1737)
at system.services.commandservice_cfc$cf.udfCall1(/commandbox/system/services/CommandService.cfc:138)
at system.services.commandservice_cfc$cf.udfCall(/commandbox/system/services/CommandService.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:226)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:687)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:567)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1988)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:756)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1718)
at system.shell_cfc$cf.udfCall4(/commandbox/system/Shell.cfc:747)
at system.shell_cfc$cf.udfCall(/commandbox/system/Shell.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:212)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:780)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:833)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1737)
at system.shell_cfc$cf.udfCall3(/commandbox/system/Shell.cfc:570)
at system.shell_cfc$cf.udfCall(/commandbox/system/Shell.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:107)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:357)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:212)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:689)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:567)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:2005)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:833)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1737)
at joel_clegg230._commandbox46.cfml.system.bootstrap_cfm$cf.call(/__commandbox_root/joel.clegg/.CommandBox/cfml/system/Bootstrap.cfm:160)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:933)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:823)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:805)
at 8pp1b1u76mgd.call(Unknown Source)
at lucee.runtime.compiler.Renderer.tag(Renderer.java:113)
at lucee.runtime.compiler.Renderer.script(Renderer.java:101)
at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:64)
at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:199)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:283)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:150)
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:506)
CommandBox:myv2>