Thread: Postmaster startup problems

Postmaster startup problems

From
Collin Peters
Date:
I'm having problems starting postgres.    What happens is that I start it
but then it says it isn't running.

In one terminal window:
postgres@the-kernel:~$ postmaster -D /usr/local/pgsql/data/
>$HOME/pm.log
DEBUG:    Data Base System is starting up at Sat Oct  7 13:13:29 2000
DEBUG:    Data Base System was shut down at Sat Oct  7 13:13:25 2000
DEBUG:    Data Base System is in production state at Sat Oct  7 13:13:29
2000

In another terminal window while still looking at postmaster 'running' in
the other:
postgres@the-kernel:~$ psql
psql: connectDBStart() -- connect() failed: Connection refused
    Is the postmaster running at 'localhost'
    and accepting connections on Unix socket '5432'?

If I try to start postmaster again:
postgres@the-kernel:~$ postmaster -D /usr/local/pgsql/data/
>$HOME/pm.log
FATAL: StreamServerPort: bind() failed: Address already in use
    Is another postmaster already running on that port?
    If not, remove socket node (/tmp/.s.PGSQL.5432) and retry.
/usr/local/pgsql/bin//postmaster: cannot create UNIX stream port

Which leads me to think that it is in fact running.  But I can't
connect!!  Is it maybe running on a different port or something?  Another
strange thing is that TOP reports the running process to be
/usr/local/pgsql/bin instead of /usr/local/pgsql/bin/postmaster which is
the way I remember it running before.

Collin Peters


SV: Postmaster startup problems

From
"Jarmo Paavilainen"
Date:
...
> I'm having problems starting postgres.    What happens is
> that I start it but then it says it isn't running.
...
> DEBUG:    Data Base System is starting up at Sat Oct  7 13:13:29 2000
> DEBUG:    Data Base System was shut down at Sat Oct  7 13:13:25 2000
> DEBUG:    Data Base System is in production state at Sat Oct 7 13:13:29 2000
...
> Which leads me to think that it is in fact running.  But I can't
> connect!!  Is it maybe running on a different port or something?  Another

From where are you trying to connect? If your not connecting locally you
must add the -i option to postmaster.

// Jarmo


Re: SV: Postmaster startup problems

From
Collin Peters
Date:
I am just trying to connect locally.  Only one machine involved.  Is
there a way to tell what port the postmaster is running on if it is
running at all.

Collin

On Sun, 8 Oct 2000 10:55:32 +0200, Jarmo Paavilainen said:

>
>  ....
>  > I'm having problems starting postgres.    What happens is
>  > that I start it but then it says it isn't running.
>  ....
>  > DEBUG:    Data Base System is starting up at Sat Oct  7 13:13:29 2000
>  > DEBUG:    Data Base System was shut down at Sat Oct  7 13:13:25 2000
>  > DEBUG:    Data Base System is in production state at Sat Oct 7 13:13:29 2000
>  ....
>  > Which leads me to think that it is in fact running.  But I can't
>  > connect!!  Is it maybe running on a different port or something?  Another
>
>  From where are you trying to connect? If your not connecting locally you
>  must add the -i option to postmaster.
>
>  // Jarmo
>
>


Re: SV: Postmaster startup problems

From
Charles Tassell
Date:
You can do

ps axw |grep post

from a command prompt to make sure it's running (should see something like
" ...... /usr/local/pgsql/bin/postmaster ...."

You can then look for a file called /tmp/.s.PGSQL.#### where #### is the
port that postgres is running on, the default is 5432.  If PostGres seems
to be running and using the default port, your best bet is to check the
pg_hba.conf file and make sure it has an entry for your local machine in
it.  Try just adding the following line:

local all trust

The pg_hba.conf file is located in your data directory, usually
/usr/local/pgsql/data


At 04:30 PM 10/8/00, Collin Peters wrote:
>I am just trying to connect locally.  Only one machine involved.  Is
>there a way to tell what port the postmaster is running on if it is
>running at all.
>
>Collin
>
>On Sun, 8 Oct 2000 10:55:32 +0200, Jarmo Paavilainen said:
>
> >
> >  ....
> >  > I'm having problems starting postgres.     What happens is
> >  > that I start it but then it says it isn't running.
> >  ....
> >  > DEBUG:     Data Base System is starting up at Sat Oct  7 13:13:29 2000
> >  > DEBUG:     Data Base System was shut down at Sat Oct  7 13:13:25 2000
> >  > DEBUG:     Data Base System is in production state at Sat Oct 7
> 13:13:29 2000
> >  ....
> >  > Which leads me to think that it is in fact running.  But I can't
> >  > connect!!  Is it maybe running on a different port or
> something?  Another
> >
> >  From where are you trying to connect? If your not connecting locally you
> >  must add the -i option to postmaster.
> >
> >  // Jarmo
> >
> >


Re: SV: Postmaster startup problems

From
Collin Peters
Date:
Charles, I tried what you said with the following output:

ps axw|grep post has the output:
collin@the-kernel:~$ ps axw|grep post
 6311 pts/2    S      0:00 /usr/local/pgsql/bin/postmaster -D
/usr/local/pgsql/data
 6336 pts/3    S      0:00 grep post

There IS a file in the /tmp directory named '.s.PGSQL.5432' which means
that it is running on port 5432, correct?
There already was an entry in the pg_hba.conf file with 'local all trust'

I renamed my pgsql directory and recompiled postgres but it still does
the exact same thing.  Any other ideas?

Here is a screenshot so you know exactly what I'm doing:
http://www3.telus.net/cadiolis/shots/postgres.jpg
I logged in on the left terminal and started the database, then logged
into the right terminal and tried to start psql
I've also started the database from the actual cli and not a terminal
window with no luck..


Collin


On Sun, 08 Oct 2000 19:18:18 -0300, Charles Tassell said:

> You can do
>
>  ps axw |grep post
>
>  from a command prompt to make sure it's running (should see something like
>  " ...... /usr/local/pgsql/bin/postmaster ...."
>
>  You can then look for a file called /tmp/.s.PGSQL.#### where #### is the
>  port that postgres is running on, the default is 5432.  If PostGres seems
>  to be running and using the default port, your best bet is to check the
>  pg_hba.conf file and make sure it has an entry for your local machine in
>  it.  Try just adding the following line:
>
>  local all trust
>
>  The pg_hba.conf file is located in your data directory, usually
>  /usr/local/pgsql/data
>
>
>  At 04:30 PM 10/8/00, Collin Peters wrote:
>  >I am just trying to connect locally.  Only one machine involved.  Is
>  >there a way to tell what port the postmaster is running on if it is
>  >running at all.
>  >
>  >Collin
>  >
>  >On Sun, 8 Oct 2000 10:55:32 +0200, Jarmo Paavilainen said:
>  >
>  > >
>  > >  ....
>  > >  > I'm having problems starting postgres.     What happens is
>  > >  > that I start it but then it says it isn't running.
>  > >  ....
>  > >  > DEBUG:     Data Base System is starting up at Sat Oct  7 13:13:29 2000
>  > >  > DEBUG:     Data Base System was shut down at Sat Oct  7 13:13:25 2000
>  > >  > DEBUG:     Data Base System is in production state at Sat Oct 7
>  > 13:13:29 2000
>  > >  ....
>  > >  > Which leads me to think that it is in fact running.  But I can't
>  > >  > connect!!  Is it maybe running on a different port or
>  > something?  Another
>  > >
>  > >  From where are you trying to connect? If your not connecting locally you
>  > >  must add the -i option to postmaster.
>  > >
>  > >  // Jarmo
>  > >
>  > >
>
>