I’m exploring commandbox and seems a great tool, somehing similar to ruby on rails. Great work, guys!!!
However after installation I have tried to launch some application on server and all works great. However probably I have closed my commandbox without using “server stop” command and after a restart I cannot launch a server anymore. If I try “server status” I have a response of “status:unknown”.
Commandbox suggest to use “server status showAll=true” and I have a list of server:
name: www
status: stopped
webroot: E:\wamp\www
context: C:\Users\Francesco/.CommandBox/server/www
logdir: C:\Users\Francesco/.CommandBox/server//custom/www/log
libDirs:
webConfigDir:
serverConfigDir:
webXML:
trayicon:
port: 49765
stopsocket: 49766
debug: false
name: RailoDeveloper
status: unknown
info:
webroot: E:\wamp\www\RailoDeveloper
context: C:\Users\Francesco/.CommandBox/server/RailoDeveloper
logdir: C:\Users\Francesco/.CommandBox/server//custom/RailoDeveloper/log
libDirs:
webConfigDir:
serverConfigDir:
webXML:
trayicon:
port: 50029
stopsocket: 50030
debug: false
name: myTest
status: stopped
webroot: E:\wamp\www\RailoDeveloper\myTest
context: C:\Users\Francesco/.CommandBox/server/myTest
logdir: C:\Users\Francesco/.CommandBox/server//custom/myTest/log
libDirs:
webConfigDir:
serverConfigDir:
webXML:
trayicon:
port: 50794
stopsocket: 50795
debug: false
As you can see the second server has a status of unknown. How can I stop that server?
I have also tried “server stop force=true” without success:
server stop force=true
railo.commons.cli.CommandException: Could not stop server. Are you sure it is r
unning, and listing for stop requests on port 50030?
at railo.commons.cli.Command.execute(Command.java:51)
at railo.runtime.tag._Execute._run(_Execute.java:63)
at railo.runtime.tag._Execute.run(_Execute.java:54)
ERROR
Error invoking external processCould not stop server. Are you sure it is runnin
g, and listing for stop requests on port 50030?
Thanks for the feedback on CommandBox!
The server will stay running as a separate Java process even if you close CommandBox. You can tell if it’s still running because there will be an icon in your system tray that looks like the little green Ortus circle. You can click on it to open the site, the web admin, or stop it.
As far as the servers getting stuck in an unknown state, that happens to me too sometimes and we probable need to tighten that code up a bit. For starters, when I start a server on Windows, it shows as “starting” and never reaches “started”. Denny developed that code on Linux and it may be a bug with Windows. I don’t have a Mac to test it so maybe Luis can try. What OS are you using?
If you’ve verified the server isn’t running, don’t worry about it having an unknown state saved. The next time you use it, use --force or just use the “server forget” command and the details will be removed. They are just stored in a JSON file located at /user/.CommandBox/servers.json
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
That just probably means it wasn’t running in the first place. Use ‘server forget’ or ‘server start --force’
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
I’m on windows.
Using server forget I have deleted the server.
Thanks for help. However I would like to know also if it’s possible to create application with ses url rewriting on this server. I have tried to remove index.cfm from my route config, but if I try to get an handler using localhost:54692/Main/ I got error. This instead works if i try localhost:54692/index.cfm/Main/.
All my app have normally url rewriting so I really need this feature. I know that tomcat could have url rewriting with tuckey filter. So is this possible?
Yes, I’m glad you mentioned that. We had it in our notes to support that via Tuckey and I’m not certain if we tried it yet or it just got overlooked. I know the Undertow servlet container we’re using is new (to us anyway) and very simplistic (which means small and fast too!)
I’ll put in a ticket to get the rewrites working. In the mean time, feel free to play around with it yourself. I use Tuckey on tomcat on my local machine and I copied the config from how Luis had it set up in ContentBox Express, which I think runs on Resin.
It would be great if you could contribute that back!
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
I see that in my Commandbox install tghere is a folder for ses “.CommandBox\cfml\templates\ses”
Probably there is some options to enable here to remove the index.cfm from url. However I really don’t know where to start…
The SES interceptor is different from the URL rewrites though they’re both usually used together.
The templates directory is just templates used for the generation commands. You would need to locate the actual server context/web.xml for Undertow to register Tuckey.
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com
There is no web.xml in undertow…
I see only a railo-web.xml
The hunt is on! May Google be with you 
IIRC, I had to create my own web.xml file for my Tomcat installation because it was optional.
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com