Skip to main content
vpolovnikov
Staff & Editor
Staff & Editor
April 30, 2026

Troubleshooting Tip: FortiClientEMS PostgreSQL docker container node keeps restarting

  • April 30, 2026
  • 0 replies
  • 39 views

Description

This article describes how to address an issue with a PostgreSQL Docker container not coming up and keeps restarting in FortiClientEMS HA with PostgreSQL Cluster in Docker scenario.

Scope

FortiClientEMS. Docker. HA.

Solution

This article addresses one of the issues that may surface when creating a FortiClientEMS HA environment, as described in the following document: EMS nodes in HA with Postgres DB HA cluster using EMS PostgreSQL HA Docker, single region.


One of the ways to verify Docker container status is to use the following command:


sudo docker container ls


This command returns an output similar to the one below when the container has been misconfigured when executing the docker container run command.


2fee3604.png


Note: Restarting status.

To diagnose the issue, run the following command:


sudo docker container log


The output shows the container startup logs, including for the service it's hosting (in this case, the PostgreSQL service).


51ca8af9.png


The screenshot above indicates the issue with one of the REPMGR environment variables and, in particular, REPMGR_NODE_NAME.

Here is a sudo docker container run command excerpt from the official documentation:


docker run --restart always --detach --name pg-1 -p 5432:5432 \\
  --env REPMGR_PRIMARY_HOST=pg-1 \
  --env REPMGR_PRIMARY_PORT=5432 \
  --env REPMGR_PARTNER_NODES=pg-1,pg-2,pgw-1:5432 \
  --env REPMGR_NODE_NAME=pg-1 \


The repmgr daemon responsible for HA management requires a certain format for its environment variables, specifically REPMGR_NODE_NAME must end with -numeric_value (i.e., 'pg-1', 'emsdb-1', 'pg-2', etc.). Otherwise, the PostgreSQL service returns an error as on the above screenshot.


To resolve the issue, make sure the REPMGR_NODE_NAME is configured as per the repmgr daemon requirements.