postgresql无法创建ipv6套接字:权限被拒绝

时间:2017-02-03 01:39:49

标签: sockets service ipv6 permission-denied postgresql-9.5

如何解决这个问题?是Ubuntu 16.04

Starting PostgreSQL 9.5 database server 
The PostgreSQL server failed to start. Please check the log output: 
17-02-02 21:06:10 VET [23534-1] LOG:  could not create IPv6 socket: Permission denied 
17-02-02 21:06:10 VET [23534-2] LOG:  could not create IPv4 socket: Permission denied 
17-02-02 21:06:10 VET [23534-3] WARNING:  could not create listen socket for "localhost" 
17-02-02 21:06:10 VET [23534-4] FATAL:  could not create any TCP/IP sockets 
...fail!

1 个答案:

答案 0 :(得分:-1)

在Postgres服务器上,如果存在,则需要在/ etc / hosts中删除此行: :: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

此处提到如果*恰好包含有问题的IPv6地址,您可以通过选择listen_addresses来解决问题(这无论如何都是好的做法):

https://serverfault.com/questions/523687/could-not-create-ipv6-socket-postgresql-standby-error