2017-10-25 48 views
0

私のサイトは完全に稼動していました。私はメモリとコアをアップグレードするために私のサーバをオフにしました。それを再びオンにした後、私は500エラーで迎えます。デバッグモードに切り替えた後、それは次の値を返します。サーバーに接続できませんでした。 Unixドメインソケットに接続するPostgresql

OperationalError at/
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.5433"? 
Request Method: GET 
Request URL: http://mysite.nl/ 
Django Version: 1.6.11 
Exception Type: OperationalError 
Exception Value:  
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.5433"? 
Exception Location: /data_nfs/opensurfaces/venv/local/lib/python2.7/site-packages/psycopg2/__init__.py in connect, line 130 
Python Executable: /data_nfs/opensurfaces/venv/bin/python 
Python Version: 2.7.6 

私はnginxの、gunicornとPostgreSQLが主催Djangoのapplicaitonでは、Ubuntu 14.04を実行していますよ。私はソケットをサーバーに接続する必要がありますか?これどうやってするの?

一見、関連するquestionはファイルを削除するように指示しますが、このファイルはありません。

答えて

0

sudo service postgresql restartがこのトリックを行っていないことが判明しました。代わりに、私はsudo -u postgres /etc/init.d/postgresql restartを使って再起動します。

関連する問題