Header Shadow Image


INFO: failed to start postgres / Permissions should be u=rwx (0700).

Getting this?

 root ? / ? data ? patroni ? systemctl status patroni
? patroni.service – Runners to orchestrate a high-availability PostgreSQL
   Loaded: loaded (/etc/systemd/system/patroni.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2020-07-12 17:52:48 EDT; 17s ago
 Main PID: 10991 (patroni)
   CGroup: /system.slice/patroni.service
           ??10991 /usr/bin/python2 /bin/patroni /etc/patroni.yml

Jul 12 17:53:04 psql01.nix.mds.xyz patroni[10991]: 1184        C/9E000098        no recovery target specified
Jul 12 17:53:04 psql01.nix.mds.xyz patroni[10991]: 1185        C/BE662D30        no recovery target specified
Jul 12 17:53:04 psql01.nix.mds.xyz patroni[10991]: 1186        C/DE0BD128        no recovery target specified
Jul 12 17:53:04 psql01.nix.mds.xyz patroni[10991]: 1187        C/E0577308        no recovery target specified
Jul 12 17:53:04 psql01.nix.mds.xyz patroni[10991]: 1188        C/E20393C8        no recovery target specified
Jul 12 17:53:04 psql01.nix.mds.xyz patroni[10991]: 2020-07-12 17:53:04,277 INFO: starting as a secondary
Jul 12 17:53:04 psql01.nix.mds.xyz patroni[10991]: 2020-07-12 17:53:04,837 INFO: postmaster pid=11199
Jul 12 17:53:04 psql01.nix.mds.xyz patroni[10991]: psql01.nix.mds.xyz:5432 – no response
Jul 12 17:53:04 psql01.nix.mds.xyz patroni[10991]: 2020-07-12 17:53:04,884 INFO: Lock owner: postgresql1; I am postgresql0
Jul 12 17:53:04 psql01.nix.mds.xyz patroni[10991]: 2020-07-12 17:53:04,891 INFO: failed to start postgres
 root ? / ? data ? patroni ?

Use this handy line to figure out why:

 root ? / ? data ? patroni ? log ? sudo su – postgres
Last login: Sun Oct 20 14:48:12 EDT 2019 on pts/0
-bash-4.2$ /usr/pgsql-10/bin/postgres -D /data/patroni –config-file=/data/patroni/postgresql.conf –listen_addresses=192.168.0.108 –max_worker_processes=8 –max_locks_per_transaction=64 –wal_level=replica –cluster_name=postgres –wal_log_hints=on –max_wal_senders=10 –track_commit_timestamp=off –max_prepared_transactions=0 –port=5432 –max_replication_slots=10 –max_connections=100 -d 5
2020-07-12 17:56:35.685 EDT [12071] FATAL:  data directory "/data/patroni" has group or world access
2020-07-12 17:56:35.685 EDT [12071] DETAIL:  Permissions should be u=rwx (0700).
2020-07-12 17:56:35.685 EDT [12071] DEBUG:  shmem_exit(1): 0 before_shmem_exit callbacks to make
2020-07-12 17:56:35.685 EDT [12071] DEBUG:  shmem_exit(1): 0 on_shmem_exit callbacks to make
2020-07-12 17:56:35.685 EDT [12071] DEBUG:  proc_exit(1): 0 callbacks to make
2020-07-12 17:56:35.685 EDT [12071] DEBUG:  exit(1)
-bash-4.2$ logout
 root ? / ? data ? patroni ? log ?

Fix it using:

 root ? / ? data ? chmod 700 patroni
 root ? / ? data ? systemctl restart patroni
 root ? / ? data ? 

Check the status:

 root ? / ? data ? systemctl status patroni
? patroni.service – Runners to orchestrate a high-availability PostgreSQL
   Loaded: loaded (/etc/systemd/system/patroni.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2020-07-12 17:57:10 EDT; 2min 36s ago
 Main PID: 12226 (patroni)
   CGroup: /system.slice/patroni.service
           ??12226 /usr/bin/python2 /bin/patroni /etc/patroni.yml
           ??12275 /usr/pgsql-10/bin/postgres -D /data/patroni –config-file=/data/patroni/postgresql.conf –hot_standby=on –listen_addre…
           ??12277 postgres: postgres: logger process
           ??12278 postgres: postgres: startup process   recovering 000004A50000000C000000E5
           ??12281 postgres: postgres: checkpointer process
           ??12282 postgres: postgres: writer process
           ??12283 postgres: postgres: stats collector process
           ??12287 postgres: postgres: postgres postgres 10.3.0.108(35052) idle

Jul 12 17:59:14 psql01.nix.mds.xyz patroni[12226]: 2020-07-12 17:59:14,696 INFO: no action.  i am a secondary and i am following a leader
Jul 12 17:59:24 psql01.nix.mds.xyz patroni[12226]: 2020-07-12 17:59:24,691 INFO: Lock owner: postgresql1; I am postgresql0
Jul 12 17:59:24 psql01.nix.mds.xyz patroni[12226]: 2020-07-12 17:59:24,692 INFO: does not have lock
Jul 12 17:59:24 psql01.nix.mds.xyz patroni[12226]: 2020-07-12 17:59:24,697 INFO: no action.  i am a secondary and i am following a leader
Jul 12 17:59:34 psql01.nix.mds.xyz patroni[12226]: 2020-07-12 17:59:34,691 INFO: Lock owner: postgresql1; I am postgresql0
Jul 12 17:59:34 psql01.nix.mds.xyz patroni[12226]: 2020-07-12 17:59:34,691 INFO: does not have lock
Jul 12 17:59:34 psql01.nix.mds.xyz patroni[12226]: 2020-07-12 17:59:34,696 INFO: no action.  i am a secondary and i am following a leader
Jul 12 17:59:44 psql01.nix.mds.xyz patroni[12226]: 2020-07-12 17:59:44,692 INFO: Lock owner: postgresql1; I am postgresql0
Jul 12 17:59:44 psql01.nix.mds.xyz patroni[12226]: 2020-07-12 17:59:44,692 INFO: does not have lock
Jul 12 17:59:44 psql01.nix.mds.xyz patroni[12226]: 2020-07-12 17:59:44,699 INFO: no action.  i am a secondary and i am following a leader
 root ? / ? data ? 

 

HTH!  

Thx,
TK

Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

     
  Copyright © 2003 - 2025 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License

 

0
Would love your thoughts, please comment.x
()
x
The IT Development and Technology Mini Vault | MicroDevSys.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.