Search Postgresql Archives

Re: Unable to start postgresql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 08 March 2017 23:35:10 Tom Lane wrote:
> John Iliffe <john.iliffe@xxxxxxxxx> writes:
> > [root@prod04 John]# lsof -n | grep postmaster
> > [root@prod04 John]# lsof -n | grep postgres | grep 5432
> > postgres  2760      postgres    5u     unix 0xffff9e5390b5b800      
> > 0t0
> > 
> >          69422 /tmp/.s.PGSQL.5432 type=STREAM
> 
> That isn't proving a lot: as I showed in my example lsof output,
> Fedora's lsof will map "5432" to "postgres" in the context of an IP
> port number. (I'm sure there's a way to turn that off, but -n ain't
> it.)
> 
> 			regards, tom lane

Yes, but your lsof output also showed a line for postmaster and mine 
doesn't.  In your case postmaster has an IPv6 TCP socket (but no IPv4 I 
notice) whereas mine has neither.  

The postgres output seems to be equivalent.

As for lsof, I have searched the man page to try and find appropriate 
parameters for when all I want to know about is IP sockets but to date no 
joy.

The following is from ss, the new version of netstat:

------------------------------------
tcp    LISTEN     0      128    127.0.0.1:postgres              *:*                    
tcp    LISTEN     0      128       ::1:postgres             :::* 
------------------------------------

Unfortunately a request to resolve the socket numbers (ss -rl) fails.  

What I was able to get is the SELinux context of these sockets but frankly, 
it means nothing to me at his point.  With SELinux in permissive mode it 
shouldn't be relevant, but just in case it helps you, here it is:

---------------------------------------
[root@prod04 John]# ss -aZ | grep post
u_str  LISTEN     0      128    /tmp/.s.PGSQL.5432 69422                 * 
0                     users:
(("postgres",pid=2760,proc_ctx=unconfined_u:unconfined_r:unconfined_t:s0-
s0:c0.c1023,fd=5))
udp    ESTAB      0      0         ::1:49481                   ::1:49481                 
users:
(("postgres",pid=2766,proc_ctx=unconfined_u:unconfined_r:unconfined_t:s0-
s0:c0.c1023,fd=8),
("postgres",pid=2765,proc_ctx=unconfined_u:unconfined_r:unconfined_t:s0-
s0:c0.c1023,fd=8),
("postgres",pid=2764,proc_ctx=unconfined_u:unconfined_r:unconfined_t:s0-
s0:c0.c1023,fd=8),
("postgres",pid=2763,proc_ctx=unconfined_u:unconfined_r:unconfined_t:s0-
s0:c0.c1023,fd=8),
("postgres",pid=2762,proc_ctx=unconfined_u:unconfined_r:unconfined_t:s0-
s0:c0.c1023,fd=8),
("postgres",pid=2760,proc_ctx=unconfined_u:unconfined_r:unconfined_t:s0-
s0:c0.c1023,fd=8))
tcp    LISTEN     0      128    127.0.0.1:postgres              *:*                     
users:
(("postgres",pid=2760,proc_ctx=unconfined_u:unconfined_r:unconfined_t:s0-
s0:c0.c1023,fd=4))
tcp    LISTEN     0      128       ::1:postgres             :::*                     
users:
(("postgres",pid=2760,proc_ctx=unconfined_u:unconfined_r:unconfined_t:s0-
s0:c0.c1023,fd=3))
-------------------------------------------

Regards,

John





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux