Hi! I hit this while trying to bootstrap a fresh local session on Arch Linux.
When PostgreSQL is not already running,
mxcli run --local --setup --ensure-db only tries the service-manager helpers
service and Debian's pg_ctlcluster. Neither exists on Arch, so the command
exits even though the portable initdb, pg_ctl, postgres, and psql
commands are all available in PATH.
Environment
- OS: Arch Linux
- mxcli:
nightly-20260730-d86fb696 (2026-07-30)
- Mendix project:
11.12.0
- PostgreSQL:
18.4
- Available:
initdb, pg_ctl, postgres, psql
- Missing:
service, pg_ctlcluster, pg_lsclusters
Steps to reproduce
Start with PostgreSQL installed but no server listening on port 5432:
$ pg_isready -h 127.0.0.1 -p 5432
127.0.0.1:5432 - no response
$ mxcli run --local --setup --ensure-db -p /path/to/App.mpr
Expected behavior
--ensure-db should initialize or start a usable local PostgreSQL server and
then ensure that the configured application role and database exist.
Actual behavior
Ensuring database...
Starting local PostgreSQL...
Error: ensuring database: starting local PostgreSQL:
exec: "pg_ctlcluster": executable file not found in $PATH
The command exits with status 1 without trying the portable PostgreSQL tools.
What seems to be happening
cmd/mxcli/docker/ensuredb.go currently has these startup attempts in
startLocalPostgres():
attempts := [][]string{
{"service", "postgresql", "start"},
{"pg_ctlcluster", "--", "start"},
}
Neither command exists on Arch, and there is no fallback using initdb and
pg_ctl.
When I start a compatible PostgreSQL instance separately and the configured
application role/database already exist, the same mxcli command completes.
That confirms the immediate failure is in the local server bootstrap path.
Workaround
Initialize and start a user-owned PostgreSQL cluster manually, create the
application role/database, and then run mxcli without relying on its database
bootstrap:
$ initdb -D <data-directory>
$ pg_ctl -D <data-directory> \
-o "-h 127.0.0.1 -p 5432 -k <socket-directory>" start
$ mxcli run --local -p /path/to/App.mpr
Hi! I hit this while trying to bootstrap a fresh local session on Arch Linux.
When PostgreSQL is not already running,
mxcli run --local --setup --ensure-dbonly tries the service-manager helpersserviceand Debian'spg_ctlcluster. Neither exists on Arch, so the commandexits even though the portable
initdb,pg_ctl,postgres, andpsqlcommands are all available in
PATH.Environment
nightly-20260730-d86fb696(2026-07-30)11.12.018.4initdb,pg_ctl,postgres,psqlservice,pg_ctlcluster,pg_lsclustersSteps to reproduce
Start with PostgreSQL installed but no server listening on port 5432:
Expected behavior
--ensure-dbshould initialize or start a usable local PostgreSQL server andthen ensure that the configured application role and database exist.
Actual behavior
The command exits with status 1 without trying the portable PostgreSQL tools.
What seems to be happening
cmd/mxcli/docker/ensuredb.gocurrently has these startup attempts instartLocalPostgres():Neither command exists on Arch, and there is no fallback using
initdbandpg_ctl.When I start a compatible PostgreSQL instance separately and the configured
application role/database already exist, the same mxcli command completes.
That confirms the immediate failure is in the local server bootstrap path.
Workaround
Initialize and start a user-owned PostgreSQL cluster manually, create the
application role/database, and then run mxcli without relying on its database
bootstrap: