Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ict6V-0004kk-8x for pgadmin-support@arkaria.postgresql.org; Thu, 05 Dec 2019 15:31:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ict6U-0006hn-1x for pgadmin-support@arkaria.postgresql.org; Thu, 05 Dec 2019 15:31:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ict6T-0006hZ-DR for pgadmin-support@lists.postgresql.org; Thu, 05 Dec 2019 15:31:41 +0000 Received: from sonic311-14.consmr.mail.bf2.yahoo.com ([74.6.131.124]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ict6P-0004iO-F2 for pgadmin-support@lists.postgresql.org; Thu, 05 Dec 2019 15:31:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1575559893; bh=cBO+7pJ+yut7Tqv/M50AZoNiQTKu2vfPHXc7urRL8l0=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=AA/EPj2cwJXluR/e7a7bvInoa+I+k2ODlVED0YtooCPr4AHobz9JSL06CkGci4ObLUXPLJU4NLsuJ8oAnNB27rf7yspbXSgn8KKR7ZBc5SWknqlaXHwEYuf7s6Yzgbeb3wEifh+VZR28tbLp4lNdSNekCcppCmUN3tI94036ouzRMURvgF8N+F6gLV2q0H53zZ2oigGLY9kkUtt1JsCQ3JteEJhfX3eiOYobIYMDuGXPxd4rle0ywUttC9P0j3rET+mH9GOazyjxe1yRjAblgi/AZg+itWTdqmVjEkvTY+jcMmsjepYg+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Gwu1Ih_DcGLhLaKB6E7P Vy1OTnzdJ287ML4PuIO4EjhhLwDVLKisbOAxvoerFeDsLWN97Wzt6hWDKT35dj1UEKmFWuWFcQ63 2gRijOnJdl3pN9cG8AAUq6MXuRAHJUbbOXccW9xyImt.PytD4Z31vxzKPbwgxwufSvZGC.ydMmWl qOf.0aQ.PBek9hx1croLwy.20fjAghXG7fbHrPKtKbDJHijpo8XMXLcPHKFAJncB3uPNO0DZVKQ9 nwIY2wmCj1hM95jTOA9q6F.85s_dqO.RhTC412GRq0DWTcTwm9l4v._kgxY_fPpetUcWnhzhITmz WMfckhwkgYYUagaiGlNi2QDN1ZG7ngcIM5w-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.bf2.yahoo.com with HTTP; Thu, 5 Dec 2019 15:31:33 +0000 Date: Thu, 5 Dec 2019 15:31:32 +0000 (UTC) From: Pepe TD Vo Reply-To: Pepe TD Vo To: Matthew Tice Cc: Pgsql-admin , PgAdmin Support List , =?UTF-8?Q?Isa=C3=ADas_S=C3=A1nchez?= Message-ID: <1614372602.2615961.1575559892661@mail.yahoo.com> In-Reply-To: References: <1181269159.2008678.1575482127453.ref@mail.yahoo.com> <1181269159.2008678.1575482127453@mail.yahoo.com> <16ed269b7b0.27c2.d3f16d660df8908fe6a2603d1cc45496@gmail.com> <1484135128.5865979.1575491939671@mail.yahoo.com> Subject: Re: postgres service can't restart/start MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2615960_952051169.1575559892656" X-Mailer: WebService/1.1.14728 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 Content-Length: 32914 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_2615960_952051169.1575559892656 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable yes I do have a righ systemd service file named 'postgresql-11' and its loc= ated /usr/lib/systemd/system/ Here what I did so far aftermake install. =C2=A0 mkdir /usr/local/pgsql/log Run=20 ./usr/local/pgsql/bin/pg_ctl =E2=80=93D/postgres_data/pgsql/data =E2=80=93l= /usr/local/pgsql/log/logfile start psql in the psql shell psql# create user replicareplication login encrypted password =E2=80=98repl= icauser@=E2=80=99; psql# alter user postgrespassword =E2=80=98password@=E2=80=99; =C2=A0 configure postgresql.conf: port =3D 5432 unix_socket_directorys =3D =E2=80=99tmp=E2=80=99 max_files_per_process =3D 1000 listen_addresses =3D =E2=80=98localhost,192.168.2.122 =E2=80=98=C2=A0 =C3= =A0 (master-server-ip) wal_level =3D replica max_replication_slots =3D 10 archive_mode =3D on archive_command =3D =E2=80=98cp =E2=80=93I %p/u02/postgres/main/archive/%f= =E2=80=99 max_wal_senders =3D 10 wal_keep_segments =3D 64 =C2=A0 for pg_hba.conf, I added: local=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 postgres=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0md5=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C3=A0 authenticate pos= tgres host=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 replication=C2=A0 replica=C2=A0=C2=A0192= .##.##.##/32=C2=A0 =C2=A0 =C2=A0 md5=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C3=A0 master-server host=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0replication=C2=A0 replica=C2=A0=C2= =A0192.##.##.##/32=C2=A0 =C2=A0 =C2=A0 md5=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C3=A0 slave-serve= r =C2=A0 $ mkdir =E2=80=93p/u02/postgres/main/archive=20 $ systemctl restart postgresql =3D=3D=3D AUTHENTICATING FORorg.freedesktop.systemd1.manage-units =3D=3D=3D Autehtication is required tomanage system services or units. Authenticating as: sysmaint Password: =3D=3D=3D AUTHENTICATION COMPLETE =3D=3D=3D Job for postgresql-11.servicefailed because the control process existed wit= h error code. See =E2=80=9Csystemctlstatus postgresql-11.service=E2=80=9D a= nd =E2=80=9Cjournalctl =E2=80=93xe=E2=80=9D for details. For the status, it complained about/usr/lib/systemd/system/postgresql-11.se= rvice; disabled; vendor preset: disabled_ Active: failed (Result:exit-code) since date: time Process:10188ExecStartPre=3D/usr/pgsql-11/bin/postgresql-11-check-db-dir ${= PGDATA}(code=3Dexisted, status=3D1/FAILURE) =C2=A0 I un-commented=C2=A0data_directory andcorrect the path to postgresql.conf p= er SA suggested and still get the sameerror above data_directory =3D=E2=80=98/postgres_data/pgsql/data/=E2=80=99=C2=A0 =C2=A0= --> data folder is on shared drive. hba_file =3D=E2=80=98/postgres_data/pgsql/pg_hba.conf=E2=80=99 =C2=A0 still prompt for the user=E2=80=99spassword even I am logging as postgres o= s user. the binary (postgres_home) =3D/usr/local/pgsql/=C2=A0 should owned by root:= root, right?=C2=A0=20 The problem I think but not sureI am right, I found there=E2=80=99s another= source on /usr/pgql-11/bin existed on theserver.=C2=A0 When the SA install= ed the OS Patch, the server hadpostgres-9.6.=C2=A0 I can run any date for P= ostgresql 11.=C2=A0 He applied OSPatches updated, removed 9.6 and yum the p= ostgresql11-11.1-1PGDG.rhel7.x86_64.rpmsuccessful, configure, make and make= install and start the postgresql service without error until the configura= tion of pg_hba.conf and postgresql.conf.=C2=A0 The restart service failed. Wonder if I can remove /usr/pgql-11 or not but not sure whichone is the cor= rected binaries.=C2=A0 Comparing with the single node postgresserver I did = last year, the /usr/local/pgsql sounds convinced right binariesone but /usr= /pgsql-11 have more functions. Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir mistakes you will be alone. So judge less, love and forgive more.To call= him a dog hardly seems to do him justice though in as much as he had four = legs, a tail, and barked, I admit he was, to all outward appearances. But t= o those who knew him well, he was a perfect gentleman (Hermione Gingold) **Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely = rich *** Faithful talent *** Sharing success=20 On Wednesday, December 4, 2019, 05:59:20 PM EST, Matthew Tice wrote: =20 =20 Do you have a systemd service file named `postgres-11`?=C2=A0 If so, what = are the contents of it and the location of the file on the file system? On Wed, Dec 4, 2019 at 1:39 PM Pepe TD Vo wrote: the permission and owner are right.=C2=A0 to add the authentication into th= e pg_hba.conf but when I try to start up the postgres, it prompts me for pa= ssword logged in, even I logged in directly from postgres os user not su fr= om root and/or another os user.=3D=3D=3D=3D AUTHENTICATING FOR org.freedesk= top.systemd1.manage-units =3D=3D=3D Authentication is required to manage system services or units. Authenticating as: user1Password:=3D=3D=3D=3D AUTHENTICATION COMPLETE =3D= =3D=3D=3DFailed to start postgres-11.service: unit not foundSA worked aroun= d with me and still can't start the postgresql service.Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir mistakes you will be alone. So judge less, love and forgive more.To call= him a dog hardly seems to do him justice though in as much as he had four = legs, a tail, and barked, I admit he was, to all outward appearances. But t= o those who knew him well, he was a perfect gentleman (Hermione Gingold) **Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely = rich *** Faithful talent *** Sharing success=20 On Wednesday, December 4, 2019, 02:36:21 PM EST, Isa=C3=ADas S=C3=A1nch= ez wrote: =20 =20 Verify file permission is right, sometimes if you edit a conf file it chan= ges owner and access permission En 4 de diciembre de 2019 18:55:38 Pepe TD Vo escribi=C3= =B3: Hi experts, I am trying to install Postgresql 11.1 replication master-slave.=C2=A0 The = configure, make and make install went well.=C2=A0 Initdb to the shared driv= e and psql are up and running. After configured pg_hba.conf and postgresql.= conf, I can't restart the service and/or reload.=C2=A0 Error is:ATHENTICATI= NG for org.freedesktop.systemd1.manage-units ---Athentication is required t= o manage system services or units.authenticating as :user1Password:-- ATHEN= TICATION COMPLETE --Failed to start psotgres-11.service: unit no found. I worked around and add the postgres on pg_hba.conf and using pg_ctl to rel= oad the service.=C2=A0 Postgres server stopped but can't start, it complain= ed about checkpoint_segments which I have set its to 8. Working with SA to reconfigure the authenticating and the server reaching o= ut and getting authenticaion from org.freedesktop.systemd1.nanage-units.=C2= =A0 How can I by pass this issue and bring the postgres up? Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir mistakes you will be alone. So judge less, love and forgive more.To call= him a dog hardly seems to do him justice though in as much as he had four = legs, a tail, and barked, I admit he was, to all outward appearances. But t= o those who knew him well, he was a perfect gentleman (Hermione Gingold) **Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely = rich *** Faithful talent *** Sharing success =20 =20 ------=_Part_2615960_952051169.1575559892656 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
yes I do have a righ systemd se= rvice file named 'postgresql-11' and its located /usr/lib/systemd/system/

<= span style=3D"color:#1F497D">Here what I did so far after make install.

 <= /p>

mkdir /usr/loc= al/pgsql/log

Run

./usr/local/pg= sql/bin/pg_ctl =E2=80=93D /postgres_data/pgsql/data =E2=80=93l /usr/local/pgsql/log/logfile start

psql

in the psql sh= ell

psql# create u= ser replica replication login encrypted password =E2=80=98replicauser@=E2=80=99;=

psql# alter us= er postgres password =E2=80=98password@=E2=80=99;

 <= /p>

configure post= gresql.conf:

port =3D 5432<= /span>

unix_socket_di= rectorys =3D =E2=80=99tmp=E2=80=99

max_files_per_= process =3D 1000

listen_address= es =3D =E2=80=98localhost, 192.168.2.122 =E2=80=98  =C3=A0 (master-server-ip= )

wal_level =3D = replica

max_replicatio= n_slots =3D 10

archive_mode = =3D on

archive_comman= d =3D =E2=80=98cp =E2=80=93I %p /u02/postgres/main/archive/%f=E2=80=99

max_wal_sender= s =3D 10

wal_keep_segme= nts =3D 64

 <= /p>

for pg_hba.con= f, I added:

local &nb= sp;     all              postgres    &= nbsp;                    =        md5            &n= bsp;  =C3= =A0 authenticate postgres

host       replication  replica   192.##.##.##/32      md5       = ;        =C3=A0 master-server

host &nbs= p;     replication  replica   192.##.##.##/32      md5      =          =C3=A0 slave-server

 <= /p>

$ mkdir =E2=80= =93p /u02/postgres/main/archive

$ systemctl re= start postgresql

=3D=3D=3D AUTH= ENTICATING FOR org.freedesktop.systemd1.manage-units =3D=3D=3D

Autehtication = is required to manage system services or units.

Authenticating= as: sysmaint

Password:

=3D=3D=3D AUTH= ENTICATION COMPLETE =3D=3D=3D

Job for postgr= esql-11.service failed because the control process existed with error code. See =E2=80=9Csy= stemctl status postgresql-11.service=E2=80=9D and =E2=80=9Cjournalctl =E2=80=93xe= =E2=80=9D for details.

For the status= , it complained about /usr/lib/systemd/system/postgresql-11.service; disabled; vendor preset: dis= abled_

Active: failed= (Result: exit-code) since date: time

Process:10188 ExecStartPre=3D/usr/pgsql-11/bin/postgresql-11-check-db-dir ${PGDATA} (code=3Dexisted, status=3D1/FAILURE)

 <= /p>

I un-c= ommented data_directory and correct the path to postgresql.conf per SA suggested and still get the same error above

data_dire= ctory =3D =E2=80=98/postgres_data/pgsql/data/=E2=80=99   --> data folder= is on shared drive.

hba_file =3D =E2=80=98/postgres_data/pgsql/pg_hba.conf=E2=80=99

 <= /p>

still prompt f= or the user=E2=80=99s password even I am logging as postgres os user.

the binary (postgres_home) =3D /usr/local/pgsql/  should owned by root:root, right? 

The probl= em I think but not sure I am right, I found there=E2=80=99s another source on /usr/pgql-11/bin exis= ted on the server.  When the SA installed the OS Patch, the server had postgres-9.6.  I can run any date for Postgresql 11.  He applied = OS Patches updated, removed 9.6 and yum the postgresql11-11.1-1PGDG.rhel7.x86_= 64.rpm successful, configure, make and make install and start the postgresql servi= ce without error until the configuration of pg_hba.conf and postgresql.conf= .  The restart service failed.

Wonder if I can remov= e /usr/pgql-11 or not but not sure which one is the corrected binaries.  Comparing with the single node postgre= s server I did last year, the /usr/local/pgsql sounds convinced right binarie= s one but /usr/pgsql-11 have more functions.


Bach-N= ga

No one in this world is pure an= d perfect.  If you avoid people for their mistakes you will be alone. = So judge less, love and forgive more.
To= call him a dog hardly seems to do him justice though in as much as he had = four legs, a tail, and barked, I admit he was, to all outward appearances. = But to those who knew him well, he was a perfect gentleman (Hermione Gingol= d)

**Live = simply **Love generously **Care deeply **Speak kindly.
*** Genuinely rich *** Faithful talent *** Sharing success


=20
=20
On Wednesday, December 4, 2019, 05:59:20 PM EST, Matthe= w Tice <mjtice@gmail.com> wrote:


Do you= have a systemd service file named `postgres-11`?  If so, what are the= contents of it and the location of the file on the file system?

On Wed, Dec 4, 2019 at 1:39 PM Pepe TD Vo <pepevo@yahoo.com> wrote= :
the permission and owner are right= .  to add the authentication into the pg_hba.conf but when I try to st= art up the postgres, it prompts me for password logged in, even I logged in= directly from postgres os user not su from root and/or another os user.
=3D=3D=3D=3D AUTHENTICATING=
 FOR org.freedesktop.systemd1.manage-units =3D=3D=3D
Authentication is required to manage system services or units.
Authenticating as: user1
<= pre style=3D"white-space:pre-wrap;color:rgb(0,0,0);font-size:16px;">P= assword:
=3D=3D=3D=3D AUTHENTICATION COMPLETE =3D=
=3D=3D=3D
Failed to start postgres-11.service: unit not found
SA worked around with me and still can't start the postgresql service.=
<= /span>
Bach-Nga

= No one in this world is pure and perfect.  If you avoid people for the= ir mistakes you will be alone. So judge less, love and forgive more.
=
To call him a = dog hardly seems to do him justice though in as much as he had four legs, a= tail, and barked, I admit he was, to all outward appearances. But to those= who knew him well, he was a perfect gentleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak k= indly.
*** Genuinely rich *** Faithful talent *** Sharing success=


=20
=20
On Wednesday, December 4, 2019, 02:36:21 PM EST, Isa=C3= =ADas S=C3=A1nchez <isaias.sanchez.l@gmail.com> wrote:


Verify file permission is right, sometimes if you edit a conf file it = changes owner and access permission

En 4 de diciembre de 2019 18:55:38 Pepe TD Vo <pepevo@yahoo.com> escribi=C3=B3:

=
<= div>
Hi experts,

<= /div>
I am trying to install Postgresql 11.1 replication ma= ster-slave.  The configure, make and make install went well.  Ini= tdb to the shared drive and psql are up and running. After configured pg_hb= a.conf and postgresql.conf, I can't restart the service and/or reload. = ; Error is:
ATHENTICATING for org.freedesktop.systemd= 1.manage-units ---
Athentication is required to manag= e system services or units.
authenticating as :user1<= /div>
Password:
-- ATHENTICATION COMP= LETE --
Failed to start psotgres-11.service: unit no = found.

I wo= rked around and add the postgres on pg_hba.conf and using pg_ctl to reload = the service.  Postgres server stopped but can't start, it complained a= bout checkpoint_segments which I have set its to 8.
<= br clear=3D"none">
Working with SA to reconfigure the= authenticating and the server reaching out and getting authenticaion from = org.freedesktop.systemd1.nanage-units.  How can I by pass this issue a= nd bring the postgres up?


= Bach-Nga

No one = in this world is pure and perfect.  If you avoid people for their mist= akes you will be alone. So judge less, love and forgive more.
=
To call him a dog = hardly seems to do him justice though in as much as he had four legs, a tai= l, and barked, I admit he was, to all outward appearances. But to those who= knew him well, he was a perfect gentleman (Hermione Gingold)=

**Live simply **Love generously **Care deeply = **Speak kindly.
*** G= enuinely rich *** Faithful talent *** Sharing success

------=_Part_2615960_952051169.1575559892656--