473,414 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

TCP only listening on localhost???

First weird problem...
The other day, out of the blue, our application reported an error saying it
could not connect to the postgres db. The hostname that it reported is the
name of the machine but it hasn't been used in awhile. However, it does
have a valid cname entry in dns pointing to the correct host. I added the
name in the /etc/hosts file on the server and the problem was fixed.

Next weird problem...
I recently upgraded a few nodes that connect to the server to Redhat 9. I
installed all the necessary rpm's and when I tried to connect to the remote
server, I get the following error.

# psql -U postgres -d dbname -h server_name
psql: could not connect to server: Connection refused
Is the server running on host server_name and accepting
TCP/IP connections on port 5432?

Here is the output of netstat -ae | grep tcp | grep LIST

....
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN

tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN

....

As you can see, postgres is listening on localhost put not "0.0.0.0:5432" as
I see in many posts to this site. This was working fine before but now I
cannot connect from any other server that I have given permission to in
pg_hba.conf.
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
host all all 10.64.228.10 255.255.255.255 trust
host all all 10.64.228.112 255.255.255.255 trust
host all all 10.64.228.115 255.255.255.255 trust

And Yes I have the "-i" option specified in my postmaster command...
/usr/local/db/pgsql/bin/postmaster -i -c log_connections=on -h server_name
-D /usr/local/db/pgsql/data

and Yes I have tcpip_socket = true in postgresql.conf.

No, I do not have multiple installs of postgres on this system and I am sure
they are using the correct configuration files.

This was all working fine until I recently. It has been a long time since I
have restarted the server ( 5:05pm up 377 days, 18:36, 7 users, load
average: 0.00, 0.00, 0.00) and it has been a long time since I restarted the
postgres DB. I wonder if some weirdness is happening which isn't allowing
postgres to bind to tcp port 5432.

From the server... This is connecting through the socket...
# psql -h server_name -U postgres -d dbname
Welcome to psql 7.3.2, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

dbname=# \q
From the server... This is trying to connect to the port...
# psql -h 10.64.228.10 -U postgres -d dbname
psql: could not connect to server: Connection refused
Is the server running on host 10.64.228.10 and accepting
TCP/IP connections on port 5432?

Any ideas what could be happening?

Thanks

Richard
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #1
0 2353

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Christian von Essen | last post by:
Hi, As I don't know if my problem is python, platform or non-specific, I try to post my question here, as you may have made similar experiences. I try to write a simple chatserver, using the...
3
by: Laszlo Csabi | last post by:
Hi guys, What I would like to achieve is create a client-server messenger application. The problem I run into is : I have created a listener socket on the client and connect to the remote...
1
by: Akif | last post by:
Hi. I'm a SQL Server novice, so apologies if any of this sounds simple. I am running Windows XP SP2, and have just installed SQLServer 2000. I need another application to connect to SQLServer,...
5
by: Adam | last post by:
Hi, How do i listen for windows messages in c# on compact.net? I have a window containing an instantiation of the HTML viewer control, which is a child of the main form. As the compact...
4
by: Xarky | last post by:
Hi, I am writing a small web server, to listen on web browser port(8080), if I'm not wrong. Basically for parsing some tags found in html. Now I am doing as follows TcpListener mainTcp =...
6
by: kai | last post by:
Hi, I was tring to run an example (HelloWorld.aspx) from MSPrss book, I get this message: "ASP.NET Development Server faild to start listening port 1034. Error message: An attempt was made...
2
by: Richard Gass | last post by:
First weird problem... The other day, out of the blue, our application reported an error saying it could not connect to the postgres db. The hostname that it reported is the name of the machine...
6
by: Marc | last post by:
How could I directly trigger a very simple on localhost and a known port listening server from my internet browser client? Local host means the little server would be running on the client machine,...
10
by: 7stud | last post by:
I'm trying to get Apache set up on my system so I can use mod_python. I installed Apache 2.2.4 according to the following instructions: ...
10
by: ThunderMusic | last post by:
Hi, I'm currently working with sockets. I accept connections using m_mySocket.Listen(BackLogCount); But when I want to stop listening, I shutdown all my clients and call m_mySocket.Close(), but it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.