Thread: postgres connection issues

postgres connection issues

From
Markus Metz
Date:
Dear all:

I searched the web and all what I tried did not work. So please bear with me:

I trying to access a database on a linux machine from a windows computer using SQuirrel:
postgres version 9.4.5
Squirrell version 3.7

However, I am getting the error message on SQuirrel:
Connection to host:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

This is what I have done:
a) Changed postgresql.conf: listen_addresses = '*'
b) edited pg_hba.conf: host all all 127.0.0.1/32 trust
    host all all 0.0.0.0/0 trust
c) The server is running and listening at the correct port on the linux site:
   ps -efl | grep postgres
    netstat -nlp | grep postgres

What else could I try to enable a communication?

Any suggestion is highly appreciated.

Best,

Markus

Re: postgres connection issues

From
Steve Crawford
Date:
Is there a firewall in place on the server side (perhaps that you didn't set up)? Some distributions are fairly "locked down" out of the box and you have to specifically open ports you want to use.

Cheers,
Steve


On Thu, Apr 21, 2016 at 12:25 PM, Markus Metz <metma99@gmail.com> wrote:
Dear all:

I searched the web and all what I tried did not work. So please bear with me:

I trying to access a database on a linux machine from a windows computer using SQuirrel:
postgres version 9.4.5
Squirrell version 3.7

However, I am getting the error message on SQuirrel:
Connection to host:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

This is what I have done:
a) Changed postgresql.conf: listen_addresses = '*'
b) edited pg_hba.conf: host all all 127.0.0.1/32 trust
    host all all 0.0.0.0/0 trust
c) The server is running and listening at the correct port on the linux site:
   ps -efl | grep postgres
    netstat -nlp | grep postgres

What else could I try to enable a communication?

Any suggestion is highly appreciated.

Best,

Markus

Re: postgres connection issues

From
"Day, David"
Date:

Hi

 

Probably this:

 

Add to your  pg_hba.conf

 

# IPv4 local connections:

host   all              all             127.0.0.1/32            trust

host   all              all             <ip of your windows machine>/32     trust

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Markus Metz
Sent: Thursday, April 21, 2016 3:25 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] postgres connection issues

 

Dear all:

 

I searched the web and all what I tried did not work. So please bear with me:

 

I trying to access a database on a linux machine from a windows computer using SQuirrel:

postgres version 9.4.5

Squirrell version 3.7

 

However, I am getting the error message on SQuirrel:

Connection to host:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

 

This is what I have done:

a) Changed postgresql.conf: listen_addresses = '*'

b) edited pg_hba.conf: host all all 127.0.0.1/32 trust

    host all all 0.0.0.0/0 trust

c) The server is running and listening at the correct port on the linux site:

   ps -efl | grep postgres

    netstat -nlp | grep postgres

 

What else could I try to enable a communication?

 

Any suggestion is highly appreciated.

 

Best,

 

Markus

Re: postgres connection issues

From
Markus Metz
Date:
Hi David and Steve:
Thank you for your suggestions. 

I changed pg_hba.conf but no success. Same error.

I was able to connect via putty to the server via port 5432 according to 

Cheers,
Markus





On Thu, Apr 21, 2016 at 1:19 PM, Day, David <dday@redcom.com> wrote:

Hi

 

Probably this:

 

Add to your  pg_hba.conf

 

# IPv4 local connections:

host   all              all             127.0.0.1/32            trust

host   all              all             <ip of your windows machine>/32     trust

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Markus Metz
Sent: Thursday, April 21, 2016 3:25 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] postgres connection issues

 

Dear all:

 

I searched the web and all what I tried did not work. So please bear with me:

 

I trying to access a database on a linux machine from a windows computer using SQuirrel:

postgres version 9.4.5

Squirrell version 3.7

 

However, I am getting the error message on SQuirrel:

Connection to host:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

 

This is what I have done:

a) Changed postgresql.conf: listen_addresses = '*'

b) edited pg_hba.conf: host all all 127.0.0.1/32 trust

    host all all 0.0.0.0/0 trust

c) The server is running and listening at the correct port on the linux site:

   ps -efl | grep postgres

    netstat -nlp | grep postgres

 

What else could I try to enable a communication?

 

Any suggestion is highly appreciated.

 

Best,

 

Markus


Re: postgres connection issues

From
"Kevin Struckhoff"
Date:

HI Markus,

 

Sounds like the issue is w/ squirrel then. Have you tried using pgAdmin? It can be downloaded from http://pgadmin.org

 

Good Luck

 

Kevin

 

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Markus Metz
Sent: Thursday, April 21, 2016 2:08 PM
To: Day, David <dday@redcom.com>; scrawford@pinpointresearch.com
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] postgres connection issues

 

Hi David and Steve:

Thank you for your suggestions. 

 

I changed pg_hba.conf but no success. Same error.

 

I was able to connect via putty to the server via port 5432 according to 

 

Cheers,

Markus

 

 

 

 

 

On Thu, Apr 21, 2016 at 1:19 PM, Day, David <dday@redcom.com> wrote:

Hi

 

Probably this:

 

Add to your  pg_hba.conf

 

# IPv4 local connections:

host   all              all             127.0.0.1/32            trust

host   all              all             <ip of your windows machine>/32     trust

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Markus Metz
Sent: Thursday, April 21, 2016 3:25 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] postgres connection issues

 

Dear all:

 

I searched the web and all what I tried did not work. So please bear with me:

 

I trying to access a database on a linux machine from a windows computer using SQuirrel:

postgres version 9.4.5

Squirrell version 3.7

 

However, I am getting the error message on SQuirrel:

Connection to host:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

 

This is what I have done:

a) Changed postgresql.conf: listen_addresses = '*'

b) edited pg_hba.conf: host all all 127.0.0.1/32 trust

    host all all 0.0.0.0/0 trust

c) The server is running and listening at the correct port on the linux site:

   ps -efl | grep postgres

    netstat -nlp | grep postgres

 

What else could I try to enable a communication?

 

Any suggestion is highly appreciated.

 

Best,

 

Markus

 

Re: postgres connection issues

From
Markus Metz
Date:
Thank you.
I will try to get it installed.
Cheers,
Markus

On Thu, Apr 21, 2016 at 2:17 PM, Kevin Struckhoff <kevins@thermal.com> wrote:

HI Markus,

 

Sounds like the issue is w/ squirrel then. Have you tried using pgAdmin? It can be downloaded from http://pgadmin.org

 

Good Luck

 

Kevin

 

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Markus Metz
Sent: Thursday, April 21, 2016 2:08 PM
To: Day, David <dday@redcom.com>; scrawford@pinpointresearch.com
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] postgres connection issues

 

Hi David and Steve:

Thank you for your suggestions. 

 

I changed pg_hba.conf but no success. Same error.

 

I was able to connect via putty to the server via port 5432 according to 

 

Cheers,

Markus

 

 

 

 

 

On Thu, Apr 21, 2016 at 1:19 PM, Day, David <dday@redcom.com> wrote:

Hi

 

Probably this:

 

Add to your  pg_hba.conf

 

# IPv4 local connections:

host   all              all             127.0.0.1/32            trust

host   all              all             <ip of your windows machine>/32     trust

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Markus Metz
Sent: Thursday, April 21, 2016 3:25 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] postgres connection issues

 

Dear all:

 

I searched the web and all what I tried did not work. So please bear with me:

 

I trying to access a database on a linux machine from a windows computer using SQuirrel:

postgres version 9.4.5

Squirrell version 3.7

 

However, I am getting the error message on SQuirrel:

Connection to host:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

 

This is what I have done:

a) Changed postgresql.conf: listen_addresses = '*'

b) edited pg_hba.conf: host all all 127.0.0.1/32 trust

    host all all 0.0.0.0/0 trust

c) The server is running and listening at the correct port on the linux site:

   ps -efl | grep postgres

    netstat -nlp | grep postgres

 

What else could I try to enable a communication?

 

Any suggestion is highly appreciated.

 

Best,

 

Markus

 


Re: postgres connection issues

From
"Day, David"
Date:

Hi,

 

Did you restart or force reload of configuration files by  postgress after any of your changes to pg_hba.conf or postgresql.conf file.

Your  pg_hba entry of 0.0.0.0/0 trust should have allowed any client attachment. So my initial suggestion was

un-necessary.

 

Dave

 

 

 

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Markus Metz
Sent: Thursday, April 21, 2016 5:08 PM
To: Day, David; scrawford@pinpointresearch.com
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] postgres connection issues

 

Hi David and Steve:

Thank you for your suggestions. 

 

I changed pg_hba.conf but no success. Same error.

 

I was able to connect via putty to the server via port 5432 according to 

 

Cheers,

Markus

 

 

 

 

 

On Thu, Apr 21, 2016 at 1:19 PM, Day, David <dday@redcom.com> wrote:

Hi

 

Probably this:

 

Add to your  pg_hba.conf

 

# IPv4 local connections:

host   all              all             127.0.0.1/32            trust

host   all              all             <ip of your windows machine>/32     trust

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Markus Metz
Sent: Thursday, April 21, 2016 3:25 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] postgres connection issues

 

Dear all:

 

I searched the web and all what I tried did not work. So please bear with me:

 

I trying to access a database on a linux machine from a windows computer using SQuirrel:

postgres version 9.4.5

Squirrell version 3.7

 

However, I am getting the error message on SQuirrel:

Connection to host:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

 

This is what I have done:

a) Changed postgresql.conf: listen_addresses = '*'

b) edited pg_hba.conf: host all all 127.0.0.1/32 trust

    host all all 0.0.0.0/0 trust

c) The server is running and listening at the correct port on the linux site:

   ps -efl | grep postgres

    netstat -nlp | grep postgres

 

What else could I try to enable a communication?

 

Any suggestion is highly appreciated.

 

Best,

 

Markus

 

Re: postgres connection issues

From
Markus Metz
Date:
Hello Dave:

I am using supervisord to run postgress.
So for each change in pg_hba.conf or postgresq.conf I stopped the supervisor service and started it again.

Markus

On Fri, Apr 22, 2016 at 5:06 AM, Day, David <dday@redcom.com> wrote:

Hi,

 

Did you restart or force reload of configuration files by  postgress after any of your changes to pg_hba.conf or postgresql.conf file.

Your  pg_hba entry of 0.0.0.0/0 trust should have allowed any client attachment. So my initial suggestion was

un-necessary.

 

Dave

 

 

 

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Markus Metz
Sent: Thursday, April 21, 2016 5:08 PM
To: Day, David; scrawford@pinpointresearch.com
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] postgres connection issues

 

Hi David and Steve:

Thank you for your suggestions. 

 

I changed pg_hba.conf but no success. Same error.

 

I was able to connect via putty to the server via port 5432 according to 

 

Cheers,

Markus

 

 

 

 

 

On Thu, Apr 21, 2016 at 1:19 PM, Day, David <dday@redcom.com> wrote:

Hi

 

Probably this:

 

Add to your  pg_hba.conf

 

# IPv4 local connections:

host   all              all             127.0.0.1/32            trust

host   all              all             <ip of your windows machine>/32     trust

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Markus Metz
Sent: Thursday, April 21, 2016 3:25 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] postgres connection issues

 

Dear all:

 

I searched the web and all what I tried did not work. So please bear with me:

 

I trying to access a database on a linux machine from a windows computer using SQuirrel:

postgres version 9.4.5

Squirrell version 3.7

 

However, I am getting the error message on SQuirrel:

Connection to host:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

 

This is what I have done:

a) Changed postgresql.conf: listen_addresses = '*'

b) edited pg_hba.conf: host all all 127.0.0.1/32 trust

    host all all 0.0.0.0/0 trust

c) The server is running and listening at the correct port on the linux site:

   ps -efl | grep postgres

    netstat -nlp | grep postgres

 

What else could I try to enable a communication?

 

Any suggestion is highly appreciated.

 

Best,

 

Markus