Stopping the WAMulator
There are several ways to stop the WAMulator. Using control-c on Macs and linux systems or CTRL-C on windows systems will terminate its process after a one second shutdown period. Additionally, the WAMulator includes an endpoint within the console port at a path of /admin/shutdown that will cause the process to terminate. This is useful for times when you've started the WAMulator and left it running in the background or its process has somehow become orphaned and either its command line console or the in-IDE console is no longer visible for some reason. Typically, this situation is discovered when you attempt to start another instance and receive the following output in a console:
... INFO: Running [Start Service] command... Mar 10, 2014 10:53:28 AM org.lds.sso.appwrap.ConfigFileMonitor <init> INFO: Starting up config file update monitor. Monitoring config file: /Users/markboyd/helping/jaredDanielMoore/wamulator/./config.xml Exception in thread "main" org.lds.sso.appwrap.exception.ServerFailureException: org.lds.sso.appwrap.exception.UnableToStartJettyServerException: java.net.BindException: Address already in use at org.lds.sso.appwrap.bootstrap.BlockingServiceCommand.doExecute(BlockingServiceCommand.java:20) at org.lds.sso.appwrap.bootstrap.Command.execute(Command.java:96) at org.lds.sso.appwrap.Service.main(Service.java:655) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
When this occurs, look at the configuration file for the instance that you are attempting to start. Specifically look at the <config> element's console-port value. Then point your browser at http://localhost<console-port-number>/admin/shutdown. This will return the following text/plain response and that WAMulator instance will exit.