This page describes the different ways to shutdown REST server gracefully. It also describes the behaviour of the REST server if the license server goes down.
A REST server can be shutdown using following options:
- Using Control-C
- System wide shutdown
- Using REST Server shutdown end point
In all above cases, the REST server will check for any running comparisons before initiating the shutdown. REST Server will shut itself down after completing all the running comparisons. At same time, the REST server will not accept any new comparison.
REST Server shutdown end point
Simple shutdown call from postman:
Use the POST command with this string: http://0.0.0.0:8080/api/xml-data-compare/v1/shutdown
<shutdownInfo> <initiateTime>2020-08-28T07:24:42.960+0000</initiateTime> <runningComparisons>2</runningComparisons> <info>REST Server shut down initiated. It will be completed after finishing the running comparisons.</info> </shutdownInfo>
Shutdown due to license server
A license server can go down for several reasons like:
- Intentional license server shutdown
- License expiry
- System shutdown
- Power outage
The REST server is constantly checking for license server heartbeat and it will be lost if license server goes down. The REST Server will be try to reconnect to license server 2 times after some defined interval. The REST Server will initiate the graceful shutdown if it fails to reconnect.