Urgent

Started by ElayaRaja Salmost 21 years ago9 messagesgeneral
Jump to latest
#1ElayaRaja S
elayaraja.s@gmail.com

Hi,
I am using Redhat linux 9. i had configure in pg_hba.conf as
host postgres postgres 10.10.0.76 255.255.255.0 password

If i try to connect with postgresql admin i am getting excpetion as

An erro has occured:

Error connecting to the server: could not connect to server:
Connection refuesed(0x0000274D/10061)
Is the server running on host "10.10.0.76" and accepting
TCP/IP connections on port 5432?

Please help me.

--
Warm Regards,

S.ElayaRaja
Mobile: (+91) 98450 59540
E-Mail: elayaraja.s@gmail.com
raja_nk@hotmail.com

#2Gavin M. Roy
gmr@ehpg.net
In reply to: ElayaRaja S (#1)
Re: Urgent

Thank you for posting to a better list for these questions. Check your
postgresql.conf file and make sure it's accepting TCP/IP connections on
the IP you're looking for. If you look in your PGDATA directory you
should find the config file, and if you open it and read it, it's well
commented so you should be able to find the settting you need to tweak.

Regards,

Gavin

ElayaRaja S wrote:

Show quoted text

Hi,
I am using Redhat linux 9. i had configure in pg_hba.conf as
host postgres postgres 10.10.0.76 255.255.255.0 password

If i try to connect with postgresql admin i am getting excpetion as

An erro has occured:

Error connecting to the server: could not connect to server:
Connection refuesed(0x0000274D/10061)
Is the server running on host "10.10.0.76" and accepting
TCP/IP connections on port 5432?

Please help me.

#3Uwe C. Schroeder
uwe@oss4u.com
In reply to: ElayaRaja S (#1)
Re: Urgent

have you enabled tcp in postgresql.conf ?
the parameter in question is pretty much on top of the file and should read

tcpip_socket = true

usually postgresql.conf is in /var/lib/pgsql/data/
on a RH system

UC

On Monday 18 April 2005 11:55, ElayaRaja S wrote:

Hi,
I am using Redhat linux 9. i had configure in pg_hba.conf as
host postgres postgres 10.10.0.76 255.255.255.0 password

If i try to connect with postgresql admin i am getting excpetion as

An erro has occured:

Error connecting to the server: could not connect to server:
Connection refuesed(0x0000274D/10061)
Is the server running on host "10.10.0.76" and accepting
TCP/IP connections on port 5432?

Please help me.

--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417

#4Leif B. Kristensen
leif@solumslekt.org
In reply to: Gavin M. Roy (#2)
Pgsql config file

On Monday 18 April 2005 21:07, Gavin M. Roy wrote:

Thank you for posting to a better list for these questions. Check
your postgresql.conf file and make sure it's accepting TCP/IP
connections on the IP you're looking for. If you look in your PGDATA
directory you should find the config file, and if you open it and
read it, it's well commented so you should be able to find the
settting you need to tweak.

There's one thing I've been wondering about: Why isn't the postgresql
config file in /etc, with all the rest?
--
Leif Biberg Kristensen
http://solumslekt.org/

#5Scott Marlowe
smarlowe@g2switchworks.com
In reply to: Leif B. Kristensen (#4)
Re: Pgsql config file

On Mon, 2005-04-18 at 14:16, Leif B. Kristensen wrote:

On Monday 18 April 2005 21:07, Gavin M. Roy wrote:

Thank you for posting to a better list for these questions. Check
your postgresql.conf file and make sure it's accepting TCP/IP
connections on the IP you're looking for. If you look in your PGDATA
directory you should find the config file, and if you open it and
read it, it's well commented so you should be able to find the
settting you need to tweak.

There's one thing I've been wondering about: Why isn't the postgresql
config file in /etc, with all the rest?

Primarily, it's because postgresql is not a "system" level service. It
is quite possible for ten people using the same server to install their
own copies of postgresql (on differing ports of course) each of which
would be in their own home directories.

In this case, it might well be that each install would need its own
postgresql.conf / pg_hba.conf file to operate properly.

While a service like Bind/DNS, or kerberos, is only usually run one
instance at a time, it isn't all that uncommon for things like apache or
postgresql to be installed and run multiple times. Which is why, one
some installations, apache's conf files are local to the server
directory, and on others (where apache is installed as a system service)
they're in /etc somewhere.

Postgresql knows where it IS by use of either the -D switch or an
envar. Also, by requiring it to be in a directory that belongs to the
process owner and be permed at 700, it is ensured that regular folk AND
sysadmin alike won't go editing it for fun.

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Uwe C. Schroeder (#3)
Re: Urgent

"Uwe C. Schroeder" <uwe@oss4u.com> writes:

have you enabled tcp in postgresql.conf ?
the parameter in question is pretty much on top of the file and should read
tcpip_socket = true

And if you have set that, look at the system's packet filtering rules
--- recent Red Hat releases tend to disallow traffic to port 5432 by
default.

"Connection refused" is a kernel-level refusal --- it means that the
postmaster never got your request at all, either because it wasn't
listening on that port or because something in-between blocked the
packet. So there's no point in looking at your pg_hba configuration.

Some troubleshooting info is in these parts of the docs:

http://www.postgresql.org/docs/8.0/static/postmaster-start.html#CLIENT-CONNECTION-PROBLEMS
http://www.postgresql.org/docs/8.0/static/client-authentication-problems.html

regards, tom lane

#7Uwe C. Schroeder
uwe@oss4u.com
In reply to: Leif B. Kristensen (#4)
Re: Pgsql config file

On Monday 18 April 2005 12:16, Leif B. Kristensen wrote:

On Monday 18 April 2005 21:07, Gavin M. Roy wrote:

Thank you for posting to a better list for these questions. Check
your postgresql.conf file and make sure it's accepting TCP/IP
connections on the IP you're looking for. If you look in your PGDATA
directory you should find the config file, and if you open it and
read it, it's well commented so you should be able to find the
settting you need to tweak.

There's one thing I've been wondering about: Why isn't the postgresql
config file in /etc, with all the rest?

Because it would make multiple installs of different postgres versions
hard/impossible to do. You'd also have file access problems since postgres
doesn't run as root. It's also nicely "everything in one spot"

UC

--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417

#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Leif B. Kristensen (#4)
Re: Pgsql config file

"Leif B. Kristensen" <leif@solumslekt.org> writes:

There's one thing I've been wondering about: Why isn't the postgresql
config file in /etc, with all the rest?

Because (a) that would mean you couldn't run Postgres without root
privileges (to set up the config files), and (b) you couldn't run more
than one postmaster on a system. Both of these ideas are complete
nonstarters as far as the developers are concerned, even though they
might be reasonable things as far as the average user is concerned
(at least until he wants to run two different PG versions while testing
an upgrade).

As of PG 8.0 it is possible to keep all the hand-edited config files
anyplace you please, so if keeping them under /etc appeals to you,
you can do it. But it's unlikely to ever become the default.
For details see
http://www.postgresql.org/docs/8.0/static/runtime-config.html#RUNTIME-CONFIG-FILE-LOCATIONS

regards, tom lane

#9Dinesh Pandey
dpandey@secf.com
In reply to: ElayaRaja S (#1)
Re: Urgent

Edit "postgres.conf" and "pg_hba.conf" to access database from a remote
machine

Edit "postgres.conf":
------------------------------------------
listen_addresse='*'

Edit "pg_hba.conf":
------------------------------------------
host all all 10.10.0.76 255.255.255.0
trust

Thanks
Dinesh Pandey

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of ElayaRaja S
Sent: Tuesday, April 19, 2005 12:26 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Urgent

Hi,
I am using Redhat linux 9. i had configure in pg_hba.conf as
host postgres postgres 10.10.0.76 255.255.255.0 password

If i try to connect with postgresql admin i am getting excpetion as

An erro has occured:

Error connecting to the server: could not connect to server:
Connection refuesed(0x0000274D/10061)
Is the server running on host "10.10.0.76" and accepting
TCP/IP connections on port 5432?

Please help me.

--
Warm Regards,

S.ElayaRaja
Mobile: (+91) 98450 59540
E-Mail: elayaraja.s@gmail.com
raja_nk@hotmail.com

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq