OSX上のPostgresインスタンスに接続しようとするとエラーが発生しました。しかし、接続が拒否されました - サーバーがローカルで実行されており、受け入れ中です
7782 ?? 0:00.06 /usr/local/opt/[email protected]/bin/postgres -D /usr/local/var/[email protected]
7786 ?? 0:00.00 postgres: checkpointer process
7787 ?? 0:00.01 postgres: writer process
7788 ?? 0:00.00 postgres: wal writer process
7789 ?? 0:00.00 postgres: autovacuum launcher process
7790 ?? 0:00.00 postgres: stats collector process
7794 ttys000 0:00.00 grep postgres
/tmp/.s.PGSQL.5432が存在している:私はこれを実行
Connection refused
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
:
ps -ax | grep postgres
をそしてこれを取得
は、私はこのエラーを取得しますそれは "ホイール"を持っているすべてのものとは対照的に、グループ "デーモン"を持っています。
私はPostgres 9.6からbrewを設定しました。
この原因は何ですか?
私のpg_hba.confのは、次のようになります。これを引き起こしている可能性があり
host all all 0.0.0.0/0 trust
hostnossl all all 0.0.0.0/0 trust
何?
これはPostgresがログインするものです氏は述べています:
2017-12-15 19:40:37 UTC LOG: database system was shut down at 2017-12-15 19:40:32 UTC
2017-12-15 19:40:37 UTC LOG: MultiXact member wraparound protections are now enabled
2017-12-15 19:40:37 UTC LOG: database system is ready to accept connections
2017-12-15 19:40:37 UTC LOG: autovacuum launcher started
は、私はちょうどこれを引き起こす可能性がANYTHINGを見ていませんよ。
完全にpg_hba.conf:
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
#
# local DATABASE USER METHOD [OPTIONS]
# host DATABASE USER ADDRESS METHOD [OPTIONS]
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
#
# TYPE DATABASE USER ADDRESS METHOD
# Default:
# Added by ansible
# Added by ansible
host all all 0.0.0.0/0 trust
hostnossl all all 0.0.0.0/0 trust
local all all trust
# Password hosts
# Trusted hosts
# User custom
あなたが表示さhba.conf' 'ローカル接続してみてください、とは、ホストだけのためである - 私も地元のすべてのすべての信頼関係を持っており、それはまだあなたがどのように提示してください –
のルールを表示してくださいサーバへの接続(APIを使用する場合は接続文字列またはパラメータ、コマンドラインを使用する場合は 'psql'オプション) –
動作していないソケット接続 – jcaron