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 1ictG3-0005DZ-3d for pgadmin-support@arkaria.postgresql.org; Thu, 05 Dec 2019 15:41:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ictG1-000802-SG for pgadmin-support@arkaria.postgresql.org; Thu, 05 Dec 2019 15:41:33 +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 1ictG1-0007zo-7M for pgadmin-support@lists.postgresql.org; Thu, 05 Dec 2019 15:41:33 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ictFx-0004mw-Lq for pgadmin-support@lists.postgresql.org; Thu, 05 Dec 2019 15:41:32 +0000 Received: by mail-qt1-x842.google.com with SMTP id w47so3942716qtk.4 for ; Thu, 05 Dec 2019 07:41:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=/1hlom/7DQDYhDGCReVnOo8MHGfbvNqJsdoelHAYwZI=; b=FVzbjdYdbvwA9pHDOOROlq2Q1lbPXV4Uc1Z37pcSbd0LvRn4D2ujaTj8mxeDTW90E/ NM5Zblw7lD2Lt4EMyRlr3/AGu7Y6jKedBR9dyTAuCNh8VBlMgrTAydKTa9XoKXaMtTxL GG6JZElcY5U/S4GNgwTcbz8cE+HVszGeSSEvqBYs2gd9Hn0FWykFlRwIY7Q2gtWu3GhB bYb/0RcbdtSNFkGTp+CoxwLNeaggIsGzoQ/DEh/ZFeXVNS/w2fBlG+OIbnS6QffFRfeK 5orWPN03O0BeBqFIw4++tNfo4y4qdVeF+Nm8eiV8ZXphiPyRZ42srJAvynwURIm4iwXV Fp/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=/1hlom/7DQDYhDGCReVnOo8MHGfbvNqJsdoelHAYwZI=; b=iBlI25Hw1E2cMr3D6TvFbWl37vA+J9HK3f4eGo/zyenYbFS5DZI0RO4qJx+gKeBTez 1gKEC3dAcFpbSgVf6568H67ifUmMmfirSRSRR2nNNaBlua+jbxC04XHnWop+ssqF7Z11 iyBMl3fRWEEWify7BmlCxkNqJRj9JSqR5fJid5QUELJnrrBfefrG2IkXNs5n8GXUg4JK BTtyRSpaMM2fhF15xC6TeOmf3da6jBajex3IeJPr9oMRvdXBMEY2HaSKlCppaLNyroxz 0U/tguW4YzUBF0jpboe4cyYQN011qA4l24bu4Hdn1IhvXltTn+970wUlmUDIvuzH6PPo sdWA== X-Gm-Message-State: APjAAAVlc2IgCy1B5FZ6HjXUxzi2WlpoP56UVoSZ6zW2j+fc0ea6b5TS L3c+4gJ4thyIVC6f0EwN8oE= X-Google-Smtp-Source: APXvYqxa4U9HTpzmxSfrytoFNVYn2ohehu3/t9tkdQOeFxi4huyBx0ohY20lExa4rwoPA9wamiQ+eQ== X-Received: by 2002:ac8:2201:: with SMTP id o1mr8152486qto.247.1575560488694; Thu, 05 Dec 2019 07:41:28 -0800 (PST) Received: from [172.17.53.230] (rouge-137-188-108-19.vzw.com. [137.188.108.19]) by smtp.gmail.com with ESMTPSA id w12sm4894228qka.130.2019.12.05.07.41.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Dec 2019 07:41:27 -0800 (PST) Content-Type: multipart/alternative; boundary=Apple-Mail-947D6367-D888-45DD-8729-BAE6E903FFE8 Content-Transfer-Encoding: 7bit From: John Scalia Mime-Version: 1.0 (1.0) Subject: Re: postgres service can't restart/start Date: Thu, 5 Dec 2019 10:41:26 -0500 Message-Id: References: <1614372602.2615961.1575559892661@mail.yahoo.com> Cc: Matthew Tice , Pgsql-admin , PgAdmin Support List , =?utf-8?Q?Isa=C3=ADas_S=C3=A1nchez?= In-Reply-To: <1614372602.2615961.1575559892661@mail.yahoo.com> To: Pepe TD Vo X-Mailer: iPad Mail (17A878) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail-947D6367-D888-45DD-8729-BAE6E903FFE8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable You rapidly confuse the systemd process if you manually start/stop/restart P= ostgreSQL by hand. Always use the service or systemctl command for doing any= thing. =E2=80=94 Jay Sent from my iPad > On Dec 5, 2019, at 10:31 AM, Pepe TD Vo wrote: >=20 > =EF=BB=BF > yes I do have a righ systemd service file named 'postgresql-11' and its lo= cated /usr/lib/systemd/system/ >=20 > Here what I did so far after make install. >=20 > =20 >=20 > mkdir /usr/local/pgsql/log >=20 > Run >=20 > ./usr/local/pgsql/bin/pg_ctl =E2=80=93D /postgres_data/pgsql/data =E2=80=93= l /usr/local/pgsql/log/logfile start >=20 > psql >=20 > in the psql shell >=20 > psql# create user replica replication login encrypted password =E2=80=98re= plicauser@=E2=80=99; >=20 > psql# alter user postgres password =E2=80=98password@=E2=80=99; >=20 > =20 >=20 > configure postgresql.conf: >=20 > port =3D 5432 >=20 > unix_socket_directorys =3D =E2=80=99tmp=E2=80=99 >=20 > max_files_per_process =3D 1000 >=20 > listen_addresses =3D =E2=80=98localhost, 192.168.2.122 =E2=80=98 =C3=A0 (= master-server-ip) >=20 > wal_level =3D replica >=20 > max_replication_slots =3D 10 >=20 > archive_mode =3D on >=20 > archive_command =3D =E2=80=98cp =E2=80=93I %p /u02/postgres/main/archive/%= f=E2=80=99 >=20 > max_wal_senders =3D 10 >=20 > wal_keep_segments =3D 64 >=20 > =20 >=20 > for pg_hba.conf, I added: >=20 > local all postgres md5 = =C3=A0 authenticate postgres >=20 > host replication replica 192.##.##.##/32 md5 =C3= =A0 master-server >=20 > host replication replica 192.##.##.##/32 md5 =C3= =A0 slave-server >=20 > =20 >=20 > $ mkdir =E2=80=93p /u02/postgres/main/archive >=20 > $ systemctl restart postgresql >=20 > =3D=3D=3D AUTHENTICATING FOR org.freedesktop.systemd1.manage-units =3D=3D=3D= >=20 > Autehtication is required to manage system services or units. >=20 > Authenticating as: sysmaint >=20 > Password: >=20 > =3D=3D=3D AUTHENTICATION COMPLETE =3D=3D=3D >=20 > Job for postgresql-11.service failed because the control process existed w= ith error code. See =E2=80=9Csystemctl status postgresql-11.service=E2=80=9D= and =E2=80=9Cjournalctl =E2=80=93xe=E2=80=9D for details. >=20 > For the status, it complained about /usr/lib/systemd/system/postgresql-11.= service; disabled; vendor preset: disabled_ >=20 > Active: failed (Result: exit-code) since date: time >=20 > Process:10188 ExecStartPre=3D/usr/pgsql-11/bin/postgresql-11-check-db-dir $= {PGDATA} (code=3Dexisted, status=3D1/FAILURE) >=20 > =20 >=20 > I un-commented data_directory and correct the path to postgresql.conf per S= A suggested and still get the same error above >=20 > data_directory =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 >=20 > =20 >=20 > still prompt for the user=E2=80=99s password even I am logging as postgres= os user. >=20 > the binary (postgres_home) =3D /usr/local/pgsql/ should owned by root:roo= t, right?=20 >=20 > The problem I think but not sure I am right, I found there=E2=80=99s anoth= er source on /usr/pgql-11/bin existed on the server. When the SA installed t= he 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 s= tart the postgresql service without error until the configuration of pg_hba.= conf and postgresql.conf. The restart service failed. >=20 > Wonder if I can remove /usr/pgql-11 or not but not sure which one is the c= orrected binaries. Comparing with the single node postgres server I did las= t year, the /usr/local/pgsql sounds convinced right binaries one but /usr/pg= sql-11 have more functions. >=20 >=20 > Bach-Nga >=20 > No one in this world is pure and perfect. If you avoid people for their m= istakes 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 h= ad 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 Gingo= ld) >=20 > **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, Matthew Tice wrote: >=20 >=20 > Do you have a systemd service file named `postgres-11`? If so, what are t= he contents of it and the location of the file on the file system? >=20 > On Wed, Dec 4, 2019 at 1:39 PM Pepe TD Vo wrote: > the permission and owner are right. to add the authentication into the pg= _hba.conf but when I try to start up the postgres, it prompts me for passwor= d logged in, even I logged in directly from postgres os user not su from roo= t 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 > Password: > =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. > Bach-Nga >=20 > No one in this world is pure and perfect. If you avoid people for their m= istakes 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 h= ad 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 Gingo= ld) >=20 > **Live simply **Love generously **Care deeply **Speak kindly. > *** Genuinely rich *** Faithful talent *** Sharing success >=20 >=20 >> On Wednesday, December 4, 2019, 02:36:21 PM EST, Isa=C3=ADas S=C3=A1nchez= wrote: >>=20 >>=20 >> Verify file permission is right, sometimes if you edit a conf file it cha= nges owner and access permission >>=20 >> En 4 de diciembre de 2019 18:55:38 Pepe TD Vo escribi=C3= =B3: >>=20 >> Hi experts, >>=20 >> I am trying to install Postgresql 11.1 replication master-slave. The con= figure, make and make install went well. Initdb to the shared drive and psq= l are up and running. After configured pg_hba.conf and postgresql.conf, I ca= n't restart the service and/or reload. Error is: >> ATHENTICATING for org.freedesktop.systemd1.manage-units --- >> Athentication is required to manage system services or units. >> authenticating as :user1 >> Password: >> -- ATHENTICATION COMPLETE -- >> Failed to start psotgres-11.service: unit no found. >>=20 >> I worked around and add the postgres on pg_hba.conf and using pg_ctl to r= eload the service. Postgres server stopped but can't start, it complained a= bout checkpoint_segments which I have set its to 8. >>=20 >> Working with SA to reconfigure the authenticating and the server reaching= out and getting authenticaion from org.freedesktop.systemd1.nanage-units. H= ow can I by pass this issue and bring the postgres up? >>=20 >>=20 >> Bach-Nga >>=20 >> No one in this world is pure and perfect. If you avoid people for their m= istakes 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 h= ad 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 Gingo= ld) >>=20 >> **Live simply **Love generously **Care deeply **Speak kindly. >> *** Genuinely rich *** Faithful talent *** Sharing success >=20 >=20 --Apple-Mail-947D6367-D888-45DD-8729-BAE6E903FFE8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable You rapidly confuse the systemd process if y= ou manually start/stop/restart PostgreSQL by hand. Always use the service or= systemctl command for doing anything.

=E2=80=94
Jay

Sent from my iPad

On Dec 5, 2019, at 10:31 AM, Pepe TD Vo <pepevo@y= ahoo.com> wrote:

=EF=BB=BF
yes I do have a righ systemd service file= named 'postgresql-11' and its located /usr/lib/systemd/system/

Here what I did so far after make install.

 

=

mkdir /usr/local/= pgsql/log

Run

./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= replica replication login encrypted password =E2=80=98replicauser@=E2=80=99;<= /p>

psql# alter user p= ostgres password =E2=80=98password@=E2=80=99;

 

=

configure postgre= sql.conf:

port =3D 5432

unix_socket_direc= torys =3D =E2=80=99tmp=E2=80=99

max_files_per_pro= cess =3D 1000

listen_addresses =3D= =E2=80=98localhost, 192.168.2.122 =E2=80=98  =C3=A0 (master-server-ip)<= /span>

wal_level =3D rep= lica

max_replication_s= lots =3D 10

archive_mode =3D o= n

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

 

=

for pg_hba.conf, I= added:

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

host       replication  replica   192.##.##.##/32      md5       =         =C3=A0 m= aster-server

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

 

=

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

$ systemctl resta= rt postgresql

=3D=3D=3D AUTHENT= ICATING FOR org.freedesktop.systemd1.manage-units =3D=3D=3D

Autehtication is r= equired to manage system services or units.

Authenticating as= : sysmaint

Password:<= /p>

=3D=3D=3D AUTHENT= ICATION COMPLETE =3D=3D=3D

Job for postgresq= l-11.service failed because the control process existed with error code. See =E2=80=9Csys= temctl status postgresql-11.service=E2=80=9D and =E2=80=9Cjournalctl =E2=80=93xe=E2= =80=9D for details.

For the status, i= t complained about /usr/lib/systemd/system/postgresql-11.service; disabled; vendor preset: disa= bled_

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

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

 

=

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

data_direct= ory =3D =E2=80=98/postgres_data/pgsql/data/=E2=80=99   --> data folder i= s on shared drive.

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

 

=

still prompt for t= he 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 problem= I think but not sure I am right, I found there=E2=80=99s another source on /usr/pgql-11/bin exist= ed 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 O= S Patches updated, removed 9.6 and yum the postgresql11-11.1-1PGDG.rhel7.x86_6= 4.rpm successful, configure, make and make install and start the postgresql servic= e without error until the configuration of pg_hba.conf and postgresql.conf.&= nbsp; The restart service failed.

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


Bach-Nga
=
No one in this world is pure and perfect.  If yo= u avoid people for their mistakes you will be alone. So judge less, love and= forgive more.
To call him a dog hardly seem= s to do him justice though in as much as he had four legs, a tail, and barke= d, I admit he was, to all outward appearances. But to those who knew him wel= l, he was a perfect gentleman (Hermione Gingold)
<= br clear=3D"none">**Live simply **Love generously **Care d= eeply **Speak kindly.
*** Genuinely rich *** Fai= thful talent *** Sharing success


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


Do you h= ave a systemd service file named `postgres-11`?  If so, what are the co= ntents 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 start up the post= gres, it prompts me for password logged in, even I logged in directly from p= ostgres os user not su from root and/or another os user.
=3D=3D=3D=3D AUTHENTICATING FOR org.freedeskt=
op.systemd1.manage-units =3D=3D=3D
Authentication is required to manage system services or units.
Authenticating as: user1
Pas= sword:
=3D=3D=3D=3D AUTHENTICATION COMPLETE =3D=3D=3D=
=3D
Failed to start postgres-11.service: unit not found
SA w=
orked around with me and still can't start the postgresql service.
Bach-Nga

No one in this world i= s pure and 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 j= ustice 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 p= erfect gentleman (Hermione Gingold)

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


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


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

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

<= blockquote type=3D"cite" style=3D"margin:0px 0px 0px 0.75ex;border-left:1px s= olid rgb(128,128,128);padding-left:0.75ex;">
Hi experts,

I am trying to install Postgresql 11.1 replication maste= r-slave.  The configure, make and make install went well.  Initdb t= o the shared drive and psql are up and running. After configured pg_hba.conf= and postgresql.conf, I can't restart the service and/or reload.  Error= is:
ATHENTICATING for org.freedesktop.systemd1.manage= -units ---
Athentication is required to manage system s= ervices or units.
authenticating as :user1
Password:
-- ATHENTICATION COMPLETE --
Failed to start psotgres-11.service: unit no found.
<= div dir=3D"ltr">
I worked around an= d add the postgres on pg_hba.conf and using pg_ctl to reload the service.&nb= sp; Postgres server stopped but can't start, it complained about checkpoint_= segments which I have set its to 8.

Working with SA to reconfigure the authenticating an= d the server reaching out and getting authenticaion from org.freedesktop.sys= temd1.nanage-units.  How can I by pass this issue and bring the postgre= s up?


Bach-Nga

No one in this world is pure and perfec= t.  If you avoid people for their mistakes you will be alone. So judge l= ess, love and forgive more.
To call him a dog hardly seems to do him justice though i= n as much as he had four legs, a tail, and barked, I admit he was, to all ou= tward appearances. But to those who knew him well, he was a perfect gentlema= n (Hermione Gingold)

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

= --Apple-Mail-947D6367-D888-45DD-8729-BAE6E903FFE8--