Use the Shutdown Rocrail And Exit command from the File menu of the Rocgui to stop the Server if it is available (not grayed out) in the Rocgui. Type “q” and hit Enter in the Console window if the Rocgui menu option is not available. Only one or the other method will work depending on how the Server was started (see below).
Avoid using ctrl-c or kill commands to stop the Server, important information can be lost if the Server is abruptly halted and not allowed to shutdown normally. If you accidentally close the Rocqui without stopping the Server, it is better to restart the Rocgui and use Shutdown Rocrail And Exit.
The Rocview menu item “Shutdown Rocrail And Exit” is only available when the Rocrail Server is started without an interactive Console window. (Note: Even if there is a visible Console window for the Server, it may not be interactive depending on how Rocrail was started and the operating system it is running under.)
Use the Rocview option if it is available. Note that Rocrail normally runs the Server with an interactive Console window. If the Rocgui menu item is not available, shutdown the Server directly from the Console window.
If the Rocgui menu item is not available, use the console command q<enter> to stop the Rocrail Server. Click on the Server Console window to give it the focus and type the letter 'q' followed by the enter key.
The command line option "-console" is used to start the Sever with an interactive Console window. This prevents the Rocview from shutting down the server, and the Rocgui menu item will not be available.
Many other Console commands can be typed into an interactive Console window to control the Server, see "Console Mode" for a full list.
Sometimes the Server may “hang” and it must be shut down manually. Switch to the Console window if it is available (by clicking on it and giving it the focus) and type ctrl-c.
Under Linux, you can use a kill command from a terminal window with the correct process id if possible. Do not use kill -9 unless absolutely necessary, it will cause an improper shutdown of the Server.
Under Windows, either ctrl-c or end process from the Task Manager can be used, but they will also cause an improper shutdown of the Server.
If the Server is terminated from the Operating System or from a computer crash, it may not shut down properly. Ini and Plan files may not be saved, and the current state of the layout may be lost.
Using the Close Button on the Console Window (the X button in the upper right of the title bar in most window systems) may cause the Operating System to terminate the Server before it can save all files. Windows in particular will only wait a few seconds and then kill the Server before it is finished shutting down. Using the Windows Task Manager will also terminate the Server immediately and prevent saving all files.
If the Server is terminated improperly, restart Rocrail and check all settings carefully, use Control > Init Field to make sure Rocrail knows how all turnouts are set, and check all Blocks to make sure they have the correct Locomotive assignments. After checking all settings, shut down Rocrail completely and start it again to make sure it saves all files.
In extreme cases, you may need to recycle power on the layout, to the command stations and to the computer before restarting Rocrail.
Note: The Rocrail server will take some time to respond when it tries to connect to the command station which is probably not powered on or wrongly configured. Be patient and avoid shutting down the Server improperly.