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.

Graceful Shutdown

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 endpoint

POST /shutdown allows you to remotely stop the REST server:

Response
<shutdownInfo>
    <initiateTime>2023-01-24T15:53:42.835+0000</initiateTime>
    <runningComparisons>0</runningComparisons>
    <info>DocBook Compare REST Server shut down initiated. It will be completed after finishing the running comparisons.</info>
</shutdownInfo>
XML

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.