Opened 10 years ago

Closed 10 years ago

#1288 closed defect (fixed)

GeoNode 2.0 depends on python-dev

Reported by: kalxas Owned by: live-demo@…
Priority: major Milestone: OSGeoLive7.9
Component: OSGeoLive Keywords:
Cc: live-demo@…

Description

It seems that the configuration of GeoNode 2.0 final has changed from beta stages. I am getting the following error:

Environment:


Request Method: GET
Request URL: http://geonode/

Django Version: 1.5.1
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.sitemaps',
 'django.contrib.staticfiles',
 'django.contrib.messages',
 'django.contrib.humanize',
 'pagination',
 'taggit',
 'taggit_templatetags',
 'south',
 'friendlytagloader',
 'geoexplorer',
 'django_extensions',
 'pinax_theme_bootstrap_account',
 'pinax_theme_bootstrap',
 'django_forms_bootstrap',
 'account',
 'avatar',
 'dialogos',
 'agon_ratings',
 'notification',
 'announcements',
 'actstream',
 'user_messages',
 'geonode.people',
 'geonode.base',
 'geonode.layers',
 'geonode.upload',
 'geonode.maps',
 'geonode.proxy',
 'geonode.security',
 'geonode.search',
 'geonode.social',
 'geonode.catalogue',
 'geonode.documents')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'pagination.middleware.PaginationMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/geonode/views.py" in index
  31.     from geonode.search.views import search_page
File "/usr/local/lib/python2.7/dist-packages/geonode/search/views.py" in <module>
  59. _viewer_config = _create_viewer_config()
File "/usr/local/lib/python2.7/dist-packages/geonode/search/views.py" in _create_viewer_config
  58.     return json.dumps(_map.viewer_json(*DEFAULT_BASE_LAYERS))
File "/usr/local/lib/python2.7/dist-packages/geonode/utils.py" in viewer_json
  488.         layers = list(self.layers)
File "/usr/local/lib/python2.7/dist-packages/geonode/maps/models.py" in layers
  103.         return  [layer for layer in layers]
File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in _result_iter
  123.                 self._fill_cache()
File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in _fill_cache
  927.                     self._result_cache.append(next(self._iter))
File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in iterator
  301.         for row in compiler.results_iter():
File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in results_iter
  775.         for rows in self.execute_sql(MULTI):
File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in execute_sql
  839.         cursor = self.connection.cursor()
File "/usr/lib/python2.7/dist-packages/django/db/backends/__init__.py" in cursor
  324.             cursor = self.make_debug_cursor(self._cursor())
File "/usr/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py" in _cursor
  306.             self._sqlite_create_connection()
File "/usr/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py" in _sqlite_create_connection
  296.         self.connection = Database.connect(**kwargs)

Exception Type: OperationalError at /
Exception Value: unable to open database file

Change history (9)

comment:1 by kalxas, 10 years ago

Cc: live-demo@… added

comment:2 by kalxas, 10 years ago

in [11061]:

Reading state information...
libapache2-mod-wsgi is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-geonode : Depends: agon-ratings but it is not installable
                  Depends: beautifulsoup4 but it is not installable
                  Depends: dialogos but it is not installable
                  Depends: django-activity-stream but it is not installable
                  Depends: django-extensions but it is not installable
                  Depends: django-forms-bootstrap but it is not installable
                  Depends: django-friendly-tag-loader but it is not installable
                  Depends: django-geoexplorer but it is not installable
                  Depends: django-jsonfield but it is not installable
                  Depends: django-notification but it is not installable
                  Depends: django-pagination but it is not installable
                  Depends: django-taggit but it is not installable
                  Depends: django-taggit-templatetags but it is not installable
                  Depends: django-user-accounts but it is not installable
                  Depends: geonode-avatar but it is not installable
                  Depends: gsconfig but it is not installable
                  Depends: pinax-theme-bootstrap but it is not installable
                  Depends: pinax-theme-bootstrap-account but it is not installable
E: Unable to correct problems, you have held broken packages.
ERROR: Package install failed! Aborting.

comment:3 by kalxas, 10 years ago

After recent ppa update, GeoNode is back on the nightly builds. The problem is now that http://geonode seems not to work.

The previous database error is gone

comment:4 by kalxas, 10 years ago

Looking at the logs, there is no error, layers are updated from GeoServer, all needed packages are installed. I think this is an apache configuration issue.

comment:5 by kalxas, 10 years ago

Summary: GeoNode 2.0 fails to connect to the databaseGeoNode 2.0 depends on python-dev

After some debugging I found the following:

  1. The reason that GeoNode is not working is because the file /usr/lib/python2.7/dist-packages/geonode/wsgi.py is missing.
  1. The reason that the above file is missing is because the package python-geonode is removed at some point during the build process. If this is executed on beta3 build, GeoNode will work fine again:
    sudo apt-get install python-geonode
    
  1. The reason why python-geonode is removed is because the deb file depends on python-dev, which is removed during cleanup.

The question is: Why is python-dev needed in python-geonode? I believe this is a debian packaging bug.

comment:6 by darkblueb, 10 years ago

bugs will always occur - the ability to identify, isolate and fix are keys to moving forward. I have to say I am holding my head in my hands and wondering how to find and fix bugs like this, using a packaging based system, instead of the script based system. Thank you kalxas and also, this makes me concerned for the future of debugging build bugs on the Live.

comment:7 by kalxas, 10 years ago

Fixed in OSGeoLive PPA. In beta3 try: sudo apt-get update sudo apt-get install python-geonode

GeoNode will be pulled from our PPA now and will not install python-dev.

To be confirmed in next nightly

comment:8 by kalxas, 10 years ago

Priority: criticalmajor

comment:9 by kalxas, 10 years ago

Resolution: fixed
Status: newclosed

confirmed fixed in [11160]

Note: See TracTickets for help on using tickets.