postgres not starting

Started by Azimuddin Mohammedabout 8 years ago8 messagesgeneral
Jump to latest
#1Azimuddin Mohammed
azimeiu@gmail.com

Hello,
I am unable to start postgres on one of the server
I am getting below error "HINT: is another postmaster already running on
port 5432, if not wait a few seconds and retry"
I checked the processes nothing is running with postgres

I think the error caused because I removed everything under /data
directory before stopping the server.
Can someone help.

--

Regards,
Azim

#2geoff hoffman
geoff@rxmg.com
In reply to: Azimuddin Mohammed (#1)
Re: postgres not starting

Restore a backup or reinstall Postgres. The default Postgres data tables need to be there and owned by the user Postgres runs as.

Show quoted text

On Feb 15, 2018, at 5:21 PM, Azimuddin Mohammed <azimeiu@gmail.com> wrote:

Hello,
I am unable to start postgres on one of the server
I am getting below error "HINT: is another postmaster already running on port 5432, if not wait a few seconds and retry"
I checked the processes nothing is running with postgres

I think the error caused because I removed everything under /data directory before stopping the server.
Can someone help.

--

Regards,
Azim

#3Alan Hodgson
ahodgson@lists.simkin.ca
In reply to: Azimuddin Mohammed (#1)
Re: postgres not starting

On Thu, 2018-02-15 at 18:21 -0600, Azimuddin Mohammed wrote:

Hello,
I am unable to start postgres on one of the server
I am getting below error "HINT: is another postmaster already running
on port 5432, if not wait a few seconds and retry"
I checked the processes nothing is running with postgres

I think the error caused because I removed everything under /data
directory before stopping the server.
Can someone help.

kill -9 the old processes. The old postmaster is holding onto the port.
And probably some of the old file handles, too, so you might want to
re-init the new database cluster after really cleaning up the old one.

#4Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Alan Hodgson (#3)
Re: postgres not starting

Alan Hodgson wrote:

On Thu, 2018-02-15 at 18:21 -0600, Azimuddin Mohammed wrote:

Hello,
I am unable to start postgres on one of the server
I am getting below error "HINT: is another postmaster already running on port 5432, if not wait a few seconds and retry"
I checked the processes nothing is running with postgres

I think the error caused because I removed everything under /data directory before stopping the server.
Can someone help.

kill -9 the old processes. The old postmaster is holding onto the port.
And probably some of the old file handles, too, so you might want to re-init the new database
cluster after really cleaning up the old one.

This seems excessive - maybe the server he wants to start is already
running and there is no need to crash or wipe it.

To give a better answer we would have to know which operating system
it is, which PostgreSQL version and how it was installed.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

#5Jorge Torralba
jorge.torralba@gmail.com
In reply to: Laurenz Albe (#4)
Re: postgres not starting

The poster writes ....

" I think the error caused because I removed everything under /data
directory before stopping the server. "

If you did remove the data directory, you will need to kill any processes
hanging on then initdb -D /your/data/directory

Without a data directory it will not start.

On Thu, Feb 15, 2018 at 8:51 PM, Laurenz Albe <laurenz.albe@cybertec.at>
wrote:

Alan Hodgson wrote:

On Thu, 2018-02-15 at 18:21 -0600, Azimuddin Mohammed wrote:

Hello,
I am unable to start postgres on one of the server
I am getting below error "HINT: is another postmaster already running

on port 5432, if not wait a few seconds and retry"

I checked the processes nothing is running with postgres

I think the error caused because I removed everything under /data

directory before stopping the server.

Can someone help.

kill -9 the old processes. The old postmaster is holding onto the port.
And probably some of the old file handles, too, so you might want to

re-init the new database

cluster after really cleaning up the old one.

This seems excessive - maybe the server he wants to start is already
running and there is no need to crash or wipe it.

To give a better answer we would have to know which operating system
it is, which PostgreSQL version and how it was installed.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

--
Thanks,

Jorge Torralba
----------------------------

Note: This communication may contain privileged or other confidential
information. If you are not the intended recipient, please do not print,
copy, retransmit, disseminate or otherwise use the information. Please
indicate to the sender that you have received this email in error and
delete the copy you received. Thank You.

#6Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Laurenz Albe (#4)
Re: postgres not starting

I wrote:

Alan Hodgson wrote:

On Thu, 2018-02-15 at 18:21 -0600, Azimuddin Mohammed wrote:

Hello,
I am unable to start postgres on one of the server
I am getting below error "HINT: is another postmaster already running on port 5432, if not wait a few seconds and retry"
I checked the processes nothing is running with postgres

I think the error caused because I removed everything under /data directory before stopping the server.
Can someone help.

kill -9 the old processes. The old postmaster is holding onto the port.
And probably some of the old file handles, too, so you might want to re-init the new database
cluster after really cleaning up the old one.

This seems excessive - maybe the server he wants to start is already
running and there is no need to crash or wipe it.

Apologies - I didn't see the part that "nothing is running".

To find the process that is blocking the port, you can run the following:

lsof -i TCP:5432

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

#7Azimuddin Mohammed
azimeiu@gmail.com
In reply to: Laurenz Albe (#6)
Re: postgres not starting

I do not see anything running

On Feb 15, 2018 11:00 PM, "Laurenz Albe" <laurenz.albe@cybertec.at> wrote:

Show quoted text

I wrote:

Alan Hodgson wrote:

On Thu, 2018-02-15 at 18:21 -0600, Azimuddin Mohammed wrote:

Hello,
I am unable to start postgres on one of the server
I am getting below error "HINT: is another postmaster already

running on port 5432, if not wait a few seconds and retry"

I checked the processes nothing is running with postgres

I think the error caused because I removed everything under /data

directory before stopping the server.

Can someone help.

kill -9 the old processes. The old postmaster is holding onto the port.
And probably some of the old file handles, too, so you might want to

re-init the new database

cluster after really cleaning up the old one.

This seems excessive - maybe the server he wants to start is already
running and there is no need to crash or wipe it.

Apologies - I didn't see the part that "nothing is running".

To find the process that is blocking the port, you can run the following:

lsof -i TCP:5432

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

#8Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Azimuddin Mohammed (#7)
Re: postgres not starting

Azimuddin Mohammed wrote:

I am unable to start postgres on one of the server
I am getting below error "HINT: is another postmaster already running on port 5432, if not wait a few seconds and retry"
I checked the processes nothing is running with postgres

To find the process that is blocking the port, you can run the following:

lsof -i TCP:5432

I do not see anything running

Then the problem is something else.

Try to start PostgreSQL directly as OS user "postgres" with

postgres

(This requires that the environment variable PGDATA is set to the data directory.)

Then post all the messages you see.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com