server.json being ignored?

Not sure if I’ve got something wrong here, but I’m sure this has worked before…

I have a new site which I have set up to use Lucee@5.2.5. This is my server.json file, in the root of the site:

`

{
“app”:{
“cfengine”:“lucee@5.2.5+20”
}
}

`

Surely with that in place I should be able to simply use box server start, and it will use the specified version of Lucee? But it launches using Lucee 4.5…

If I use box server start cfengine=lucee@5.2.5, it works fine.

I’m running CommandBox v3.9.0-rc+00817.

I’ve just updated to v3.9.2+00826, just to make sure, and it still doesn’t work…

That should work fine. Are you running your “start” command from the web root? Add --debug to the start to see some information on what server.json file is getting used. Report back the full console output here.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

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

Hi Brad

So, if I do server set app.cfengine=lucee@5.2.5, it creates a file server.json.

However, when I start the server, it looks for a server file with the site path in the filename:

Looking for server JSON file by convention: /Developer/www/cryotag.co.uk//server-cryotag.co.uk.json webroot specified by user: /Developer/www/cryotag.co.uk/ start server in - /Developer/www/cryotag.co.uk/ server name - cryotag.co.uk server config file - /Developer/www/cryotag.co.uk//server-cryotag.co.uk.json

Why is it looking for this file? And can I make it just user server.json?

OK, I’ve used the command:

server set serverConfigFile=server.json

…and it’s now seeing the right one. Not sure why it wasn’t before though - I’d never explicitly named a server instance…

Spoke too soon. That doesn’t work…

If I do box server show, it shows me the contents of server.json. But if I start the server, it still looks for server-cryotag.co.uk.json.

Any ideas?

> Why is it looking for this file?

By default, CommandBox will look for a file named server-.json. This makes it easier to have more than one named server in the same folder. Does a file of that name exist?

And can I make it just user server.json?

Well, if server-cryotag.co.uk.json exists and you don’t want it being used, then delete it! More specifically, you can always do this:

start serverConfigFile=the-server-I-want-used.json

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

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

server set serverConfigFile=server.json

That doesn’t make any sense. Why would you tell a server.json file how to find itself? Please refer to the docs for the list of valid properties in your server.json.

https://ortus.gitbooks.io/commandbox-documentation/content/embedded_server/serverJSON/serverjson.html

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

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

Delete (or rename) the json file you don’t want.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

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