Weblog entry #379 for simonw
#379
Postgres reports IPv6 socket error
Posted by simonw on Fri 23 Jul 2010 at 16:56
In Debian Lenny I was migrating stuff between servers, and caused some sort of mess up with the ownership of some Postgres files.
In particular the /var/log/postgresql and /var/run/postgresql folders and their contents had the wrong ownership.
The error reported for this was:
2010-07-23 16:00:54 BST [4025]LOG: could not create IPv6 socket: Address family not supported by protocol
2010-07-23 16:00:54 BST [4025]FATAL: could not open configuration file "/etc/postgresql/8.3/main/pg_hba.conf": Permission denied
Now usually the genuine IPv6 error with this may be resolved by disabling the ipv6 module in /etc/modprobe.d/00local. i.e.
/etc/modprobe.d/00local:alias ipv6 off
... which has been discussed on debian-administration.org before.
I've encountered this issue before, but resolved it by rerunning "rsync" which fixed my permissions. This time rsync is playing dirty, so I now need to go figure out why it is assigning the wrong ownership. However the cautionary tale is that Postgres error messages may be misleading, especially when the set-up is toast for some reason.
Not sure a bug report is in order, more a "don't start from here" report.
In particular the /var/log/postgresql and /var/run/postgresql folders and their contents had the wrong ownership.
The error reported for this was:
2010-07-23 16:00:54 BST [4025]LOG: could not create IPv6 socket: Address family not supported by protocol
2010-07-23 16:00:54 BST [4025]FATAL: could not open configuration file "/etc/postgresql/8.3/main/pg_hba.conf": Permission denied
Now usually the genuine IPv6 error with this may be resolved by disabling the ipv6 module in /etc/modprobe.d/00local. i.e.
/etc/modprobe.d/00local:alias ipv6 off
... which has been discussed on debian-administration.org before.
I've encountered this issue before, but resolved it by rerunning "rsync" which fixed my permissions. This time rsync is playing dirty, so I now need to go figure out why it is assigning the wrong ownership. However the cautionary tale is that Postgres error messages may be misleading, especially when the set-up is toast for some reason.
Not sure a bug report is in order, more a "don't start from here" report.