Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Somehow my Postgres is not anymore starting:

# psql
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
# ./postgresql start
 * Starting PostgreSQL 8.4 database server                                                                        * The PostgreSQL server failed to start. Please check the log output:
2013-03-05 12:03:16 CET LOG:  could not create IPv6 socket: Address family not supported by protocol
2013-03-05 12:03:16 CET LOG:  invalid authentication method "peer"
2013-03-05 12:03:16 CET CONTEXT:  line 84 of configuration file "/etc/postgresql/8.4/main/pg_hba.conf"
2013-03-05 12:03:16 CET LOG:  end-of-line before authentication method
2013-03-05 12:03:16 CET CONTEXT:  line 89 of configuration file "/etc/postgresql/8.4/main/pg_hba.conf"
2013-03-05 12:03:16 CET FATAL:  could not load pg_hba.conf
                                                                                                          [fail]
share|improve this question

closed as too localized by Michael Hampton, Dave M, mdpc, dunxd, Stefan Lasiewski Mar 6 '13 at 0:40

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Your pg_hba.conf file has errors. You're also trying to bind to an IPV6 socket, but don't have IPV6 enabled on your server (possibly). –  NickW Mar 5 '13 at 11:08
    
hmm.. the config was working previously... and as far as I know, nothing has changed in that area... any basic checks that I could do? for the peer auth or IPv6 ? –  poseid Mar 5 '13 at 11:12
    
Well, the file may have been corrupted? Check the lines they indicate, make sure they are correctly configured. –  NickW Mar 5 '13 at 11:16
    
hmm.. ok, thanks, I got the server up running by changing "peer" to "trust" ... that's a bit of a monkey patch, but in this experimental setup it doesn't matter.. more reading to do... –  poseid Mar 5 '13 at 11:17

1 Answer 1

up vote 3 down vote accepted

The peer authentication method appeared in PostgreSQL 9.1 and you're using 8.4. This is the reason for invalid authentication method "peer". See the docs at Client authentication (8.4) and Client authentication (9.1).

The paths look like it's a Debian or Ubuntu OS. It's not likely that the change happened automatically, because if PG 9.1 was installed side-by-side on the system with Debian packages, it would have created a new pg_hba.conf inside /etc/postgresql/9.1/main and not overwritten anything from 8.4.

share|improve this answer
    
ok, I see.. somehow, I installed a Postgres instance via a Chef recipe, and probably, there went something wrong in a provision run... thanks, for the input above. –  poseid Mar 5 '13 at 12:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.