Thread: [ADMIN] listen_addresses = '*' postgresql 9.5 does not allow local connect

when i add the listen_addresses = '*' i cannot connect local (with or without
pgadmin)
as soon as i comment this out i can connect local where the server is
installed



--
View this message in context:
http://www.postgresql-archive.org/listen-addresses-postgresql-9-5-does-not-allow-local-connect-tp5964669.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: [ADMIN] listen_addresses = '*' postgresql 9.5 does not allowlocal connect

From
"David G. Johnston"
Date:
On Saturday, June 3, 2017, kschindl <chuck666xx@gmail.com> wrote:
when i add the listen_addresses = '*' i cannot connect local (with or without
pgadmin)
as soon as i comment this out i can connect local where the server is
installed


Please show some psql commands and resultant error messages.

David J. 
David G Johnston wrote
> On Saturday, June 3, 2017, kschindl <

> chuck666xx@

> > wrote:
>
> Please show some psql commands and resultant error messages.
>
> David J.

kschindl@BelgarathUbuntu:~$ sudo -u postgres psql
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Pgadmin:
Server doesn't listen
The server doesn't accept connections: the connection library reports
could not connect to server: Connection refused Is the server running on
host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

as soon as i remove the listen_addresses it works and connects on port 5432



--
View this message in context:
http://www.postgresql-archive.org/listen-addresses-postgresql-9-5-does-not-allow-local-connect-tp5964669p5964671.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: [ADMIN] Re: listen_addresses = '*' postgresql 9.5 does not allowlocal connect

From
Михаил Шурутов
Date:
Please set listen_addresses parameter and show output of command

netstat -ltxn|grep 5432

04.06.2017 06:27, kschindl пишет:
> David G Johnston wrote
>> On Saturday, June 3, 2017, kschindl <
>
>> chuck666xx@
>
>> > wrote:
>>
>> Please show some psql commands and resultant error messages.
>>
>> David J.
>
> kschindl@BelgarathUbuntu:~$ sudo -u postgres psql
> psql: could not connect to server: No such file or directory
>     Is the server running locally and accepting
>     connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
>
> Pgadmin:
> Server doesn't listen
> The server doesn't accept connections: the connection library reports
> could not connect to server: Connection refused Is the server running on
> host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
>
> as soon as i remove the listen_addresses it works and connects on port 5432
>
>
>
> --
> View this message in context:
http://www.postgresql-archive.org/listen-addresses-postgresql-9-5-does-not-allow-local-connect-tp5964669p5964671.html
> Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
>
>

--
WBR, Michail Shurutov
Postgres Professional: http://www.postgrespro.ru
The Russian Postgres Company


On Sat, Jun 3, 2017 at 8:51 PM, kschindl <chuck666xx@gmail.com> wrote:
> when i add the listen_addresses = '*' i cannot connect local (with or without
> pgadmin)
> as soon as i comment this out i can connect local where the server is
> installed

Is there another listen_addresses line in your conf file?


Scott Marlowe <scott.marlowe@gmail.com> writes:
> On Sat, Jun 3, 2017 at 8:51 PM, kschindl <chuck666xx@gmail.com> wrote:
>> when i add the listen_addresses = '*' i cannot connect local (with or without
>> pgadmin)
>> as soon as i comment this out i can connect local where the server is
>> installed

> Is there another listen_addresses line in your conf file?

I'd counsel looking into the postmaster log file.  The described symptoms
sound like the postmaster is failing to start when given this setting,
and the log should offer some clue as to why.

I think we've seen similar reports that eventually traced to local DNS
misconfiguration, but that's theorizing in advance of the evidence.

            regards, tom lane


Scott Marlowe-2 wrote
> Is there another listen_addresses line in your conf file?
>
> No did a search
> --
> Sent via pgsql-admin mailing list (

> pgsql-admin@

> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin





--
View this message in context:
http://www.postgresql-archive.org/listen-addresses-postgresql-9-5-does-not-allow-local-connect-tp5964669p5964681.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Tom Lane-2 wrote
> I'd counsel looking into the postmaster log file.  The described symptoms
> sound like the postmaster is failing to start when given this setting,
> and the log should offer some clue as to why.
>
> I think we've seen similar reports that eventually traced to local DNS
> misconfiguration, but that's theorizing in advance of the evidence.
>
>             regards, tom lane
>
>
> --
> Sent via pgsql-admin mailing list (

> pgsql-admin@

> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin

thx.
That is what the log says:
2017-06-04 10:25:38 ICT [938-1] LOG:  invalid connection type
"listen_addresses"
2017-06-04 10:25:38 ICT [938-2] CONTEXT:  line 74 of configuration file
"/etc/postgresql/9.5/main/pg_hba.conf"
2017-06-04 10:25:38 ICT [938-3] FATAL:  could not load pg_hba.conf

That is line 74
listen_addresses = '*'

copied from manual

so i am lost




--
View this message in context:
http://www.postgresql-archive.org/listen-addresses-postgresql-9-5-does-not-allow-local-connect-tp5964669p5964682.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


On 04/06/2017 07:42, kschindl wrote:
> That is what the log says:
> 2017-06-04 10:25:38 ICT [938-1] LOG:  invalid connection type
> "listen_addresses"
> 2017-06-04 10:25:38 ICT [938-2] CONTEXT:  line 74 of configuration file
> "/etc/postgresql/9.5/main/pg_hba.conf"
> 2017-06-04 10:25:38 ICT [938-3] FATAL:  could not load pg_hba.conf
>
> That is line 74
> listen_addresses = '*'
>
> copied from manual
>
> so i am lost
listen_addresses, like other configuration options, has to be configured
in postgresql.conf, not pg_hba.conf.

--
Julien Rouhaud
http://dalibo.com - http://dalibo.org


On 6/3/17, 22:42, "pgsql-admin-owner@postgresql.org on behalf of kschindl" <pgsql-admin-owner@postgresql.org on behalf
ofchuck666xx@gmail.com> wrote:
 

    Tom Lane-2 wrote
      I'd counsel looking into the postmaster log file.  The described symptoms
      sound like the postmaster is failing to start when given this setting,
      and the log should offer some clue as to why.
     
      I think we've seen similar reports that eventually traced to local DNS
      misconfiguration, but that's theorizing in advance of the evidence.
      
                  regards, tom lane
   
  
    thx.
    That is what the log says:
    2017-06-04 10:25:38 ICT [938-1] LOG:  invalid connection type
    "listen_addresses"
    2017-06-04 10:25:38 ICT [938-2] CONTEXT:  line 74 of configuration file
    "/etc/postgresql/9.5/main/pg_hba.conf"
    2017-06-04 10:25:38 ICT [938-3] FATAL:  could not load pg_hba.conf
    
    That is line 74
    listen_addresses = '*'
    
    copied from manual
    
    so i am lost
    

 The listen_addresses parameter goes in:  postgresql.conf   
 
 
doug
    


thx that was it.




--
View this message in context:
http://www.postgresql-archive.org/listen-addresses-postgresql-9-5-does-not-allow-local-connect-tp5964669p5964685.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Hello,

  check your pg_hba.conf.
here is my record :
# "local" is for Unix domain socket connections only
local   all             all                                     md5

then testing connection :
oot@jessie:/etc/postgresql/9.6/main6# psql -U postgres -p 5437
Password for user postgres:
psql (9.6.3)
Type "help" for help.
postgres=#


Steven


2017-06-04 15:11 GMT+08:00 kschindl <chuck666xx@gmail.com>:
thx that was it.




--
View this message in context: http://www.postgresql-archive.org/listen-addresses-postgresql-9-5-does-not-allow-local-connect-tp5964669p5964685.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin