CA API Management: Unable to start Gateway docker container
search cancel

CA API Management: Unable to start Gateway docker container

book

Article ID: 76448

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

When attempting to start the CA API Management Gateway Docker container via docker-compose it is observed that the container will start and terminate usually within a few seconds.

You may notice errors like the below

1) Exception configuring gateway: Error saving configuration 'Error during node configuration 'Database connection error 'Access denied for user 'gateway'@'x.x.x.x' (using password: YES)'.''

2) 'ssg database does not exist'

3) Exception configuring gateway: Error creating database when saving configuration 'Cannot create database: '' [code:2, ALREADY_EXISTS]'

apim-provisioning: ERROR: gateway headless autoconfig failed

Environment

Release:
Component: APIOTK

Resolution

This is typically caused by an incorrect setting in the docker compose YAML file.
The setting 'SSG_CLUSTER_COMMAND' should be set to create on the initial deployment and join on subsequent startups.

If you initially deploy using join it will be unable to locate the database as it has yet be be created. If you restart a container using create it will be unable to start as it will attempt to recreate a database with the same name.

ie:
  environment:
    SSG_CLUSTER_COMMAND: "create"