Starting webMethods API Portal on Windows/Unix environment

webMethods API Portal tutorial

Often times new users of webMethods API Portal finding it difficult to start/stop different components of API Portal.  A typical full start of API Portal involves starting of its two core components

  1. Starting of cloud agent
  2. Starting of individual components

Before we dive into start of these components, we need to have basic understanding of different glossary of terms used in API Portal context.

Glossary

API Portal Cloud Agent

  • Installed on every machine on which to host components like (zookeeper/loadbalancer/apiportalbundle etc)
  • Implements a small set of basic commands (configure, start, stop,…)
  • Performs basic monitoring of installed/configured components on this node.

API Portal Cloud Controller(ACC)

  • Simple command line tool for interacting with one or more CloudAgent(for a HA scenario). 
  • You can connect to ACC via windows shortcut menu(API Portal Cloud Controller 10.x)
  • In unix you can connect using acc shell script by passing required parameters (acc.bat/sh -h localhost -u Clous -pwd g3h31m -p <port>)
  • Or using a add node command as shown below 
    C:\SoftwareAG103\API_Portal\server\acc>acc.bat
    Started HTTP server on port 31380 since port 31378 is in use or unavailable.
    ACC+ >add node local localhost @18009 Clous g3h31m
    Agent at localhost:18009 added successfully with logical node name local.
    There was a warning:
    Could not validate Zookeeper ensemble.
    Cause:
            The ACC config parameter zkmgr.zookeeper.app.type is not set.

Step1: Starting CloudAgent

Windows

In a windows environment API Portal cloudagent is configured as Windows service(Software AG API Portal 10.x) with startup type "Automatic". If incase the machine which hosts API Portal restarts for some reason, the cloud agent component of API Portal will automatically started during system startup. This is no problem.

Unix

In a unix environment, unfortunately CloudAgent is not configured as a daemon. The installation process configures and starts the CloudAgent. BUT CloudAgent will not be automatically started if the machine reboots. We need to explicitly start the CloudAgent. There exists a shell script file (CloudAgentApp.sh) in ($$SoftwareAG/API_Portal/server/bin) to start/stop CloudAgent on a unix enviornment.

Status: If you are not sure whether CloudAgent is running or not you can query the running status of CloudAgent using ./CloudAgentApp.sh status

Start: To start the CloudAgent using the command ./CloudAgentApp.sh start

Stop: To stop the CloudAgent using the comamnd ./CloudAgentApp.sh stop

Step2: Starting components

Windows

To start the components there exists a shortcut in the start menu "Start API Portal 10.x" . This shortcut will connect to the cloudagent and starts the configured components(zookeeper/postgres/cloudsearch etc).

Note: If the cloudagent is not running this shortcut will fail silently. Please make sure you follow step1 to start the cloudagent first and then you can start components.

By default the SoftwareAG installer installs and starts the cloud agent. BUT installer do not start the components automatically after installation. As a user, we need to start the components explicitly.

 

Unix

We have shell scripts(sagyap10x.sh) in $$SoftwareAG/API_Portal/server to start/stop the API Portal. You can run sagyap10x.sh with start arguement to start the configured components.

 

You might find useful: