Failed to start PostgreSQL database server – Unregistered Authentication Agent for unix-process [Solved]

Updated on September 2, 2017

Question:

I got an error ‘Failed to start PostgreSQL database server –  Unregistered Authentication Agent for unix-process‘ while starting PostgreSQL server on CentOS machine. The error indicates that the service failed due to unregistered authentication agent for unix process and it is reported by polkitd service. I understand that the polkitd is a system daemon and its authentication agent verifies the identity of the user before executing an action. The command ‘ journalctl -xe’ and /var/log/secure reveals the same.

Here’s the complete error message:

# service postgresql start
 :::::::::::::::::::::::::::::::::::::
 test.in systemd[1]: Unit postgresql.service entered failed state.
 test.in systemd[1]: postgresql.service failed.
 test.in polkitd[18278]: Unregistered Authentication Agent for unix-process:22928:182581476 (system bus name :1.1038, object path
 test.in chronyd[513]: Source 45.125.255.54 replaced with 123.108.200.124
 test.in polkitd[18278]: Registered Authentication Agent for unix-process:22988:182656818 (system bus name :1.1039 [/usr/bin/pktty
 test.in systemd[1]: Starting PostgreSQL database server...

How to solve the issue?

postgresql error polkitd

Solution:

I had faced the similar error and the below steps fixed it for me.

Step 1: Switch to postgres user

# su - postgres

Step 2: Initialize the database server

$ initdb
 The files belonging to this database system will be owned by user "postgres".
 This user must also own the server process.
 :::::::::::::::::::::::::::::::::::::::::::
 WARNING: enabling "trust" authentication for local connections
 You can change this by editing pg_hba.conf or using the option -A, or
 --auth-local and --auth-host, the next time you run initdb.
 Success. You can now start the database server using:
 postgres -D /var/lib/pgsql/data
 or
 pg_ctl -D /var/lib/pgsql/data -l logfile start

Step 3:

$ exit

Step 4: Start the PostgreSQL server

# service postgresql start
 Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor
 Active: active (running) since Wed 2016-08-31 17:43:58 IST; 10s ago
 Process: 23144 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT
 Process: 23138 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=
 Main PID: 23147 (postgres)

And according to this link, you can ignore the polkitd error message.

Was this article helpful?

Related Articles

Comments Leave a Comment

  1. I’m getting the error: “$initdb command not found”!

    1. Search for initdb command using the below command:

      #locate initdb

      This should give the similar output as below:
      [root@gg ~]# locate initdb
      /usr/local/PostgreSQL/8.3/bin/initdb
      /usr/local/PostgreSQL/8.3/doc/postgresql/html/app-initdb.html

      So in my case I’ll use: /usr/local/PostgreSQL/8.3/bin/initdb

      Note: if you don’t have locate command install using the below command:
      CentOS: yum install mlocate

      Make sure you have installed postgresql postgresql-server and postgresql-devel

Leave a Comment