This Controller Page can be used to restart a local GAEL server
When the task is run a signal to shutdown the server is transmitted. The server shuts down.
The powershell script file (start-gael-server.ps1
) looks for flags that may have been set that adjusts what the script should
do. If no flags are present the server is just restarted after rebuilding the application jar file (the most common reason for restarting a
server).
These options adjust the restart sequence executed.
save - After the server stops a backup copy of the local_db.bin
will be made. Occasionally the
local_db.bin
gets corrupted (I have not found the pattern as to why). Having a recent backup is usually enough in a development
environment to prevent disaster.
stop - The server will not be restarted.
cold - a new deployment id will be created which will cause the server to do a cold start and rebuild internal server files such as the GDT.
prod - The server will be restarting in a production environment (including running a ./prodify
script).
This mode is useful to debug the ocassional bug that may only exist in a production environment.
As of EC1B03 the script file that starts the server is also used in other places. Namely:
See citv3.ps1 or chsol.ps1 as samples of these scripts.
A separate powershell task must be started using the following steps. By convention the workflow containing the recycle-server step is called
run-xxxx
.
This will start the server which can now be managed by this Task
The following commands are useful. Assume the server is at localhost:8711
http://localhost:8711/res/htm/gael-status.htm will enable the status of the server to be displayed.
When the server is in virgin state the command http://localhost:8711/res/htm/gael-prime-server.htm will allow the server to be primed.
Once primed from the previous step the url http://localhost:8711/sve/htm/gael-logon.htm will allow you to log in. Choosing View Datastore will allow you to view the contents.
For the moment the transition is not automatic. The http://localhost:8711/sve/htm/gael-view-datastore.htm URL will dig out the token created by step 3 and start the datastore viewer.
It is possible by improperly closing PSEC task running server to create an orphan server. This, for example, is done by closing the server
PowerShell window directly. The specially provided url http://localhost:PPPP/res/kill-server.htm
may be used to terminate such an
orphan server. The value PPPP is the port number used for the application. A button KILL Server will be presented
which if pressed will issue the internal _ah development console command
which will terminate the server.
--jvm_flag=-Dappengine.allowRemoteShutdown=true
must be enabled. This is set by default in the standard startup script
start-gael-server.ps1
It is necessary to create a token in the localhi=ost:5000
Notes
The gael server s/b configured to alloc CORS form the local host. TODO - remove this automatically in production.
The port address and server address are presently hardwired to relay the gael requests to the server. The are obtained from the gael-server-port.js file which is created when the local server starts and used during the build process.
Copyright © 2018-2021, 2022, Rexcel System Inc.