open-reblock / localco.de

http://beta.openreblock.org
3 stars 2 forks source link

Operational error on http://openreblock.berkeley.edu/ #26

Open danrademacher opened 9 years ago

danrademacher commented 9 years ago

could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Traceback:

Environment:

Request Method: GET
Request URL: http://openreblock.berkeley.edu/

Django Version: 1.4
Python Version: 2.6.6
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'django.contrib.webdesign',
 'django.contrib.humanize',
 'textbits',
 'topology',
 'django.contrib.contenttypes',
 'django.contrib.gis',
 'celery',
 'djcelery',
 'reblock')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/var/www/openreblock.berkeley.edu/localcode/reblock/views.py" in recent
  639.         if len(startlst)<3:
File "/usr/lib/python2.6/site-packages/django/db/models/query.py" in __len__
  85.                 self._result_cache = list(self.iterator())
File "/usr/lib/python2.6/site-packages/django/db/models/query.py" in iterator
  291.         for row in compiler.results_iter():
File "/usr/lib/python2.6/site-packages/django/db/models/sql/compiler.py" in results_iter
  763.         for rows in self.execute_sql(MULTI):
File "/usr/lib/python2.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
  817.         cursor = self.connection.cursor()
File "/usr/lib/python2.6/site-packages/django/db/backends/__init__.py" in cursor
  306.             cursor = self.make_debug_cursor(self._cursor())
File "/usr/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py" in _cursor
  177.             self.connection = Database.connect(**conn_params)
File "/usr/lib64/python2.6/site-packages/psycopg2/__init__.py" in connect
  164.     conn = _connect(dsn, connection_factory=connection_factory, async=async)

Exception Type: OperationalError at /
Exception Value: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
joehand commented 9 years ago

Looks like its an issue with psycopg2 and/or celery (see related psycopg2 and celery issues).

If we upgrade to psycopg2 > 2.6.1 it should fix it.

cesandoval commented 9 years ago

Seems like postgres stopped on the server and had to restart it. UC Berkeley might be enforcing a change of pwd after some time (the login credentials weren't working and had to reset the pwd). I'm waiting to hear back from them.

joehand commented 8 years ago

@cesandoval looks like this happened again. Do you think upgrading psycopg2 would help this not happen again?

mojodna commented 8 years ago

(This is [still] happening [again].)