Patroni service failed to start with issue "(code=exited, status=233/RUNTIME_DIRECTORY)"
search cancel

Patroni service failed to start with issue "(code=exited, status=233/RUNTIME_DIRECTORY)"

book

Article ID: 296412

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Patroni service failed to start and systemctl status shows messages as below:
systemctl status patroni
● patroni.service - Runners to orchestrate a high-availability PostgreSQL
   Loaded: loaded (/etc/systemd/system/patroni.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/patroni.service.d
           └─xxxxxxx.conf
   Active: failed (Result: exit-code) since Sun 2024-04-14 01:10:37 xxx 11s ago
  Process: 970620 ExecStart=/usr/local/bin/patroni /var/lib/postgresql/patroni.yml (code=exited, status=233/RUNTIME_DIRECTORY)
  Process: 970618 ExecStartPre=/usr/bin/systemd-tmpfiles --prefix=/run/postgresql --create (code=exited, status=0/SUCCESS)
 Main PID: 970620 (code=exited, status=233/RUNTIME_DIRECTORY)

Apr 14 01:10:37 <HOSTNAME> systemd[1]: Starting Runners to orchestrate a high-availability PostgreSQL...
Apr 14 01:10:37 <HOSTNAME> systemd[1]: Started Runners to orchestrate a high-availability PostgreSQL.
Apr 14 01:10:37 <HOSTNAME> systemd[1]: patroni.service: main process exited, code=exited, status=233/RUNTIME_DIRECTORY
Apr 14 01:10:37 <HOSTNAME> systemd[1]: Unit patroni.service entered failed state.
Apr 14 01:10:37 <HOSTNAME> systemd[1]: patroni.service failed.


Environment

Product Version: 14.4

Resolution

The message "(code=exited, status=233/RUNTIME_DIRECTORY)" indicates the issue relates to RUNTIME_DIRECTORY in patroni.service file which typically located at /etc/systemd/system/patroni.service. In most cases, we can implement below two options to solve the issue:
  • Changed the RUNTIME_DIRECTORY to a correct one(make sure it's absolute path).
  • Checked the permission of the RUNTIME_DIRECTORY and changed it back if there was once a change on it.