Обсуждение: 9.4 on Ubuntu 15.04: ENETUNREACH error?

Поиск
Список
Период
Сортировка

9.4 on Ubuntu 15.04: ENETUNREACH error?

От
"Chas. Munat"
Дата:
I recently upgraded to Ubuntu 15.04 with PostgreSQL 9.4.4 with uuids and
plv8 coffeescript extensions. I can access the database via psql. My web
application uses node.js via pg-bricks. It works perfectly on my Mac dev
machine.

On the server, I get this error:

preload failed { [Error: connect ENETUNREACH 127.0.0.0:5432 - Local
(0.0.0.0:0)]
   code: 'ENETUNREACH',
   errno: 'ENETUNREACH',
   syscall: 'connect',
   address: '127.0.0.0',
   port: 5432 }

(Preload is a script in my app that does multiple queries via pg-bricks.)

I have turned off ufw, set pg_hba.conf to TRUST, done everything I can
think of -- no  joy.

Any ideas why this might be happening?

--
νz



Re: 9.4 on Ubuntu 15.04: ENETUNREACH error?

От
Adrian Klaver
Дата:
On 07/07/2015 11:21 PM, Chas. Munat wrote:
> I recently upgraded to Ubuntu 15.04 with PostgreSQL 9.4.4 with uuids and
> plv8 coffeescript extensions. I can access the database via psql. My web
> application uses node.js via pg-bricks. It works perfectly on my Mac dev
> machine.

The Mac has it's own database or is connecting to the one on the Ubuntu
machine?

>
> On the server, I get this error:
>
> preload failed { [Error: connect ENETUNREACH 127.0.0.0:5432 - Local
> (0.0.0.0:0)]
>    code: 'ENETUNREACH',
>    errno: 'ENETUNREACH',
>    syscall: 'connect',
>    address: '127.0.0.0',
>    port: 5432 }
>
> (Preload is a script in my app that does multiple queries via pg-bricks.)
>
> I have turned off ufw, set pg_hba.conf to TRUST, done everything I can
> think of -- no  joy.

Are you having IPv4/v6 issues?

Have you looked at/changed the settings for IPv6 connections in pg_hba.conf?

>
> Any ideas why this might be happening?
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: 9.4 on Ubuntu 15.04: ENETUNREACH error?

От
Tom Lane
Дата:
"Chas. Munat" <chas@munat.com> writes:
> I recently upgraded to Ubuntu 15.04 with PostgreSQL 9.4.4 with uuids and
> plv8 coffeescript extensions. I can access the database via psql. My web
> application uses node.js via pg-bricks. It works perfectly on my Mac dev
> machine.

> On the server, I get this error:

> preload failed { [Error: connect ENETUNREACH 127.0.0.0:5432 - Local
> (0.0.0.0:0)]
>    code: 'ENETUNREACH',
>    errno: 'ENETUNREACH',
>    syscall: 'connect',
>    address: '127.0.0.0',
>    port: 5432 }

Something in your configuration is trying to connect to 127.0.0.0,
which should be expected to fail.  Presumably 127.0.0.1 (the standard
IPv4 loopback address) was meant.  Look for typos in whatever is
determining the address that the client tries to connect to.

            regards, tom lane


Re: 9.4 on Ubuntu 15.04: ENETUNREACH error?

От
"Chas. Munat"
Дата:
Thanks! I'll check into this.

On 7/9/15 1:34 AM, Tom Lane wrote:
> "Chas. Munat" <chas@munat.com> writes:
>> I recently upgraded to Ubuntu 15.04 with PostgreSQL 9.4.4 with uuids and
>> plv8 coffeescript extensions. I can access the database via psql. My web
>> application uses node.js via pg-bricks. It works perfectly on my Mac dev
>> machine.
>> On the server, I get this error:
>> preload failed { [Error: connect ENETUNREACH 127.0.0.0:5432 - Local
>> (0.0.0.0:0)]
>>     code: 'ENETUNREACH',
>>     errno: 'ENETUNREACH',
>>     syscall: 'connect',
>>     address: '127.0.0.0',
>>     port: 5432 }
> Something in your configuration is trying to connect to 127.0.0.0,
> which should be expected to fail.  Presumably 127.0.0.1 (the standard
> IPv4 loopback address) was meant.  Look for typos in whatever is
> determining the address that the client tries to connect to.
>
>             regards, tom lane
>
>