#4280·semaphore

Problem: Docker server wrapper script exits on database connection failure without error message

Author: kzscisoftCreated Sep 25, 2026Updated Sep 25, 2026

Issue

When failing to connect to a PostgreSQL database I have running in Docker the error message of "Could not connect to database server. Exiting." is not printed due to the TIMEOUT value not being resolved in the server wrapper script.

I found that changing L139 of the script from TIMEOUT=$(expr $TIMEOUT - 1) to TIMEOUT=$(( $TIMEOUT - 1 )) fixes the issue:

https://github.com/semaphoreui/semaphore/blob/232bfb242b1eeda93717098d46283a7582279f0a/deployment/docker/server/server-wrapper#L139

Impact

Docker

Installation method

Docker

Database

Postgres

Browser

No response

Semaphore Version

Docker image: semaphoreui/semaphore:v2.19.12-powershell7.5.0

Ansible Version

bash

Logs & errors

Before:

Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
......Pinging database on database port 5432...

After fix modification:

Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
.............................Pinging database on database port 5432...
......Pinging database on database port 5432...
Could not connect to database server. Exiting.

Manual installation - system information

No response

Configuration

No response

Additional information

No response