Обсуждение: PostgreSQL 8.3.7 Clint to Server Connection Problem!
Hello:
Note: English 2nd language, so forgive errors in English.
====
CentOS 5.2
-------------------------
PostgreSQL Server (eth1: 10.43.48.101). The following modules are
installed:
postghresql-libs-8.3.7, postgresql-8.3.7, postgresql-server-8.3.7,
pgAdmin3-1.8.4
"postgresql.conf":
listen_addresses = '*
"pg_hba.conf"
host all all 10.43.48.0/16
"/etc/services"
postgresql 5432/tcp
postgresql 5432/udp
-------------------------
PostgreSQL Client (eth1: 10.43.48.1). The following modules are installed:
postghresql-libs-8.3.7, postgresql-8.3.7 & pgAdmin3-1.8.4
"postgresql.conf" & "pg_hba.conf" has no entry in the PostgreSQL Client.
-------------------------
On the PostgreSQL Server (IP: 10.43.48.101), I can connect to the
PostgreSQL & create a "Server" listening on port "5432" using "pgAdmin3".
PROBLEM:
When trying to connect to the PostgreSQL Server from PostgreSQL Client,
get an error message:
"Could not connect to the server: No route to the host Is the server
running
on host "10.43.48.101" and accepting TCP/IP connections on 5432?"
First of all, I can ping the PostgreSQL server from the Client machine.
I have researched the Internet and found lots of reference to this error
but nothing helped.
1. Am I installing all the necessary modules/files on the PostgreSQL
Client machine?
2. Any suggestion, help?
Sam
"Just E. Mail" <justemail@imwell-usa.com> writes:
> When trying to connect to the PostgreSQL Server from PostgreSQL Client,
> get an error message:
> "Could not connect to the server: No route to the host Is the server
> running
> on host "10.43.48.101" and accepting TCP/IP connections on 5432?"
> First of all, I can ping the PostgreSQL server from the Client machine.
Really? "No route to host" is pretty definitively a networking problem.
Are you sure you've specified the host name/address correctly?
regards, tom lane
Tom: Yes I can PING. (I can post the output) >> Are you sure you've specified the host name/address correctly? << Where this host name/address needs to be specified? Also in my original post, is there something missing which I need to install or setup? Sam
In response to Just E. Mail : > Hello: > > Note: English 2nd language, so forgive errors in English. > ==== > > CentOS 5.2 > > ------------------------- > PostgreSQL Server (eth1: 10.43.48.101). The following modules are > installed: > > postghresql-libs-8.3.7, postgresql-8.3.7, postgresql-server-8.3.7, > pgAdmin3-1.8.4 > > "postgresql.conf": > listen_addresses = '* > "pg_hba.conf" > host all all 10.43.48.0/16 Wrong entry, i'm missing the AUTH-Method. > > On the PostgreSQL Server (IP: 10.43.48.101), I can connect to the > PostgreSQL & create a "Server" listening on port "5432" using "pgAdmin3". > > PROBLEM: > > When trying to connect to the PostgreSQL Server from PostgreSQL Client, > get an error message: > > "Could not connect to the server: No route to the host Is the server > running > on host "10.43.48.101" and accepting TCP/IP connections on 5432?" Apparently a network-issue. > > First of all, I can ping the PostgreSQL server from the Client machine. Sure? Maybe a firewall-issue. Show us the output generated with: iptables -L from the server. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
> > "postgresql.conf": > listen_addresses = '* Are you missing the end qoute on the listen_addresses line, or is that a copy/paste error? Are you running a firewall on your server? Try to telnet to port 5432, if PostgreSQL is listening, and there aren't any other network issues you will get a connection. -- David Gardner
Thank you all. The problem is fixed and it was my problem. I DID NOT OPEN THE PORT 5432!! I entered the lines: postgresql 5432/tcp postgresql 5432/udp in the "etc/services" file, thinking this opens the port "5432", which is not correct. Anyway, I am new to LINUX and it was my mistake. Sam