Обсуждение: It's dead and won't get up!!

Поиск
Список
Период
Сортировка

It's dead and won't get up!!

От
"KUCHARSKI, DAVID R."
Дата:
It appears that postmaster has died and I am unable to get it up and
running again.  I've tried the nohup line from the man pages with no
success.  I've tried just trying to run #psql dbname Username and get a
failure message that asks if postmaster is running.  It's not! It WAS
earlier, but NOW it's not!

HELP!

thanks
Dave


Re: It's dead and won't get up!!

От
Duane Kehoe
Дата:
KUCHARSKI, DAVID R. wrote:

>It appears that postmaster has died and I am unable to get it up and
>running again.  I've tried the nohup line from the man pages with no
>success.  I've tried just trying to run #psql dbname Username and get a
>failure message that asks if postmaster is running.  It's not! It WAS
>earlier, but NOW it's not!
>
>HELP!
>
>thanks
>Dave
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
Try checking the lock file, we used to have a problem like this occur
from time to time and the only way to get postmaster running again was
to delete this file( .s.PGSQL.5432 ) from /tmp, or do the highly
unsuggested reboot(very bad :-( ).  After that restarting postmaster
should complete successfully

--
____________________________________________________________
Long live the Penguin!!!

Duane Kehoe                             Phone # 414.908.1814
Programmer/Analyst                        Fax # 414.908.1814
Weyco Group, Inc.               Email: dkehoe@weycogroup.com




Re: It's dead and won't get up!!

От
"KUCHARSKI, DAVID R."
Дата:
ok, there was no lock in the /tmp file and I have already tried the REBOOT
with no luck that way either.


Duane Kehoe wrote:

> Try checking the lock file, we used to have a problem like this occur
> from time to time and the only way to get postmaster running again was
> to delete this file( .s.PGSQL.5432 ) from /tmp, or do the highly
> unsuggested reboot(very bad :-( ).  After that restarting postmaster
> should complete successfully


Re: It's dead and won't get up!!

От
"Josh Berkus"
Дата:
David,

> ok, there was no lock in the /tmp file and I have already tried the
> REBOOT
> with no luck that way either.

What command are you using to start postmaster?

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Re: It's dead and won't get up!!

От
Jason Earl
Дата:
Okay, we are probably going to need a little more information than
this.  For example: What version of PostgreSQL are you running?  What
platform are you running it on?  Did you install from source, or did
you use someone else's precompiled binaries?  What does the log file
say?

Generally speaking most PostgreSQL users use some sort of init script
to make sure that PostgreSQL starts, we certainly don't start it from
the command line like you see at the bottom of the postmaster(1) man
page.  In fact there is an entire program 'pg_ctl' that is
specifically designed to do this.  On my debian system I start
PostgreSQL with a command like:

/etc/init.d/postgresql start

And when I used RedHat's RPMs (a long time ago) they had something
similar.

Give us a little more information and we will get your server back up
and running.

Jason

"KUCHARSKI, DAVID R." <dave@iemco.com> writes:

> It appears that postmaster has died and I am unable to get it up and
> running again.  I've tried the nohup line from the man pages with no
> success.  I've tried just trying to run #psql dbname Username and get a
> failure message that asks if postmaster is running.  It's not! It WAS
> earlier, but NOW it's not!
>
> HELP!
>
> thanks
> Dave
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Re: It's dead and won't get up!!

От
"KUCHARSKI, DAVID R."
Дата:
the man page suggested
#nohup postmaster >logfile2>1  &

from a google search they suggested going to the control tab of linuxconf
and trying to restart the service there.  NO LUCK that way.

when I try:
#su postgres
$ postmaster

I get the following:
/usr/bin/postmaster doesn't know where to find database system data.  You
must specify the directory that contains the database system either by
specifying the -D invocation option or by setting the PGDATA environment
variable.

Josh Berkus wrote:

> David,
>
> > ok, there was no lock in the /tmp file and I have already tried the
> > REBOOT
> > with no luck that way either.
>
> What command are you using to start postmaster?
>
> -Josh


Re: It's dead and won't get up!!

От
"Josh Berkus"
Дата:
David,

  > the man page suggested
  > #nohup postmaster >logfile2>1 &

  Stop using the man pages, then. I don't believe that they have been
  maintained for at least 2 years. I've never even heard of the above
  version of running postmaster -- it probably dates back to version
6.0.

  Use the interactive online docs, or the docs in the pgsql/docs folder.
  For your particular problem, see:
  http://www.postgresql.org/idocs/index.php?postmaster-start.html

  -Josh


______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Re: It's dead and won't get up!!

От
Francisco Reyes
Дата:
On Thu, 8 Nov 2001, KUCHARSKI, DAVID R. wrote:

> when I try:
> #su postgres
> $ postmaster
>
> I get the following:
> /usr/bin/postmaster doesn't know where to find database system data.  You
> must specify the directory that contains the database system either by
> specifying the -D invocation option or by setting the PGDATA environment
> variable.

Try "su - postgres".
The error you are seeing is basically a lack of configuration.
I believe there is an OS variable "pgdata" which gets set when the
postgres user is started and this is how the database knows where the
database directory is.


Re: It's dead and won't get up!!

От
"Oliver Elphick"
Дата:
"KUCHARSKI, DAVID R." wrote:
  >the man page suggested
  >#nohup postmaster >logfile2>1  &
  >
  >from a google search they suggested going to the control tab of linuxconf
  >and trying to restart the service there.  NO LUCK that way.
  >
  >when I try:
  >#su postgres
  >$ postmaster
  >
  >I get the following:
  >/usr/bin/postmaster doesn't know where to find database system data.  You
  >must specify the directory that contains the database system either by
  >specifying the -D invocation option or by setting the PGDATA environment
  >variable.

You would do better to use "su - postgres" so as to load the login
environment for postges, which ought to define PGDATA.  If it still doesn't
work you can use -D as suggested by the error message.


As to your original problem, have you perhaps run short of disk space?
WAL now creates its files in 16Mb chunks; see if there is anything
about that in your log files.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "And whosoever liveth and believeth in me shall never
      die. Believest thou this?"    John 11:26



Re: It's dead and won't get up!!

От
"KUCHARSKI, DAVID R."
Дата:
thanks for all of the input everyone.  I believe you have helped lead me to the
problem.  two days ago iI ran out of room on the partition.  Postgres was
running at the time, but complaining about the fact that it was out of room.
so in an effort to make more room I foolishly removed what I thought was a test
db.  that was where postgres looks for its configuration info.  when postgres
died today it wasn't able to find that info for the restart.  If it wouldn't
have died for whatever reason today it would never have needed to locate those
files.  I guess it's time to reload postgres.  Any suggestions aout how?

thanks again
dave



Francisco Reyes wrote:

> On Thu, 8 Nov 2001, KUCHARSKI, DAVID R. wrote:
>
> > when I try:
> > #su postgres
> > $ postmaster
> >
> > I get the following:
> > /usr/bin/postmaster doesn't know where to find database system data.  You
> > must specify the directory that contains the database system either by
> > specifying the -D invocation option or by setting the PGDATA environment
> > variable.
>
> Try "su - postgres".
> The error you are seeing is basically a lack of configuration.
> I believe there is an OS variable "pgdata" which gets set when the
> postgres user is started and this is how the database knows where the
> database directory is.


Re: It's dead and won't get up!!

От
"Josh Berkus"
Дата:
David,

> thanks for all of the input everyone.  I believe you have helped lead
> me to the
> problem.  two days ago iI ran out of room on the partition.  Postgres
> was
> running at the time, but complaining about the fact that it was out
> of room.
> so in an effort to make more room I foolishly removed what I thought
> was a test
> db.  that was where postgres looks for its configuration info.  when
> postgres
> died today it wasn't able to find that info for the restart.  If it
> wouldn't
> have died for whatever reason today it would never have needed to
> locate those
> files.  I guess it's time to reload postgres.  Any suggestions aout
> how?

You deleted Template1?

Well, if you have a filesystem backup you can restore it that way.  Or,
if you have a database backup, you can re-install postgresql from
scratch, and restore that database from backup.

If you have no backups, then you are DOA.
Just as if you typed "rm -rf /* " with no backups.

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Re: It's dead and won't get up!!

От
"Josh Berkus"
Дата:
David,

> That was it. Thanks! No back up of postgres, but I do still have the
> database.  Time to reinstall postgres. I tried using the rpm from the
> redhat7.1 disk to reinstall,but that didn't recreate the template1
> file for
> me.  What else do I need to do? or would i be better served to go to
> ftp
> site and get version 7.1.3 and go from source and reload that way?
> dave

No, Template1 is created when you run the Initdb program.  It will only
run if you have previously cleared the data directory.  SO:

mkdir /root/pgbackup
cd /usr/local/pgsql/data
mv * /root/pgbackup/
cd ..
cd bin
./initdb

Then restore your database from the pg_dump file.  You may find that you
have to manually create some users in Template1 if your database was
created by a user other than postgres.

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Re: It's dead and won't get up!!

От
"Josh Berkus"
Дата:
David,

> Thanks A TON!!!

You're welcome.  One of the (many) great things about PostgreSQL is that
backup/restore is extremely simple.

> I kind of stumbled upon that track already.  The original problem
> here is
> that I'm running out of space.  largest hunk that I can borrow right
> now is
> in /home - almost 9gb.  I'm moving files there now hoping that they
> will
> fit.

While you can locate your /data files anywhere you want, you're going to
want to re-partition and straighten things out.  Linux (like windows)
gets *very* unhappy when the \ partition runs out of space.  You can
even get a kernel panic, and then you're hosed.

The easiest way to do this is to add a second HDD (only about $100 for
an IBM or Segate!).  Then, do the following:

mkdir /tmp/var/
mount -t ext3 /dev/hdb1 /tmp/opt/
    (this assumes that the new drive is the second one on the first IDE
chan and has one partition).
cp -r -p /opt/* /tmp/opt/
umount /tmp/opt/
then edit /etc/fstab, or use your favorite partition manager, to
recognize the new HDD as /opt/
then reboot

This process allows you to move all of the opt files to a new partition.
Please be very, very, careful executing this!

-Josh




______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Re: It's dead and won't get up!!

От
"David R. Kucharski"
Дата:
When I tried it your way  the attached fail.log is what it spit out.
running  version 7.0.3
on Linux RedHat version 7.1
I believe that it was installed as part of the original install of this
machine.
When I rebooted the machine it failed to restart.  It was running earlier
today.  I was building a table and used a shell escpe to locate a .txt file
that was going to be used to populate the table.  when I exited from the
shell escape it killed postmaster for some reason and I haven't been able to
get it back.
 thanks for your help
Dave


Jason Earl wrote:

> Okay, we are probably going to need a little more information than
> this.  For example: What version of PostgreSQL are you running?  What
> platform are you running it on?  Did you install from source, or did
> you use someone else's precompiled binaries?  What does the log file
> say?
>
> Generally speaking most PostgreSQL users use some sort of init script
> to make sure that PostgreSQL starts, we certainly don't start it from
> the command line like you see at the bottom of the postmaster(1) man
> page.  In fact there is an entire program 'pg_ctl' that is
> specifically designed to do this.  On my debian system I start
> PostgreSQL with a command like:
>
> /etc/init.d/postgresql start
>
> And when I used RedHat's RPMs (a long time ago) they had something
> similar.
>
> Give us a little more information and we will get your server back up
> and running.
>
> Jason
Stopping postgresql service: [FAILED]
Checking postgresql installation: no database files found.
Initializing database...[  OK  ]
Starting postgresql service: [FAILED]

Re: It's dead and won't get up!!

От
"Josh Berkus"
Дата:
David,

> When I tried it your way  the attached fail.log is what it spit out.
> running  version 7.0.3
> on Linux RedHat version 7.1
> I believe that it was installed as part of the original install of
> this
> machine.
> When I rebooted the machine it failed to restart.  It was running
> earlier
> today.  I was building a table and used a shell escpe to locate a
> .txt file
> that was going to be used to populate the table.  when I exited from
> the
> shell escape it killed postmaster for some reason and I haven't been
> able to
> get it back.

I think you've reached the limit of the help you can expect from a
mailing list.  From the sound of it, the machine you're working with has
serious problems that need to be addressed before you can do anything
with PostgreSQL.  Besides, you should upgrade.

-Josh
______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco