Skip to main content
Skip table of contents

Shutting down the AGS server

The AGS can be stopped by using the API dashboard, the REST API or through the shutdown-server script:

Using API dashboard

  1. In the API dashboard, go to the Administration page.
  2. Click the Server Status 
     icon on the left side of the page.
  3. Click the Gateway Server tab, choose the server from the Gateway Name drop-down, and click the Stop Active Server button.


    Figure 1: Stopping AGS from the dashboard

Using REST API

  1. Use the default SwaggerUI: http://localhost:1981/swaggerui/
  2. Navigate to Servers Resource.
  3. Look for the API /servers/{serverName}/{serverMode} with the description "Perform action (RESTART, SHUTDOWN)" on the specified server.
  4. Provide the API Access Key, Server Name, mode (AGS in this case), and action as shutdown in the action object.


    Figure 2: Stopping AGS using the REST API

This API can be executed from any other client as well and execute the URL: http://localhost:1981/api/ams/servers/{servername}/{servermode}

For this POST method,

  • api_key is passed as a header parameter
  • servername and servermode are passed as path parameters
  • in the body, provide the json:

    CODE
    {
    "action": "shutdown"
    }

Using Script

The AGS can be shut down using the shutdown-server script present in the <fiorano_installation_dir>/esb/server/bin folder.

Provide the URL along with the peer name.

The below example of shutting down the Peer Server(s) involves connecting to an Active Server whose URL is specified by the "-url" parameter.

CODE
shutdown-server -url tsp_tcp://localhost:2247 -user admin -passwd passwd -fpsname apigateway

The following options can also be specified if the user wants to shut down the AGS using an RMI connection. This involves connecting directly to the AGS to initiate the shutdown.

  • -connectorType: Connection type to server. Pass RMI for shutting down servers using RMI connection.
  • -address: IP Address of server.
  • -rmiPort: RMI port of server.
CODE
shutdown-server -connectorType RMI -user admin -passwd passwd -address localhost -rmiPort 2367
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.