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:
Impact
Docker
Installation method
Docker
Database
Postgres
Browser
No response
Semaphore Version
Docker image: semaphoreui/semaphore:v2.19.12-powershell7.5.0
Ansible Version
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
Source: semaphoreui/semaphore