Unix Technical Forum

Server Startup Error

This is a discussion on Server Startup Error within the Pgsql Performance forums, part of the PostgreSQL category; --> Hi List, Machine was down due to some hardware problem. After then when i issue this command /usr/local/pgsql/bin/psql -l ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 09:16 AM
Gauri Kanekar
 
Posts: n/a
Default Server Startup Error

Hi List,

Machine was down due to some hardware problem.

After then when i issue this command /usr/local/pgsql/bin/psql -l
its giving me the following error

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

Can anybody tell me what going wrong??

--
Regards
Gauri

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 09:16 AM
Rodrigo Gonzalez
 
Posts: n/a
Default Re: Server Startup Error

Gauri Kanekar wrote:
> Hi List,
>
> Machine was down due to some hardware problem.
>
> After then when i issue this command /usr/local/pgsql/bin/psql -l
> its giving me the following error
>
> 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"?
>
> Can anybody tell me what going wrong??
>
> --
> Regards
> Gauri


Postgres is not running, start it and try again

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 09:16 AM
Gauri Kanekar
 
Posts: n/a
Default Re: Server Startup Error

Thanks,
But how to start postgres server


On 2/26/07, Rodrigo Gonzalez <rjgonzale@gmail.com> wrote:
>
> Gauri Kanekar wrote:
> > Hi List,
> >
> > Machine was down due to some hardware problem.
> >
> > After then when i issue this command /usr/local/pgsql/bin/psql -l
> > its giving me the following error
> >
> > 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"?
> >
> > Can anybody tell me what going wrong??
> >
> > --
> > Regards
> > Gauri

>
> Postgres is not running, start it and try again
>




--
Regards
Gauri

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2008, 09:16 AM
Richard Huxton
 
Posts: n/a
Default Re: Server Startup Error

Gauri Kanekar wrote:
> Hi List,
>
> Machine was down due to some hardware problem.
>
> After then when i issue this command /usr/local/pgsql/bin/psql -l
> its giving me the following error
>
> 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"?
>
> Can anybody tell me what going wrong??


Well, it's either looking in the wrong place or the server isn't
actually running.

1. Do your startup scripts start PG?
2. Is there a server process? "ps auxw | grep postgres"
3. What do your logfiles say?

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-19-2008, 09:16 AM
Rodrigo Gonzalez
 
Posts: n/a
Default Re: Server Startup Error

Gauri Kanekar wrote:
> Thanks,
> But how to start postgres server
>
>
> On 2/26/07, *Rodrigo Gonzalez* <rjgonzale@gmail.com
> <mailto:rjgonzale@gmail.com>> wrote:
>
> Gauri Kanekar wrote:
> > Hi List,
> >
> > Machine was down due to some hardware problem.
> >
> > After then when i issue this command /usr/local/pgsql/bin/psql -l
> > its giving me the following error
> >
> > 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"?
> >
> > Can anybody tell me what going wrong??
> >
> > --
> > Regards
> > Gauri

>
> Postgres is not running, start it and try again
>
>
>
>
> --
> Regards
> Gauri


which OS?

compiled from source?

did you install from package?

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-19-2008, 09:16 AM
Richard Huxton
 
Posts: n/a
Default Re: Server Startup Error


Note - try to cc: the mailing list, I don't always read this inbox

Gauri Kanekar wrote:
> On 2/26/07, Richard Huxton <dev@archonet.com> wrote:
>>
>> Gauri Kanekar wrote:
>> > Hi List,
>> >
>> > Machine was down due to some hardware problem.
>> >
>> > After then when i issue this command /usr/local/pgsql/bin/psql -l
>> > its giving me the following error
>> >
>> > 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"?
>> >
>> > Can anybody tell me what going wrong??

>>
>> Well, it's either looking in the wrong place or the server isn't
>> actually running.
>>
>> 1. Do your startup scripts start PG?

>
> Yes


OK - so we know it should have started, which means the logs should say
something about our problem.

> 2. Is there a server process? "ps auxw | grep postgres"
>
> This is the result given by the command
> root 8907 0.0 0.1 37496 2640 ? Ss 03:47 0:00 sshd:
> postgres [priv]
> postgres 8910 0.0 0.0 37636 1684 ? S 03:47 0:00 sshd:
> postgres@pts/1
> postgres 8911 0.0 0.1 10152 2564 pts/1 Ss+ 03:47 0:00 -bash
> root 9470 0.0 0.1 37500 2644 ? Ss 04:28 0:00 sshd:
> postgres [priv]
> postgres 9473 0.0 0.0 37640 1688 ? S 04:28 0:00 sshd:
> postgres@pts/2
> postgres 9474 0.0 0.1 10104 2412 pts/2 Ss 04:28 0:00 -bash
> postgres 9724 0.0 0.0 3496 892 pts/2 R+ 04:44 0:00 ps auxw
> postgres 9725 0.0 0.0 3868 784 pts/2 R+ 04:44 0:00 grep
> postgres


Hmm - nothing there but "ssh" connections. So, it's not started, which
is why psql is complaining.

> 3. What do your logfiles say?
>
>
> HINT: In a moment you should be able to reconnect to the database and
> repeat your command.
> LOG: database system was interrupted at 2007-02-23 20:14:24 IST
> LOG: could not open file "pg_xlog/00000001000000390000001A" (log file 57,
> segment 26): No such file or directory
> LOG: invalid primary checkpoint record
> LOG: could not open file "pg_xlog/000000010000003900000017" (log file 57,
> segment 23): No such file or directory
> LOG: invalid secondary checkpoint record
> PANIC: could not locate a valid checkpoint record
> LOG: startup process (PID 9057) was terminated by signal 6
> LOG: aborting startup due to startup process failure
> FATAL: pre-existing shared memory block (key 5432001, ID 1900546) is still
> in use
> HINT: If you're sure there are no old server processes still running,
> remove the shared memory block with the command "ipcclean", "ipcrm", or
> just
> delete the file "postmaster.pid".


OK - this last bit is the first thing to deal with. Find your
postmaster.pid file and delete it. Your postmaster.pid file should be in
your data directory - try "locate postmaster.pid" or "find /usr/local/
-name postmaster.pid".

Then restart postgresql (as root "/etc/init.d/postgresql start" or
similar) and check the logs again.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:22 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com