Thread: 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"?
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
--
Regards
Gauri
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
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
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
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?
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