473,804 Members | 3,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:54 32" 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 2379

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

Similar topics

2
2723
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 socket module. Everything works fine, as long as I'm trying to connect to the server from the host, the server is running. If I try to access the server from another computer in my local network, the connection is refused.
3
2012
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 server ( with a another socket ) to login also tell the server what IP and PORT address the client is listening on, but the IP address an internal IP and not my public IP address because I'm behind a router. Is there any way I could connect to the...
1
17096
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, and am specifying it to do so via localhost:1433, but keep getting an error whenever I try doing so saying it cannot connect to the database. A colleague of mine has the exact same set up on his machine, and he can connect to SQL Server fine....
5
2012
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 implementation of the form class does not have a wndproc function to override, i cannot get the messages. I cannot use a message window, as the window i am listening to will then not display. Is there another method of doing this?
4
2153
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 = new TcpListener(8080); mainTcp.Start();
6
3129
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 to access a socket in a way fobidden by its access permissions."
2
977
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 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...
6
2304
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, where my browser resides. Browser would be IE, O.S. Windows 2000 or XP, and it's for an intranet application. The goal of the little server on the localhost client side would be to trigger a scanner, with the TWAIN library. Also this server is...
10
8122
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: http://switch.richard5.net/isp-in-a-box-v2/installing-apache-on-mac-os-x/#comment-30704 and everything seemed to install correctly, but I can't start Apache. I typed in the following command: $ sudo /Library/Apache2/bin/apachectl start Password:
10
5188
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 always raise a OnConnect event (actually, it calls the callback function as if there was a new connection attempt) and I receive a ObjectDisposedException as soon as I do m_mySocket.EndAccept. Does anyone have any idea of what I could do about...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10577
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10332
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9150
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6853
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.