When attempting to start the Foglight Management Server (FMS) as the root user, startup fails with errors indicating that the embedded database is unavailable.
Error message in the FMS log file is:
VERBOSE [ProcessReader-2] pg_ctl/STDERR - pg_ctl: cannot be run as root
VERBOSE [ProcessReader-2] pg_ctl/STDERR - Please log in (using, e.g., "su") as the (unprivileged) user that will
VERBOSE [ProcessReader-2] pg_ctl/STDERR - own the server process.
VERBOSE [forge-startup] com.quest.nitro.db.PostgreSQLEmbeddedDatabaseHandler - Process "pg_ctl" finished with exit code: 1.
FATAL [forge-startup] com.quest.nitro.startup.ForgeServer - Unexpected error during server startup, exiting with error code 1133.
If the restart happens after an upgrade attempt, the following error may also be present.
ERROR [main] com.quest.nitro.installanywhere.console.FoglightUpgradeRequirementCheckConsole - Error occurs when checking requirement failed for upgrade: {0}
java.lang.Exception: java.io.IOException: pg_ctl existed with an unexpected error code 1
PostgreSQL does not start as root as a security precaution.
For Linux:
Start the FMS (Foglight Management Server) using the foglight user instead of the root user.
For Windows:
It is possible to install FMS as a service, so it starts as local system user (Windows).
Also notice this could typically happen if an attempt to start the Foglight service with a user that either does not have all permissions on the whole Foglight installation or if that user is not the one configured to run the Foglight service.
For more information on permission related issues that can prevent Foglight from starting on Windows installations using the embedded PostgreSQL repository, see KB 4374922.