pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daulat Ram <Daulat.Ram@cyient.com>
To: Bob Strecansky <bob@mailchimp.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: RE: Re: Re: Re: Issue with postgres login
Date: Fri, 24 Nov 2017 06:49:26 +0000
Message-ID: <48c782f5e3f14ad199519767796480d1@cyient.com> (raw)
In-Reply-To: <CAEGG-HXAFEo-K5Xm=_whO=WohOjmq4JJvkBRV9x55EMv_uX9hQ@mail.gmail.com>
References: <2c605dcbfbea411698c27145d72df38a@cyient.com>
	<CAEGG-HXusEMx54rqqqPX31PCaPXDQYFzmQL3Zj-G7Z7LXcftoA@mail.gmail.com>
	<2d6c9fa482374cd489d8158fbe0635c6@cyient.com>
	<CAEGG-HVsY1J7zfADZ1v+rk55WkA1jHqProK1sZftjOYvsv=hdA@mail.gmail.com>
	<b9a3aacccee5430db31bb30a938837b0@cyient.com>
	<CAEGG-HXAFEo-K5Xm=_whO=WohOjmq4JJvkBRV9x55EMv_uX9hQ@mail.gmail.com>

Thanks for your response. But now I am giving below error while restore the backup
./pg_restore -i -h localhost -p 5432 -U postgres --role postgres -d fleotan -W -v /backup/fleotanOne11.backup >& /backup/fleotanOne32_restore.log

pg_restore: [archiver (db)] connection to database "fleotan" failed: FATAL:  Ident authentication failed for user "postgres"


pga_hba.conf have :

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
#local   all             all                                     peer
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32           md5
host    all             all             0.0.0.0/0               md5
# IPv6 local connections:
host    all             all             ::1/128                 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            ident
#host    replication     postgres        ::1/128                 ident

Plz suggest

Regards,
Daulat
From: Bob Strecansky [mailto:bob@mailchimp.com]
Sent: 24 November, 2017 9:56 AM
To: Daulat Ram <Daulat.Ram@cyient.com>
Cc: pgsql-performance@postgresql.org
Subject: [EXTERNAL]Re: Re: Re: Issue with postgres login

It appears our file permissions are too wide open (which correlated with the error message you shared in your previous email. Changing those to 700 should get you going in the correct direction.

-B

On Thu, Nov 23, 2017 at 23:23 Daulat Ram <Daulat.Ram@cyient.com<mailto:Daulat.Ram@cyient.com>> wrote:
Hello team,

We have the data directory under /var/lib/pgsql/9.3/data/

FYI. Below are the permissions to group and user on each directory. Please do help .

drwxr-xr-x. 19 root root  267 Nov 22 08:42 var/
drwxr-xr-x. 30 root root 4096 Nov 23 09:09 lib/
drwxrwxr-x. 3 postgres postgres  129 Nov 23 16:05 pgsql/
drwxrwxr-x. 4 postgres postgres   66 Nov 24 04:00 9.3/
drwxrwxr-x. 16 postgres postgres 4096 Nov 24 03:42 data/

-rwxrwxrwx. 1 postgres postgres     4 Nov 23 09:09 PG_VERSION
drwxrwxr-x. 2 postgres postgres     6 Nov 23 09:09 pg_twophase
drwxrwxr-x. 2 postgres postgres     6 Nov 23 09:09 pg_tblspc
drwxrwxr-x. 2 postgres postgres     6 Nov 23 09:09 pg_snapshots
drwxrwxr-x. 2 postgres postgres     6 Nov 23 09:09 pg_serial
drwxrwxr-x. 4 postgres postgres    36 Nov 23 09:09 pg_multixact
-rwxrwxrwx. 1 postgres postgres  1636 Nov 23 09:09 pg_ident.conf
drwxrwxr-x. 3 postgres postgres    60 Nov 23 09:09 pg_xlog
drwxrwxr-x. 2 postgres postgres    18 Nov 23 09:09 pg_subtrans
drwxrwxr-x. 2 postgres postgres    18 Nov 23 09:09 pg_clog
drwxrwxr-x. 5 postgres postgres    41 Nov 23 09:09 base
-rwxrwxrwx. 1 postgres postgres    59 Nov 23 09:12 postmaster.opts
drwxrwxr-x. 2 postgres postgres    18 Nov 23 09:12 pg_notify
drwxrwxr-x. 2 postgres postgres    32 Nov 23 09:12 pg_log
drwxrwxr-x. 2 postgres postgres  4096 Nov 23 09:12 global
-rwxrwxrwx. 1 postgres postgres  4232 Nov 23 10:50 pg_hba.conf_backup
-rwxrwxrwx. 1 postgres postgres  9273 Nov 23 13:27 pg_hba.conf
drwxrwxr-x. 2 postgres postgres     6 Nov 23 14:32 pg_stat_tmp
drwxrwxr-x. 2 postgres postgres    63 Nov 23 14:32 pg_stat
-rwxr-xr-x. 1 root     root     20137 Nov 23 14:41 postgresql.conf.bak_231117
-rwxrwxrwx. 1 postgres postgres 20230 Nov 23 15:03 postgresql.conf_original
-rwx------. 1 postgres postgres 20137 Nov 24 03:30 postgresql.conf_24_nov
-rwx------. 1 postgres postgres 20124 Nov 24 03:42 postgresql.conf

Also we have change the below parameters in Postgres.conf file to resolve the issue but still not resolved.

listen_addresses = '*
port = 5432
max_connections = 100
unix_socket_directories = '/tmp'
unix_socket_group = ''
unix_socket_permissions = 0777

Regards,
Daulat

From: Bob Strecansky [mailto:bob@mailchimp.com<mailto:bob@mailchimp.com>]
Sent: 24 November, 2017 9:37 AM

To: Daulat Ram <Daulat.Ram@cyient.com<mailto:Daulat.Ram@cyient.com>>
Cc: pgsql-performance@postgresql.org<mailto:pgsql-performance@postgresql.org>
Subject: [EXTERNAL]Re: Re: Issue with postgres login

It appears the permissions with your data directory have changed. According to the error message, you should set the appropriate permissions for /var/lib/pgsql/9.3/data

-B

On Thu, Nov 23, 2017 at 23:04 Daulat Ram <Daulat.Ram@cyient.com<mailto:Daulat.Ram@cyient.com>> wrote:
Hi team,

But it was working fine earlier.

Another message I have seen after starting by
-bash-4.2$  /usr/pgsql-9.3/bin/pg_ctl -D /var/lib/pgsql/9.3/data/ -l logfile start
< 2017-11-24 04:00:40.780 UTC >FATAL:  data directory "/var/lib/pgsql/9.3/data" has group or world access
< 2017-11-24 04:00:40.780 UTC >DETAIL:  Permissions should be u=rwx (0700).

For more details please refer to trail mail
Regards,
Daulat
From: Bob Strecansky [mailto:bob@mailchimp.com<mailto:bob@mailchimp.com>]
Sent: 24 November, 2017 9:07 AM
To: Daulat Ram <Daulat.Ram@cyient.com<mailto:Daulat.Ram@cyient.com>>
Cc: pgsql-performance@postgresql.org<mailto:pgsql-performance@postgresql.org>
Subject: [EXTERNAL]Re: Issue with postgres login

It seems you may have just the postgresql package installed and not the postgresql-server package. This Linode guide may be helpful:

https://www.linode.com/docs/databases/postgresql/how-to-install-postgresql-relational-databases-on-c...

-B
On Thu, Nov 23, 2017 at 22:28 Daulat Ram <Daulat.Ram@cyient.com<mailto:Daulat.Ram@cyient.com>> wrote:
Hi team,

We are facing the below issue while logging with postgres as given below:

[centos@ip-192-90-2-208 ~]$ su - postgres
Password:
Last login: Thu Nov 23 16:15:45 UTC 2017 on pts/1
-bash-4.2$ psql
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
-bash-4.2$


OS: Centos
AWS environment

Regards,
Daulat

________________________________

DISCLAIMER:

This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Check all attachments for viruses before opening them. All views or opinions presented in this e-mail are those of the author and may not reflect the opinion of Cyient or those of our affiliates.
--
Thanks,

-B
--
Thanks,

-B
--
Thanks,

-B


view thread (7+ messages)

Message-ID: <48c782f5e3f14ad199519767796480d1@cyient.com>
Permalink:  ../48c782f5e3f14ad199519767796480d1@cyient.com/
Also on:    postgresql.org/message-id/48c782f5e3f14ad199519767796480d1@cyient.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: Daulat.Ram@cyient.com, bob@mailchimp.com
  Subject: RE: Re: Re: Re: Issue with postgres login
  In-Reply-To: <48c782f5e3f14ad199519767796480d1@cyient.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox