Thread: 9.4 on Ubuntu 15.04: ENETUNREACH error?
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
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
"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
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 > >