Re: error while starting database

From: Douglas Toltzman <doug(at)oakstreetsoftware(dot)com>
To: Nitin Saxena <nitinmca05(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: error while starting database
Date: 2007-08-17 14:48:42
Message-ID: 4747A3A3-D583-48FE-980B-4D314010D912@oakstreetsoftware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PostgreSQL version 7.0 is really, really out of date, but as far as I
know, it should still work.

I generally use "ps -ax | grep postges" to see if there is a postgres
process running. Also, I use "netstat -a" to see open sockets and
listening servers.

Have you removed the socket file in /tmp and tried to start the
server? You may also want to check the server log to see if there is
any indication of why it crashed. Once you clean up the residue from
the server that abended, you'll be able to start it again, unless
there are serious problems with the database. I've only seen one
case where I couldn't get the server restarted, though, and that was
after a hard drive failure caused corruption in several files. Even
then, I was able to recover everything.

BTW: the socket file ("/tmp/.s.PGSQL.5432") will be a hidden file.
You'll need to "ls -a /tmp" to see it. You can just "rm -f /
tmp/.s.PGSQL.5432" as root and that should clean it up for you.

p.s. This is not a bug, and even if it was, I'm sure version 7.0 is
no longer supported. You may want to use a different list if you
require additional assistance.

On Aug 17, 2007, at 10:31 AM, Nitin Saxena wrote:

>
>
> I am using postgres 7.0 on linux platform.
> My java application was running fine ,but i got this message
>
> Connection refused. Check that the hostname and port is correct,
> and that the postmaster is r
> unning with the -i flag, which enables TCP/IP networking.
> at org.postgresql.Connection.openConnection(Connection.java:123)
> at org.postgresql.Driver.connect(Driver.java:116)
> at java.sql.DriverManager.getConnection(DriverManager.java:517)
> at java.sql.DriverManager.getConnection(DriverManager.java:177)
> at SendGrpSmpp.readSMPPtable(SendGrpSmpp.java:219)
> at SendGrpSmpp.run(SendGrpSmpp.java:96)
>
>
> When i am connecting as su via su - postgres
> at bash: when i give psql Database Name
>
> It is giving error:
>
> psql: connectDBStart() -- connect() failed: No such file or directory
> Is the postmaster running at 'localhost'
> and accepting connections on Unix socket '5432'?
>
> when i am using pg_ctl status command:
>
> it gives output: pg_ctl: postmaster is running (pid: 776)
> options are:
> /usr/bin/postmaster
> -p 5432
> -D /var/lib/pgsql/data
> -B 64
> -b /usr/bin/postgres
> -i
> -N 32
>
>
> when i am using pg_ctl stop it gives
>
> /usr/bin/pg_ctl: kill: (776) - No such pid
> postmaster successfully shut down.
>
>
> when i am using pg_ctl restart it gives
>
>
> bash-2.04$ pg_ctl restart
> /usr/bin/pg_ctl: kill: (776) - No such pid
> Waiting for postmaster shutting
> down...............................................................pg_
> ctl: postmaster does not shut down
>
>
> when i am giving pg_ctl start:
>
> pg_ctl: It seems another postmaster is running. Try to start
> postmaster anyway.
> FATAL: StreamServerPort: bind() failed: No such file or directory
> Is another postmaster already running on that port?
> If not, remove socket node (/tmp/.s.PGSQL.5432) and retry.
> pg_ctl: Cannot start postmaster. Is another postmaster is running?
> bash-2.04$ /usr/bin/postmaster: cannot create UNIX stream port.
>
>
> Expecting your kind help on urgent.
>
>
> Regards--
> NItin Saxena

Douglas Toltzman
doug(at)oakstreetsoftware(dot)com
(910) 526-5938

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Heyder 2007-08-17 14:52:43 BUG #3548: When quickly switching between databases the server lags behind
Previous Message Nitin Saxena 2007-08-17 14:31:27 error while starting database