Re: Cannot connect from local network to my postgresql server

From: John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com>
To: dlefebvre <dlefebvre(at)synotis(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cannot connect from local network to my postgresql server
Date: 2015-04-09 13:53:16
Message-ID: CAAJSdjhZy2vrEbG66tfkjiXA36XjD+OUba0J7rdbMmfmJJE5rw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Apr 9, 2015 at 5:00 AM, dlefebvre <dlefebvre(at)synotis(dot)com> wrote:

> Hi,
>
> I use ubuntu 14.01 and i install a postgresql 9.3 server. I want to connect
> an other pc from local network to this server. But the server seems to only
> listen on localhost.
>

​I'm running 9.3.6 on Fedora 21 x86_64.​

>
> There is the conf files :
>
> pg_hba.conf :
>

​<snip>

​Mine looks about the same.​

>
> postgresql.conf (with the only lines i changed) :
>
> # - Connection Settings -
>
> tcpip_socket = true
>
> listen_addresses = '*' # what IP address(es) to listen on;
> # comma-separated list of
> addresses;
> # defaults to 'localhost'; use '*'
> for all
> # (change requires restart)
>

​I have this commented out entirely in my configuration. I.e>

#listen_address = 'localhost"​

> port = 5432 # (change requires restart)
>
> my iptables are setup :
>
>
>
​As best as I can tell, this looks OK. ​

> and so, using netstat it seems like the server only listen on localhost :
>
> :~$ netstat -lt
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address Foreign Address State
> tcp 0 0 dlefebvre-ubuntu:domain *:* LISTEN
> tcp 0 0 localhost:ipp *:* LISTEN
> tcp 0 0 localhost:postgresql *:* LISTEN
> tcp6 0 0 ip6-localhost:ipp [::]:* LISTEN
> :~$
>

​My netstat -lt shows

<quote>
netstat -lt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State

tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN

tcp 0 0 localhost:postgres 0.0.0.0:* LISTEN

tcp 0 0 localhost:smtp 0.0.0.0:* LISTEN

tcp6 0 0 [::]:ssh [::]:* LISTEN

tcp6 0 0 localhost:postgres [::]:* LISTEN

</quote>​

​Note that my entry for postgres shows 0.0.0.0:* instead of *:*​

> Logs dosen't show any errors and of course the server is running, i can
> access in localhost without any trouble.
>
> I google all link i could found, every people who had the same issue made
> mistake in configuration file. I think i am not, this is why i request your
> help.
>
> Thanks for your time, i stay avaible if you need any more information.
>
> Cheers, Damien Lefebvre.
>
>
>
>
> --
> View this message in context:
> http://postgresql.nabble.com/Cannot-connect-from-local-network-to-my-postgresql-server-tp5845229.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
If you sent twitter messages while exploring, are you on a textpedition?

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Pennebaker 2015-04-09 14:12:00 Re: ecpg rejects input parameters
Previous Message Marc-André Goderre 2015-04-09 13:40:16 Using array_agg in pgr_kdisjkstrpath()