Error when running pulp-manage-db : "This must not be run as root"

Solution Verified - Updated

Environment

Satellite 6

Issue

  • Unable to run pulp-manage-db command.

It results in the following error:

pulp-manage-db This must not be run as root, but as the same user apache runs as.

Resolution

The command needs to be executed in the following manner:

# sudo -u apache pulp-manage-db

Important: run that command ONLY when pulp services are stopped. In particular, run:

for i in pulp_resource_manager pulp_workers pulp_celerybeat pulp_streamer; do service $i stop; done

before the pulp-manage-db and start the services after the command completes.

SBR
Product(s)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.