Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How opening port 5432 :   "No connection could be made because the target machine actively refused it"

Posted on 2005-04-25
4
Medium Priority
?
19,273 Views
Last Modified: 2011-08-18

Hello,

when I'm trying to connect to the postgresql database (located on the server) I receive following error : "No connection could be made because the target machine actively refused it".

I noticed that port 5432 isn't open on the real ip addres 168.2.*.*. It's only open on the local ip address 127.0.*.*


Can someone tell me how I've to open this port. (OS : windows XP Pro Service Pack 2)


Thanks


Davy
0
Comment
Question by:davyberroho
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
earth man2 earned 2000 total points
ID: 13863021
Look in your postgresql.conf file for :-

listen_addresses = 'localhost,192.168.127.8'    # what IP interface(s) to listen on;
                                # defaults to localhost, '*' = any
port = 5432

Make sure your ip addresses match the pc and port 5432 is not being blocked by your firewall !


Modify pg_hba.conf file to give access.
0
 

Author Comment

by:davyberroho
ID: 13867901
Hi earthman2,


I've modified the 2 configuration files but it doesn't help. I've shutdowned my firewall to be sure.


When I execute following command : netstat -a -n, I noticed that 192.168.2.4:5432 isn't open


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>netstat -a -n

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:25             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1026           0.0.0.0:0              LISTENING
  TCP    127.0.0.1:1028         127.0.0.1:1029         ESTABLISHED
  TCP    127.0.0.1:1029         127.0.0.1:1028         ESTABLISHED
  TCP    127.0.0.1:1041         127.0.0.1:1042         ESTABLISHED
  TCP    127.0.0.1:1042         127.0.0.1:1041         ESTABLISHED
  TCP    127.0.0.1:5432         0.0.0.0:0              LISTENING
  TCP    192.168.2.4:139        0.0.0.0:0              LISTENING
  UDP    0.0.0.0:445            *:*
  UDP    0.0.0.0:500            *:*
  UDP    0.0.0.0:1025           *:*
  UDP    0.0.0.0:3456           *:*
  UDP    0.0.0.0:4500           *:*
  UDP    127.0.0.1:123          *:*
  UDP    127.0.0.1:1027         *:*
  UDP    127.0.0.1:1900         *:*
  UDP    192.168.2.4:123        *:*
  UDP    192.168.2.4:137        *:*
  UDP    192.168.2.4:138        *:*
  UDP    192.168.2.4:1900       *:*

C:\Documents and Settings\Administrator>


telnet also fails...


Any other ideas?


Thanks  for your help !


Davy.
0
 
LVL 22

Expert Comment

by:earth man2
ID: 13868223
your postgresql.conf file must be wrong.
Set it to the following.

listen_addresses = '*'
port = 5432

look in log file for any info
0
 
LVL 62

Expert Comment

by:gheist
ID: 13883384
tcpip_socket=true (false by default)

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question