pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Trouble starting server
3+ messages / 2 participants
[nested] [flat]

* Trouble starting server
@ 2006-02-16 18:23  Barry Moore <barry.moore@genetics.utah.edu>
  0 siblings, 1 reply; 3+ messages in thread

From: Barry Moore @ 2006-02-16 18:23 UTC (permalink / raw)
  To: pgsql-admin

I have a PostgreSQL 7.4.8 installation running on RedHat Enterprise 4  
that I've been using for some time now, and haven't had any trouble  
with.  Recently the system went down, and now I can't seem to restart  
it.  I've tried running these commands as postgres user:

nohup postmaster -D /var/lib/pgsql/data > /var/lib/pgsql/logfile 2>&1 &
and
pg_ctl start -D /var/lib/pgsql/data -l /var/lib/pgsql/logfile

and they both reply that the 'postmaster successfully started', but  
then in the logfile I find 'FATAL:  could not create lock file "/ 
tmp/.s.PGSQL.5432.lock": Permission denied'.  And if I try to run  
psql I get:

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"?

So with my minimal system admin skills I'm guessing that '/ 
tmp/.s.PGSQL.5432' is lock file where the system puts a lock on port  
5432 for postmaster to listen, but the pg_ctl and postmaster commands  
can't create that file because /tmp is writeable only by root (drwxr- 
xr-x   11 root root  4096 Feb 16 11:06 tmp).  Of course I can't start  
the postmaster as root, so I'm a bit perplexed as to what to do, and  
why I never had this problem before.

Any suggestions.

Barry



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Trouble starting server
@ 2006-02-16 18:30  Jeff Frost <jeff@frostconsultingllc.com>
  parent: Barry Moore <barry.moore@genetics.utah.edu>
  0 siblings, 1 reply; 3+ messages in thread

From: Jeff Frost @ 2006-02-16 18:30 UTC (permalink / raw)
  To: Barry Moore <barry.moore@genetics.utah.edu>; +Cc: pgsql-admin

On Thu, 16 Feb 2006, Barry Moore wrote:

> So with my minimal system admin skills I'm guessing that '/tmp/.s.PGSQL.5432' 
> is lock file where the system puts a lock on port 5432 for postmaster to 
> listen, but the pg_ctl and postmaster commands can't create that file because 
> /tmp is writeable only by root (drwxr-xr-x   11 root root  4096 Feb 16 11:06 
> tmp).  Of course I can't start the postmaster as root, so I'm a bit perplexed 
> as to what to do, and why I never had this problem before.

You need to change the permissions on /tmp.  I'd be curious to know how it got 
this way.  Has anyone done chmods on /tmp?  It should be 1777/drwxrwxrwt, so a 
chmod 1777 /tmp should fix it 
for you.


-- 
Jeff Frost, Owner 	<jeff@frostconsultingllc.com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Trouble starting server
@ 2006-02-16 18:40  Barry Moore <barry.moore@genetics.utah.edu>
  parent: Jeff Frost <jeff@frostconsultingllc.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Barry Moore @ 2006-02-16 18:40 UTC (permalink / raw)
  To: Jeff Frost <jeff@frostconsultingllc.com>; +Cc: pgsql-admin

Thanks.  I wasn't sure that I should do that since I didn't change  
those permissions since I hadn't done anything with it.  There is a  
new user who is taking over admin of this machine, so I'll have to  
ask if the did anything to affect this.

Barry

On Feb 16, 2006, at 11:30 AM, Jeff Frost wrote:

> On Thu, 16 Feb 2006, Barry Moore wrote:
>
>> So with my minimal system admin skills I'm guessing that '/ 
>> tmp/.s.PGSQL.5432' is lock file where the system puts a lock on  
>> port 5432 for postmaster to listen, but the pg_ctl and postmaster  
>> commands can't create that file because /tmp is writeable only by  
>> root (drwxr-xr-x   11 root root  4096 Feb 16 11:06 tmp).  Of  
>> course I can't start the postmaster as root, so I'm a bit  
>> perplexed as to what to do, and why I never had this problem before.
>
> You need to change the permissions on /tmp.  I'd be curious to know  
> how it got this way.  Has anyone done chmods on /tmp?  It should be  
> 1777/drwxrwxrwt, so a chmod 1777 /tmp should fix it for you.
>
>
> -- 
> Jeff Frost, Owner 	<jeff@frostconsultingllc.com>
> Frost Consulting, LLC 	http://www.frostconsultingllc.com/
> Phone: 650-780-7908	FAX: 650-649-1954




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-02-16 18:40 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-16 18:23 Trouble starting server Barry Moore <barry.moore@genetics.utah.edu>
2006-02-16 18:30 ` Jeff Frost <jeff@frostconsultingllc.com>
2006-02-16 18:40   ` Barry Moore <barry.moore@genetics.utah.edu>

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