Scenario risk is using "default" connection on a cluster

Bug #1167969 reported by Daniele Viganò
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Engine
Fix Released
High
Daniele Viganò

Bug Description

This bug is very similar to https://bugs.launchpad.net/oq-engine/+bug/1167776

Running a scenario risk calculation will fail with this error:

[2013-04-11 15:30:27,264 #4 marley.openquake.org CRITICAL PoolWorker-63/5924 root] Error occurred in task: 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"?

[2013-04-11 15:30:27,265 #4 marley.openquake.org ERROR PoolWorker-63/5924 root] 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"?
Traceback (most recent call last):
  File "/usr/local/stow/openquake/oq-engine/openquake/engine/utils/tasks.py", line 183, in wrapped
    task_func(*args, **kwargs)
  File "/usr/local/stow/openquake/oq-engine/openquake/engine/utils/stats.py", line 253, in wrapper
    result = func(*args, **kwargs)
  File "/usr/local/stow/openquake/oq-engine/openquake/engine/calculators/risk/scenario/core.py", line 61, in scenario
    with EnginePerformanceMonitor('hazard_getter', job_id, scenario):
  File "/usr/local/stow/openquake/oq-engine/openquake/engine/performance.py", line 148, in __init__
    pg_pid = connection.cursor().connection.get_backend_pid()
  File "/usr/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 252, in cursor
    cursor = util.CursorWrapper(self._cursor(), self)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 140, in _cursor
    self.connection = Database.connect(**conn_params)
  File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect
    connection_factory=connection_factory, async=async)
OperationalError: 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"?

The files that are causing the issue are:
openquake/engine/tools/import_gmf_scenario.py
openquake/engine/performance.py

Changed in oq-engine:
status: New → Confirmed
assignee: nobody → Daniele Viganò (daniele-vigano)
milestone: none → 1.0.0
importance: Undecided → High
Revision history for this message
Daniele Viganò (daniele-vigano) wrote :
Changed in oq-engine:
status: Confirmed → In Progress
matley (matley)
Changed in oq-engine:
status: In Progress → Fix Committed
Changed in oq-engine:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.