Coldbox Site / Forgebox Unvailable - CommandBox Throws Error vs nice message

I finally had some time to mess around with CommandBox tonight. Since I wanted to make sure I had the fresh copy of CommandBox I re-downloaded the box.exe from the Ortus site and blew away the .CommandBox directory.

I thought Brad had mentioned that he updated the upgrade mechanism so this wouldn’t be necessarry in the future, but I wasn’t sure if the version I had was the final so I just started fresh.

Now when I made my directory and ran the command (from within the CommandBox shell):

coldbox create app --installColdbox

I get the following error pulled from the commandbox.log:

`

“Severity”,“Appender”,“Date”,“Time”,“Category”,“Message”
“ERROR”,“FILEAPPENDER”,“02/12/2015”,“23:17:47”,“commandbox.system.Shell”,"Syntax Error, Invalid Construct at position 1 in [

<TITLE ...] ExtraInfo:Syntax Error, Invalid Construct at railo.runtime.interpreter.CFMLExpressionInterpreter.checker(CFMLExpressionInterpreter.java:1012):1012 at railo.runtime.interpreter.CFMLExpressionInterpreter.clip(CFMLExpressionInterpreter.java:948):948 at railo.runtime.interpreter.CFMLExpressionInterpreter.negateMinusOp(CFMLExpressionInterpreter.java:936):936 at railo.runtime.interpreter.CFMLExpressionInterpreter.unaryOp(CFMLExpressionInterpreter.java:889):889 at railo.runtime.interpreter.CFMLExpressionInterpreter.expoOp(CFMLExpressionInterpreter.java:878):878 at railo.runtime.interpreter.CFMLExpressionInterpreter.divMultiOp(CFMLExpressionInterpreter.java:838):838 at railo.runtime.interpreter.CFMLExpressionInterpreter.modOp(CFMLExpressionInterpreter.java:818):818 at railo.runtime.interpreter.CFMLExpressionInterpreter.plusMinusOp(CFMLExpressionInterpreter.java:661):661 at railo.runtime.interpreter.CFMLExpressionInterpreter.concatOp(CFMLExpressionInterpreter.java:641):641 at railo.runtime.interpreter.CFMLExpressionInterpreter.decsionOp(CFMLExpressionInterpreter.java:442):442 at railo.runtime.interpreter.CFMLExpressionInterpreter.notOp(CFMLExpressionInterpreter.java:427):427 at railo.runtime.interpreter.CFMLExpressionInterpreter.andOp(CFMLExpressionInterpreter.java:398):398 at railo.runtime.interpreter.CFMLExpressionInterpreter.orOp(CFMLExpressionInterpreter.java:380):380 at railo.runtime.interpreter.CFMLExpressionInterpreter.xorOp(CFMLExpressionInterpreter.java:362):362 at railo.runtime.interpreter.CFMLExpressionInterpreter.eqvOp(CFMLExpressionInterpreter.java:345):345 at railo.runtime.interpreter.CFMLExpressionInterpreter.impOp(CFMLExpressionInterpreter.java:328):328 at railo.runtime.interpreter.CFMLExpressionInterpreter.contOp(CFMLExpressionInterpreter.java:294):294 at railo.runtime.interpreter.CFMLExpressionInterpreter.assignOp(CFMLExpressionInterpreter.java:278):278 at railo.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:194):194 at railo.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:171):171 at railo.runtime.functions.conversion.DeserializeJSON.call(DeserializeJSON.java:33):33 at system.util.forgebox_cfc$cf.udfCall(E:\Users\tim\.CommandBox\cfml\system\util\ForgeBox.cfc:235):235 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93 at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:195):195 at railo.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:757):757 at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:755):755 at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1557):1557 at system.util.forgebox_cfc$cf.udfCall(E:\Users\tim\.CommandBox\cfml\system\util\ForgeBox.cfc:120):120 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93 at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307 at railo.runtime.type.UDFImpl.call(UDFImpl.java:208):208 at railo.runtime.ComponentImpl._call(ComponentImpl.java:623):623 at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1738):1738 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1547):1547 at system.services.packageservice_cfc$cf.udfCall1(E:\Users\tim\.CommandBox\cfml\system\services\PackageService.cfc:99):99 at system.services.packageservice_cfc$cf.udfCall(E:\Users\tim\.CommandBox\cfml\system\services\PackageService.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93 at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:195):195 at railo.runtime.ComponentImpl._call(ComponentImpl.java:624):624 at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506 at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1755):1755 at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:755):755 at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1557):1557 at commands.coldbox.create.app_cfc$cf.udfCall(E:\Users\tim\.CommandBox\cfml\commands\coldbox\create\app.cfc:143):143 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93 at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307 at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:195):195 at railo.runtime.ComponentImpl._call(ComponentImpl.java:624):624 at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506 at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1755):1755 at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:755):755 at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1557):1557 at system.services.commandservice_cfc$cf.udfCall1(E:\Users\tim\.CommandBox\cfml\system\services\CommandService.cfc:222):222 at system.services.commandservice_cfc$cf.udfCall(E:\Users\tim\.CommandBox\cfml\system\services\CommandService.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93 at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307 at railo.runtime.type.UDFImpl.call(UDFImpl.java:208):208 at railo.runtime.ComponentImpl._call(ComponentImpl.java:623):623 at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1738):1738 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1547):1547 at system.shell_cfc$cf.udfCall2(E:\Users\tim\.CommandBox\cfml\system\Shell.cfc:401):401 at system.shell_cfc$cf.udfCall(E:\Users\tim\.CommandBox\cfml\system\Shell.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93 at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307 at railo.runtime.type.UDFImpl.call(UDFImpl.java:208):208 at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:748):748 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1547):1547 at system.shell_cfc$cf.udfCall2(E:\Users\tim\.CommandBox\cfml\system\Shell.cfc:375):375 at system.shell_cfc$cf.udfCall(E:\Users\tim\.CommandBox\cfml\system\Shell.cfc):-1 at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93 at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307 at railo.runtime.type.UDFImpl.call(UDFImpl.java:208):208 at railo.runtime.ComponentImpl._call(ComponentImpl.java:623):623 at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506 at railo.runtime.ComponentImpl.call(ComponentImpl.java:1738):1738 at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724 at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1547):1547 at users.tim._commandbox46.cfml.system.bootstrap_cfm$cf.call(E:\Users\tim\.CommandBox\cfml\system\Bootstrap.cfm:52):52 at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:909):909 at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:861):861 at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:206):206 at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2212):2212 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2179):2179 at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:331):331 at railo.runtime.engine.CFMLEngineImpl.cli(CFMLEngineImpl.java:632):632 at railo.loader.engine.CFMLEngineWrapper.cli(CFMLEngineWrapper.java:249):249 at railocli.CLIMain.run(CLIMain.java:63):63 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):-2 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source):-1 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source):-1 at java.lang.reflect.Method.invoke(Unknown Source):-1 at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:326):326 at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:264):264"

`

I have narrowed this down to the fact that It seems that CommandBox cannot talk to ForgeBox / Coldbox.org site. I saw someone earlier mentioned they couldn’t get to the site. Running ipconfig /flushdns and pinging the site returns the IP of 192.126.83.24. Is this a stale IP being delivered by my ISP or it forgebox just not up at the moment.

No big deal really just thought it was odd that it bombed out with the error vs reporting that the package couldn’t be downloaded because forgebox wasn’t available, etc.

Adding this to ForgeBox.cfc on line 234 seemed to prevent the parse error. Not sure really how to submit the pull request or if this is the desired way to handle the error, but it gave me a little more feedback than spitting out the parse failure.

`

// Try to inflate JSON
if (isJSON(results.rawResponse)) {
results.response = deserializeJSON(results.rawResponse,false);
} else {
results.response = { messages = "Site Unreachable - ForgeBox API failed to return a JSON payload " };
}

`

I guess I’ll just wait for Coldbox and forgebox to start resolving for me before I can get going. If this is the wrong IP maybe I could just force it via my hosts file for now.

CommandBox is awesome!

~Tim

Hi Tom, that’s the same IP address I get too, but forgebox is working fine for me. What do you get if you hit the URL in your browser?

http://www.coldbox.org/api/forgebox/json/entries

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Pull request submitted.

~Tim

This is what I get.

I just hit it from an outside server and it resolved just fine. Very odd. No other sites on my local network are having any issues resolving. My ISP is notoriously slow at propagating DNS typically, but since I get the correct IP I’m a little stumped.

Thanks!
~Tim

The IP address in that screenshot is not what you said earlier. It’s the old, incorrect one. If you’re hitting our new load balanced server farm, you should see the following response headers.

  1. Server:
    nginx

  2. X-Powered-By:
    Ortus Solutions

  3. X-Upstream:
    192.126.83.xx:80

  4. X-Upstream-HTTP-Server:
    nginx

  5. X-Upstream-Response-Time:
    1423811963.625

  6. X-Upstream-Status:
    200

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

It has something to do with the aggressive caching within the browsers as
the windows command prompt returns the IP I posted originally. I should
have checked the headers closer as I saw Apache and thought you all used
nginx.

However, it looks like my browsers are deciding Coldbox.org lives somewhere
else.

Thanks for your help!
~Tim

I’ve narrowed down the issue to somehow when I ping the root domain vs www I get different IPs.

Works on all other computers on my network so something is wonky with this box.

ping coldbox.org
Reply from 192.126.83.24: bytes=32 time=79ms TTL=49

ping www.coldbox.org

Pinging coldbox.org [192.126.90.187] with 32 bytes of data:
Request timed out.

Nonetheless I submitted a pull request to handle the non-JSON response more eloquently. Fun to poke around the CommandBox internals a little to see how it’s done in the process.

Thanks again!
Tim