Thread: BUG #1156: Database is not initializing

BUG #1156: Database is not initializing

From
"PostgreSQL Bugs List"
Date:
The following bug has been logged online:

Bug reference:      1156
Logged by:          Sangameswar

Email address:      sangameswarm@yahoo.com

PostgreSQL version: 7.2.3

Operating system:   Redhat linux

Description:        Database is not initializing

Details:

psql: FATAL 1:  Missing or erroneous pg_hba.conf file, see postmaster log
for details

Re: BUG #1156: Database is not initializing

From
Richard Huxton
Date:
PostgreSQL Bugs List wrote:
> The following bug has been logged online:
>
> Bug reference:      1156
> Logged by:          Sangameswar
> Email address:      sangameswarm@yahoo.com
>
> PostgreSQL version: 7.2.3
> Operating system:   Redhat linux
> Description:        Database is not initializing
> Details:
> psql: FATAL 1:  Missing or erroneous pg_hba.conf file, see postmaster log
> for details

Some more details needed:
  1. What does the log show?
  2. Where is your pg_hba.conf file?
  3. Does it contain any errors?

--
   Richard Huxton
   Archonet Ltd

Re: BUG #1156: Database is not initializing

From
Richard Huxton
Date:
Please cc: the pgsql-bugs mailing list as well as myself

Mr sangameswar m wrote:
> Hello sir,
>         Whenever i attempt to login
> with already created database by entering the command
> ./psql student then it showing the error as i had
> specifed in my earlier mail. Even it is not getting
> login when i enter the command
> ./psql
> The error is same in the both cases

The error message says that it has problems with the pg_hba.conf file
and you should look in your logs. So, to repeat:
>>  1. What does the log show?
>>  2. Where is your pg_hba.conf file?
>>  3. Does it contain any errors?

You should have a log file called /var/log/postgresql or /var/log/pgsql
(or similar). That log file should contain lines indicating the details
of the problem.

You should have a pg_hba.conf file, probably in /var/lib/pgsql/... or
/etc. What does this contain?

--
   Richard Huxton
   Archonet Ltd

Re: BUG #1156: Database is not initializing

From
Mr sangameswar m
Date:
Hello Sir,

The following error is comming when i want to get into
the database.
$./psql
psql: connectDBStart() -- connect() failed: No such
file or directory
        Is the postmaster running locally
        and accepting connections on Unix socket
'/tmp/.s.PGSQL.5432'?

if i type the following command i am getting the
following :
$ pg_ctl status -D /home1/market/postgres/data
pg_ctl: postmaster is running (pid: 1295)
Command line was:
/home1/market/postgres/postgresql-7.2.3/bin/postmaster
'-i' '-D' '/home1/market/postgres/data'

when i type following command then this error is
comming:
$ createdb stu
psql: connectDBStart() -- connect() failed: No such
file or directory
        Is the postmaster running locally
        and accepting connections on Unix socket
'/tmp/.s.PGSQL.5432'?
createdb: database creation failed
If type another command like this then :

$pg_ctl start -D /home1/market/postgres/data
pg_ctl: Another postmaster may be running.  Trying to
start postmaster anyway.
Lock file "/home1/market/postgres/data/postmaster.pid"
already exists.
Is another postmaster (pid 1295) running in
"/home1/market/postgres/data"?
pg_ctl: cannot start postmaster
Examine the log output.

I had examined the output then following is there

Lock file "/home1/market/postgres/data/postmaster.pid"
already exists.
Is another postmaster (pid 1295) running in
"/home1/market/postgres/data"?

--- Richard Huxton <dev@archonet.com> wrote:
> Mr sangameswar m wrote:
> > Hello sir,
> >    How can i initialize the postmaster server.
> Some
> > given hint that the Postmaster server is down. How
> can
> > i know where the data base directory is stored.
> Can
> > you give me any hints about it.
>
> If Postgresql was installed via RPM then you can see
> what it is doing by
> using the standard command (the # mark means to run
> as root):
>   # service postgresql status
> To start the service you should run:
>   # service postgresql start
> If you need to restart the server (e.g. because of
> configuration changes)
>   # service postgresql restart
> The standard /etc/rc.d/... files can be used to
> automatically start/stop
> the server along with your redhat server.
>
> If you installed from source, the quickest way might
> be:
>   # ps auxw | grep postgres
>
> If you don't see any error messages on starting the
> server, your files
> are probably in /var/lib/pgsql/...
> Documentation (if installed) will probably be in
> /usr/share/doc/postgresql-7.2.3/ and your logging
> should occur in /var/log/
>
> You will then want to read the manuals regarding
> installation and
> administration, particularly "client authentication"
> (tip - you will
> want to set local to trust while you get things
> working).
>
> The main website has the manuals:
>    http://www.postgresql.org/
> It also has links for the odbc/jdbc/etc drivers
>
> There are some more user-written materials here:
>    http://techdocs.postgresql.org/
> You will also find online books linked from here.
>
> There are a number of mailing lists described at the
> page below. Can I
> suggest the novice or general lists?
>    http://www.postgresql.org/lists/
>
> Finally, a good book on linux might be useful. I
> liked the O'Reilly book
> "Running Linux" but you may find a redhat-specific
> one more use.
>
> Best of luck, see you on the mailing lists.
>
> --
>    Richard Huxton
>    Archonet Ltd





__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/