Thread: psycopg with pg_filenode

psycopg with pg_filenode

From
Tung Thanh
Date:
Dear List

I have some problem with psycopg and its connection with postgresql 
I have also removed and re-install postgresql and python-psycopg2 many time but I doesnt work for me 

the other problem when  I install Geo-node
$sudo apt-get install geonode
and the errors as you can see bellow

Traceback (most recent call last):
  File "/var/lib/geonode/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/var/lib/geonode/lib/python2.6/site-packages/south/management/commands/syncdb.py", line 90, in handle_noargs
    syncdb.Command().execute(**options)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/commands/syncdb.py", line 57, in handle_noargs
    cursor = connection.cursor()
  File "/var/lib/geonode/lib/python2.6/site-packages/django/db/backends/__init__.py", line 308, in cursor
    cursor = util.CursorWrapper(self._cursor(), self)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 177, in _cursor
    self.connection = Database.connect(**conn_params)
  File "/usr/local/lib/python2.6/dist-packages/psycopg2/__init__.py", line 179, in connect
    connection_factory=connection_factory, async=async)
psycopg2.OperationalError: FATAL:  could not open relation mapping file "global/pg_filenode.map": No such file or directory
FATAL:  could not open relation mapping file "global/pg_filenode.map": No such file or directory


Traceback (most recent call last):
  File "/var/lib/geonode/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/core/management/commands/loaddata.py", line 71, in handle
    cursor = connection.cursor()
  File "/var/lib/geonode/lib/python2.6/site-packages/django/db/backends/__init__.py", line 308, in cursor
    cursor = util.CursorWrapper(self._cursor(), self)
  File "/var/lib/geonode/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 177, in _cursor
    self.connection = Database.connect(**conn_params)
  File "/usr/local/lib/python2.6/dist-packages/psycopg2/__init__.py", line 179, in connect
    connection_factory=connection_factory, async=async)
psycopg2.OperationalError: FATAL:  could not open relation mapping file "global/pg_filenode.map": No such file or directory
FATAL:  could not open relation mapping file "global/pg_filenode.map": No such file or directory

/
Site default disabled.
To activate the new configuration, you need to run:
  service apache2 reload
Considering dependency proxy for proxy_http:
Module proxy already enabled
Module proxy_http already enabled
Enabling site geonode.
To activate the new configuration, you need to run:
  service apache2 reload
 * Restarting web server apache2                                                                                                                  ... waiting                                                                                                                              [ OK ]
 * Stopping Tomcat servlet engine tomcat6                                                                                                 [ OK ]
 * Starting Tomcat servlet engine tomcat6                                                                                                 [ OK ]
 * Restarting web server apache2                                                                                                                  ... waiting .  

Any ideas to fix many Thanks!

@Q

Re: psycopg with pg_filenode

From
Daniele Varrazzo
Date:
On Tue, Aug 13, 2013 at 3:22 PM, Tung Thanh <con500thoi@yahoo.com> wrote:
> Dear List
>
> I have some problem with psycopg and its connection with postgresql
> I have also removed and re-install postgresql and python-psycopg2 many time
> but I doesnt work for me

> psycopg2.OperationalError: FATAL:  could not open relation mapping file
> "global/pg_filenode.map": No such file or directory
> FATAL:  could not open relation mapping file "global/pg_filenode.map": No
> such file or directory

Hello Tung,

this is an error from PostgreSQL, not from psycopg. I don't know if
the cluster can be recovered, but if it doesn't contain any useful
data you can start from scratch with a new initdb run.

-- Daniele