invalid data in PID file
Hi,
I'm trying to start my postgres server using
#> pg_ctl start -D /usr/local/pgsql/abc
and get an error like:
invalid data in PID file "/usr/local/pgsql/abc/postmaster.pid"
can anyone comment whats wrong.
My postmaster.pid file is empty at the time when i run this command.
Regards,
Jas
On Wed, Oct 11, 2006 at 02:50:59PM -0400, J S B wrote:
I'm trying to start my postgres server using
#> pg_ctl start -D /usr/local/pgsql/abc
and get an error like:
invalid data in PID file "/usr/local/pgsql/abc/postmaster.pid"
can anyone comment whats wrong.
My postmaster.pid file is empty at the time when i run this command.
I think the fact that it's empty may be what's wrong. It should have
something in it.
How did you manage to get into that state?
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
Show quoted text
From each according to his ability. To each according to his ability to litigate.
i never touched it. when i opened it to check the stuff inside, found it
empty.
What should i do now?
Show quoted text
On 10/11/06, Martijn van Oosterhout <kleptog@svana.org> wrote:
On Wed, Oct 11, 2006 at 02:50:59PM -0400, J S B wrote:
I'm trying to start my postgres server using
#> pg_ctl start -D /usr/local/pgsql/abc
and get an error like:
invalid data in PID file "/usr/local/pgsql/abc/postmaster.pid"
can anyone comment whats wrong.
My postmaster.pid file is empty at the time when i run this command.
I think the fact that it's empty may be what's wrong. It should have
something in it.How did you manage to get into that state?
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/From each according to his ability. To each according to his ability to
litigate.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFFLT5uIB7bNG8LQkwRArQGAJkBQ3lvZwdoQ1MRXIJVGCMBA3NoKwCeLrGj
EUBt6BZ7QOgxzrf89BEYpyI=
=xQpd
-----END PGP SIGNATURE-----
I deleted postmaster.pid file and got rid of the previous error.
Now its a new error which say something as follows after i try starting my
postgres server usring pg_ctl start -D /usr/local/pgsql/jsbali :-
postmaster starting
LOG: could not bind IPv4 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a
few seconds and retry.
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission
denied
Can you please tell me what is this all about?
Jas
Show quoted text
On 10/11/06, J S B <jsbali@gmail.com> wrote:
i never touched it. when i opened it to check the stuff inside, found it
empty.
What should i do now?On 10/11/06, Martijn van Oosterhout < kleptog@svana.org> wrote:
On Wed, Oct 11, 2006 at 02:50:59PM -0400, J S B wrote:
I'm trying to start my postgres server using
#> pg_ctl start -D /usr/local/pgsql/abc
and get an error like:
invalid data in PID file "/usr/local/pgsql/abc/postmaster.pid"
can anyone comment whats wrong.
My postmaster.pid file is empty at the time when i run this command.
I think the fact that it's empty may be what's wrong. It should have
something in it.How did you manage to get into that state?
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/From each according to his ability. To each according to his ability
to litigate.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFFLT5uIB7bNG8LQkwRArQGAJkBQ3lvZwdoQ1MRXIJVGCMBA3NoKwCeLrGj
EUBt6BZ7QOgxzrf89BEYpyI=
=xQpd
-----END PGP SIGNATURE-----
"J S B" <jsbali@gmail.com> writes:
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission
denied
Can you please tell me what is this all about?
It looks to me like you have, or had, another postmaster running under a
different userid. Perhaps you should back up to the beginning and tell
us what you've been doing with this installation.
regards, tom lane
Tom Lane wrote:
"J S B" <jsbali@gmail.com> writes:
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission
deniedCan you please tell me what is this all about?
It looks to me like you have, or had, another postmaster running under a
different userid. Perhaps you should back up to the beginning and tell
us what you've been doing with this installation.regards, tom lane
IIRC, I had that happen on a botched upgrade of postgres. Even if I did
a reinstall it wasn't enough. Under Debian I had to try upgrading again,
then do a "complete uninstall" (or something similar), then a fresh
reinstall and it finally worked again. It happened a couple of times and
I never figured out why. Hasn't happened lately though.
Madi
Actually i've been trying to setup my postgres database in a new machine.
the machine that i'm using right now is goin to die very soon. So i was
trying to restore it in another machine but before that I have to install
postgres in this new machine.
I installed postgres successfully, created a DB cluster using initdb comand
after creating a user account that would use postgres and made it the owned
of the location where DB was initialized.
Then I started my postgres service using
pg_ctl start -D /usr/local/pgsql/jsbali
That was the very first time i started it and it did not give me any errors.
After that I created a new DB server using PGAdmin3 and the server was
created successfully.
When i tried connecting to this server, i gave me an error Ident
Authentication failed and wanted me to do appropriate changes in pg_hba.conf
file
However, in pg_hba.conf file, i have the settings for the trusted
connection.
pg_hba.conf and postgresql.conf files i copied from my old Db server and
overwrote on the ones that were created as a result of initidb in the new
database.
Right after this point, pg_ctl start, stop and reload doesn't work at all.
There was some problem with postmaster.pid file, so i just removed it.
The last error that i got after tryin to start postgres is :
could not bind IPv6 socket: Address already in use.
HINT: Is another postmaster already running on port 5432? If not , wait a
few seconds and retry.
LOG: could not bind IPv$ socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not , wait a
few seconds and retry.
WARNING: could not create listen socket for "*"
FATAL: could not create any TCP/IP sockets
Show quoted text
On 10/11/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"J S B" <jsbali@gmail.com> writes:
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission
deniedCan you please tell me what is this all about?
It looks to me like you have, or had, another postmaster running under a
different userid. Perhaps you should back up to the beginning and tell
us what you've been doing with this installation.regards, tom lane
"J S B" <jsbali@gmail.com> writes:
There was some problem with postmaster.pid file, so i just removed it.
Without bothering to stop the old postmaster first, I take it.
At this point your best bet is to find out the PID of the old postmaster
with "ps" and then kill it with "kill -INT <pid>". I suspect you've
also been sloppy about which userid you've been starting the postmaster
under ... you have to be consistent about that.
regards, tom lane
Well, I've been very particular with the user id. There's just one single
user ID am working on my postgres with.
when i start the postgres, it creates the follwoing processes for postgres:
1 S jsbali 4034 4033 0 76 0 - 2489 - 15:41 pts/2 00:00:00
postgres: logger process
1 S jsbali 4036 4033 0 75 0 - 5042 - 15:41 pts/2 00:00:00
postgres: writer process
1 S jsbali 4037 4033 0 76 0 - 2739 - 15:41 pts/2 00:00:00
postgres: stats buffer process
1 S jsbali 4038 4037 0 83 0 - 2547 - 15:41 pts/2 00:00:00
postgres: stats collector process
and gives the follwoing error
LOG: could not bind IPv4 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a
few seconds and retry.
At this point I would have no option but to kill -INT 4033. I do a ps -elf |
grep jsbali again after this kill and i have nothing for postgres running.
Good enough.
Then i try to start postgres again and it gives me the same error:
LOG: could not bind IPv4 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a
few seconds and retry.
It ends up being a cyclic problem.
Don't know how to get rid of it now.
Thanks,
Jas
Show quoted text
On 10/11/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"J S B" <jsbali@gmail.com> writes:
There was some problem with postmaster.pid file, so i just removed it.
Without bothering to stop the old postmaster first, I take it.
At this point your best bet is to find out the PID of the old postmaster
with "ps" and then kill it with "kill -INT <pid>". I suspect you've
also been sloppy about which userid you've been starting the postmaster
under ... you have to be consistent about that.regards, tom lane
"J S B" <jsbali@gmail.com> writes:
Then i try to start postgres again and it gives me the same error:
LOG: could not bind IPv4 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a
few seconds and retry.
Um, have you tried waiting a bit as the hint suggests?
If the port is still claimed after a minute or two, then there must be
some process holding onto it. netstat and/or lsof might help you find
out what.
regards, tom lane