Thread: Postgres does not start, gives no error
HI,
I am facing this peciliar problem.I am using postgres 7.2.2 installed on solaris.
It has been running very well since all the time, until somebody tried to stop it. Using the command
Now it does not start.
On giving the start command its says:
/home/data/www/pg7/bin/pg_ctl: 5432: not found
postmaster successfully started
postmaster successfully started
But when i check the status, it says postmaster is not running.
Also, if I try to stop it, i get the expected error:
pg_ctl: cannot find /home/data/www/pg7/data/postmaster.pid
Is postmaster running?
Is postmaster running?
I have realised that when I give the start command, even though the msg is successfully started, the postmaster.pid file is not created..
Am i missing something.?
Any help will be appreciated.
On 03/09/2008 20:11, Akhtar Yasmin-B05532 wrote: > I am facing this peciliar problem.I am using postgres 7.2.2 installed on > solaris. I know this isn't helpful to your particular problem, but 7.2.* is VERY old - in fact, I don't think it's even maintained any more. Also, the command you used to start PG didn't come though in your email - can you re-post it please? Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------
Hi, I am using the following command to start the database: pg_ctl start -p 5432 -D /home/data/www/pg7/data Yes I know, 7.2 is a very old version, but that's what we have to work with for now.. :-( -----Original Message----- From: Raymond O'Donnell [mailto:rod@iol.ie] Sent: Wednesday, September 03, 2008 2:54 PM To: Akhtar Yasmin-B05532 Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Postgres does not start, gives no error On 03/09/2008 20:11, Akhtar Yasmin-B05532 wrote: > I am facing this peciliar problem.I am using postgres 7.2.2 installed > on solaris. I know this isn't helpful to your particular problem, but 7.2.* is VERY old - in fact, I don't think it's even maintained any more. Also, the command you used to start PG didn't come though in your email - can you re-post it please? Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------
On Wed, 3 Sep 2008 14:58:45 -0700 "Akhtar Yasmin-B05532" <B05532@freescale.com> wrote: > > Hi, > > I am using the following command to start the database: > > pg_ctl start -p 5432 -D /home/data/www/pg7/data > > Yes I know, 7.2 is a very old version, but that's what we have to work > with for now.. So what does your logging say? Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
On Wed, 3 Sep 2008 15:19:25 -0700 "Akhtar Yasmin-B05532" <B05532@freescale.com> wrote: > > It says, > pg_ctl: 5432: not found > postmaster successfully started pg_ctl doesn't take a -p argument for the port. -p is reserved for the path to the postmaster. Try: pg_ctl -D /home/data/www/pg7/data start Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
Even the command pg_ctl -D /home/data/www/pg7/data start Does not start the server, I mean the message I get on running the command, is: postmaster successfully started But the status still shows, pg_ctl: postmaster or postgres is not running Also when I try to access psql, it gives 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"? -----Original Message----- From: Joshua Drake [mailto:jd@commandprompt.com] Sent: Wednesday, September 03, 2008 3:25 PM To: Akhtar Yasmin-B05532 Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Postgres does not start, gives no error On Wed, 3 Sep 2008 15:19:25 -0700 "Akhtar Yasmin-B05532" <B05532@freescale.com> wrote: > > It says, > pg_ctl: 5432: not found > postmaster successfully started pg_ctl doesn't take a -p argument for the port. -p is reserved for the path to the postmaster. Try: pg_ctl -D /home/data/www/pg7/data start Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
It says, pg_ctl: 5432: not found postmaster successfully started But when I check the status, by using the command pg_ctl status, Its says, pg_ctl: postmaster or postgres is not running Any idea when the postmaster.pid file is created?, because after giving the start command I cannot see the .pid file in the directory it is supposed to be. Logically, I am assuming that, when the start command is given, pg_ctl start, the postmaster.pid file gets created. But this does not happen in my case, is there a way to debug, whether any script has gotten corrupted? -----Original Message----- From: Joshua Drake [mailto:jd@commandprompt.com] Sent: Wednesday, September 03, 2008 3:13 PM To: Akhtar Yasmin-B05532 Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Postgres does not start, gives no error On Wed, 3 Sep 2008 14:58:45 -0700 "Akhtar Yasmin-B05532" <B05532@freescale.com> wrote: > > Hi, > > I am using the following command to start the database: > > pg_ctl start -p 5432 -D /home/data/www/pg7/data > > Yes I know, 7.2 is a very old version, but that's what we have to work > with for now.. So what does your logging say? Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
On Wed, 3 Sep 2008 15:34:26 -0700 "Akhtar Yasmin-B05532" <B05532@freescale.com> wrote: > Even the command pg_ctl -D /home/data/www/pg7/data start > Does not start the server, I mean the message I get on running the > command, is: > postmaster successfully started O.k. what does the log say? Joshua D. Drake > > But the status still shows, > pg_ctl: postmaster or postgres is not running > > Also when I try to access psql, it gives 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"? > > > > -----Original Message----- > From: Joshua Drake [mailto:jd@commandprompt.com] > Sent: Wednesday, September 03, 2008 3:25 PM > To: Akhtar Yasmin-B05532 > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Postgres does not start, gives no error > > On Wed, 3 Sep 2008 15:19:25 -0700 > "Akhtar Yasmin-B05532" <B05532@freescale.com> wrote: > > > > > It says, > > pg_ctl: 5432: not found > > postmaster successfully started > > pg_ctl doesn't take a -p argument for the port. -p is reserved for the > path to the postmaster. Try: > > pg_ctl -D /home/data/www/pg7/data start > > Joshua D. Drake > > > -- > The PostgreSQL Company since 1997: http://www.commandprompt.com/ > PostgreSQL Community Conference: http://www.postgresqlconference.org/ > United States PostgreSQL Association: http://www.postgresql.us/ Donate > to the PostgreSQL Project: http://www.postgresql.org/about/donate > > > -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
The log says, postmaster successfully started But I don't think its started as, while connecting to db, I get the following error in the logs as, 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"? -----Original Message----- From: Joshua Drake [mailto:jd@commandprompt.com] Sent: Wednesday, September 03, 2008 3:45 PM To: Akhtar Yasmin-B05532 Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Postgres does not start, gives no error On Wed, 3 Sep 2008 15:34:26 -0700 "Akhtar Yasmin-B05532" <B05532@freescale.com> wrote: > Even the command pg_ctl -D /home/data/www/pg7/data start Does not > start the server, I mean the message I get on running the command, is: > postmaster successfully started O.k. what does the log say? Joshua D. Drake > > But the status still shows, > pg_ctl: postmaster or postgres is not running > > Also when I try to access psql, it gives 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"? > > > > -----Original Message----- > From: Joshua Drake [mailto:jd@commandprompt.com] > Sent: Wednesday, September 03, 2008 3:25 PM > To: Akhtar Yasmin-B05532 > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Postgres does not start, gives no error > > On Wed, 3 Sep 2008 15:19:25 -0700 > "Akhtar Yasmin-B05532" <B05532@freescale.com> wrote: > > > > > It says, > > pg_ctl: 5432: not found > > postmaster successfully started > > pg_ctl doesn't take a -p argument for the port. -p is reserved for the > path to the postmaster. Try: > > pg_ctl -D /home/data/www/pg7/data start > > Joshua D. Drake > > > -- > The PostgreSQL Company since 1997: http://www.commandprompt.com/ > PostgreSQL Community Conference: http://www.postgresqlconference.org/ > United States PostgreSQL Association: http://www.postgresql.us/ Donate > to the PostgreSQL Project: http://www.postgresql.org/about/donate > > > -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
"Akhtar Yasmin-B05532" <B05532@freescale.com> writes: > The log says, > postmaster successfully started That's not the postmaster's log, that's just pg_ctl saying it managed to find and exec the postmaster. I speculate that you are sending the log to /dev/null which is why you cannot find out anything about what's wrong. You might try invoking the postmaster manually: postmaster -D whateveritwas which should let the error message come out on your terminal. regards, tom lane PS: please don't top post.
Hi, Thanks for the prompt reply, I tried postmaster -D /home/data/www/pg7/data, but the error message still doesn't appear. Nothing really happens after this command. Is there a way I can find where the errors are logging..? Thanks n regards -----Original Message----- You might try invoking the postmaster manually: postmaster -D whateveritwas which should let the error message come out on your terminal. regards, tom lane PS: please don't top post.
"Akhtar Yasmin-B05532" <B05532@freescale.com> writes: > I tried postmaster -D /home/data/www/pg7/data, but the error message > still doesn't appear. Maybe you have it configured to log to syslog? Look in postgresql.conf. regards, tom lane
--- On Wed, 9/3/08, Akhtar Yasmin-B05532 <B05532@freescale.com> wrote: > From: Akhtar Yasmin-B05532 <B05532@freescale.com> > Subject: Re: [GENERAL] Postgres does not start, gives no error > To: "Tom Lane" <tgl@sss.pgh.pa.us> > Cc: "Joshua Drake" <jd@commandprompt.com>, pgsql-general@postgresql.org > Date: Wednesday, September 3, 2008, 11:22 PM > Hi, > Thanks for the prompt reply, > > I tried postmaster -D /home/data/www/pg7/data, but the > error message > still doesn't appear. > Nothing really happens after this command. > Is there a way I can find where the errors are logging..? > > Thanks n regards > check the log of the OS and the permissions of the directory /home/data/www/pg7/data > -----Original Message----- > You might try invoking the postmaster manually: > > postmaster -D whateveritwas > > which should let the error message come out on your > terminal. > > regards, tom lane > > PS: please don't top post. > > -- > Sent via pgsql-general mailing list > (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general
--- On Wed, 9/3/08, Akhtar Yasmin-B05532 <B05532@freescale.com> wrote: > From: Akhtar Yasmin-B05532 <B05532@freescale.com> > Subject: [GENERAL] Postgres does not start, gives no error > To: pgsql-general@postgresql.org > Date: Wednesday, September 3, 2008, 7:11 PM > HI, > > I am facing this peciliar problem.I am using postgres 7.2.2 > installed on > solaris. > It has been running very well since all the time, until > somebody tried > to stop it. Using the command > > Now it does not start. > On giving the start command its says: > > /home/data/www/pg7/bin/pg_ctl: 5432: not found > postmaster successfully started > > But when i check the status, it says postmaster is not > running. > > Also, if I try to stop it, i get the expected error: > > pg_ctl: cannot find /home/data/www/pg7/data/postmaster.pid > Is postmaster running? exist the file postmaster.pid in your directory? > > I have realised that when I give the start command, even > though the msg > is successfully started, the postmaster.pid file is not > created.. > > Am i missing something.? > Any help will be appreciated.
> exist the file postmaster.pid in your directory? No the postmaster.pid does not exist in the directory, even when I start the server, it does not appear, I am assuming, that this file is present only when postmaster in running. > check the log of the OS and the permissions of the directory /home/data/www/pg7/data I cannot check the logs, as we are not logging postgres, also the directory permissions for /home/data/www/pg7/data is 700 Thanks..
On Thu, Sep 4, 2008 at 12:53 PM, Akhtar Yasmin-B05532 <B05532@freescale.com> wrote: > >> exist the file postmaster.pid in your directory? > No the postmaster.pid does not exist in the directory, even when > I start the server, it does not appear, I am assuming, that this file is > present only when postmaster in running. > >> check the log of the OS and the permissions of the directory > /home/data/www/pg7/data > > I cannot check the logs, as we are not logging postgres, also the > directory permissions for > /home/data/www/pg7/data is 700 Can you reconfigure postgresql to log to stderr for a minute and then try to start it in single user mode and see what it says?
> Maybe you have it configured to log to syslog? Look in postgresql.conf. > regards, tom lane HI, This is regarding the postgres issue.. We are not maintaining any logs for the postgres stop/start. So it becomes a bit problematic, to debug.. These are the steps we are following and the results: postmaster -D /home/data/www/pg7/data Does not start postgress, and no msg given. pg_ctl start /home/data/www/pg7/data Does not start postgres but gives a msg that "Poatgres is started successfully" I als0 tried the following commands, postmaster -D /home/data/www/pg7/data >logfile 2>&1 & It creates a file "logfile". But does not log anything there. Does not start postgress, and no msg given. pg_ctl start /home/data/www/pg7/data -l logfile It creates a file "logfile". But does not log anything there. Does not start postgres but gives a msg that "Poatgres is started successfully" I am really stuck here. And need to get a way thru all of this. Any suggestions will be really appreciated. Thanks.
On Sep 4, 2008, at 11:34 AM, Akhtar Yasmin-B05532 wrote: > I am really stuck here. And need to get a way thru all of this. > Any suggestions will be really appreciated. Have you confirmed that the user that you are logged in as when you attempt to start Postgres has write access to /home/data/www/pg7/data?
On Thursday 04 September 2008 3:32:55 pm Christophe wrote: > On Sep 4, 2008, at 11:34 AM, Akhtar Yasmin-B05532 wrote: > > I am really stuck here. And need to get a way thru all of this. > > Any suggestions will be really appreciated. > > Have you confirmed that the user that you are logged in as when you > attempt to start Postgres has write access to /home/data/www/pg7/data? In these sort of situations I do a one step at a time approach. 1) Verify you have only one installation of Postgres. a) For instance use find to determine if there is more than one pg_ctl b) Look for multiple copies of postgresql.conf and pg_hba.conf 2) Verify that there is actually data in /home/data/www/pg7/data 3) Go through postgresql.conf and pg_hba.conf to check they are valid. a)If possible post the contents here to help with the troubleshooting. b) As was suggested turn on logging in postgresql.conf. 4) When you do this: pg_ctl start /home/data/www/pg7/data Does not start postgres but gives a msg that "Poatgres is started successfully" Check for a Postgres process running. I have not used Solaris, but I am thinking the equivalent of ps ax|grep post. 5) In your original post you started with: "I am facing this peciliar problem.I am using postgres 7.2.2 installed on solaris. It has been running very well since all the time, until somebody tried to stop it. Using the command " In the version I got the stop command was not shown. What was used to stop Postgres? 6) If there is a startup script what does it contain? Hope this helps, -- Adrian Klaver aklaver@comcast.net
Hi, I 've finally been able to solve my problem. There were two errors, 1) The postgres in the data directory had gotten overwritten, so none of the scripts were running. I found out this, when I tried making another instance of data. The initdb was not working. As well asa other scipts. Had to fix this. 2) Also,the user which I was using had insufficient permissions. Thanks a lot for all you suggestions. -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Adrian Klaver Sent: Thursday, September 04, 2008 6:51 PM To: pgsql-general@postgresql.org Cc: Christophe Subject: Re: [GENERAL] Postgres does not start, gives no error On Thursday 04 September 2008 3:32:55 pm Christophe wrote: > On Sep 4, 2008, at 11:34 AM, Akhtar Yasmin-B05532 wrote: > > I am really stuck here. And need to get a way thru all of this. > > Any suggestions will be really appreciated. > > Have you confirmed that the user that you are logged in as when you > attempt to start Postgres has write access to /home/data/www/pg7/data? In these sort of situations I do a one step at a time approach. 1) Verify you have only one installation of Postgres. a) For instance use find to determine if there is more than one pg_ctl b) Look for multiple copies of postgresql.conf and pg_hba.conf 2) Verify that there is actually data in /home/data/www/pg7/data 3) Go through postgresql.conf and pg_hba.conf to check they are valid. a)If possible post the contents here to help with the troubleshooting. b) As was suggested turn on logging in postgresql.conf. 4) When you do this: pg_ctl start /home/data/www/pg7/data Does not start postgres but gives a msg that "Poatgres is started successfully" Check for a Postgres process running. I have not used Solaris, but I am thinking the equivalent of ps ax|grep post. 5) In your original post you started with: "I am facing this peciliar problem.I am using postgres 7.2.2 installed on solaris. It has been running very well since all the time, until somebody tried to stop it. Using the command " In the version I got the stop command was not shown. What was used to stop Postgres? 6) If there is a startup script what does it contain? Hope this helps, -- Adrian Klaver aklaver@comcast.net -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general