Opened 2 years ago

Closed 2 years ago

#2372 closed defect (fixed)

GeoNode fails to start after upgrade to 3.3.2

Reported by: kalxas Owned by: osgeolive@…
Priority: critical Milestone: OSGeoLive15.0
Component: OSGeoLive Keywords: GeoNode
Cc: osgeolive@…

Description

Attachments (1)

Screenshot_20220713_185105.png (136.7 KB ) - added by kalxas 2 years ago.

Download all attachments as: .zip

Change History (11)

comment:2 by kalxas, 2 years ago

GeoNode installer activated in build 120.

Error reported:

Traceback (most recent call last):
  File "/usr/bin/django-admin", line 5, in <module>
    management.execute_from_command_line()
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 357, in execute
    django.setup()
  File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/usr/lib/python3/dist-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django_user_agents'

comment:3 by kalxas, 2 years ago

Priority: majorcritical
Type: taskdefect

comment:4 by kalxas, 2 years ago

There was a python module missing, it is now included in the geonode ppa.

comment:5 by kalxas, 2 years ago

Configuring GeoNode
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/template/utils.py", line 66, in __getitem__
    return self._engines[alias]
KeyError: 'GeoNode Project Templates'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/template/backends/django.py", line 121, in get_package_libraries
    module = import_module(entry[1])
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/markdownify/templatetags/markdownify.py", line 5, in <module>
    from bleach.css_sanitizer import ALLOWED_CSS_PROPERTIES
ModuleNotFoundError: No module named 'bleach.css_sanitizer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/django-admin", line 5, in <module>
    management.execute_from_command_line()
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 361, in execute
    self.check()
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 387, in check
    all_issues = self._run_checks(
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 377, in _run_checks
    return checks.run_checks(**kwargs)
  File "/usr/lib/python3/dist-packages/django/core/checks/registry.py", line 72, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/usr/lib/python3/dist-packages/django/contrib/admin/checks.py", line 79, in check_dependencies
    for engine in engines.all():
  File "/usr/lib/python3/dist-packages/django/template/utils.py", line 90, in all
    return [self[alias] for alias in self]
  File "/usr/lib/python3/dist-packages/django/template/utils.py", line 90, in <listcomp>
    return [self[alias] for alias in self]
  File "/usr/lib/python3/dist-packages/django/template/utils.py", line 81, in __getitem__
    engine = engine_cls(params)
  File "/usr/lib/python3/dist-packages/django/template/backends/django.py", line 25, in __init__
    options['libraries'] = self.get_templatetag_libraries(libraries)
  File "/usr/lib/python3/dist-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries
    libraries = get_installed_libraries()
  File "/usr/lib/python3/dist-packages/django/template/backends/django.py", line 108, in get_installed_libraries
    for name in get_package_libraries(pkg):
  File "/usr/lib/python3/dist-packages/django/template/backends/django.py", line 123, in get_package_libraries
    raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'markdownify.templatetags.markdownify': No module named 'bleach.css_sanitizer'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/template/utils.py", line 66, in __getitem__
    return self._engines[alias]
KeyError: 'GeoNode Project Templates'

comment:7 by kalxas, 2 years ago

Progress, we are hitting a different problem when creating the db:

Configuring GeoNode
Migrations for 'ratings':
  /usr/lib/python3/dist-packages/pinax/ratings/migrations/0004_auto_20220713_1025.py
    - Alter field category on overallrating
    - Alter field category on rating
/usr/lib/python3/dist-packages/django/db/models/fields/__init__.py:1424: RuntimeWarning: DateTimeField Avatar.date_uploaded received a naive datetime (2022-07-13 10:25:11.074608) while time zone support is active.
  warnings.warn("DateTimeField %s received a naive datetime (%s)"
Operations to perform:
  Apply all migrations: account, actstream, admin, announcements, auth, avatar, base, br, contenttypes, dialogos, django_celery_beat, django_celery_results, documents, favorite, geoapp_dashboards, geoapp_geostories, geoapps, geonode_client, geonode_themes, groups, guardian, invitations, layers, management_commands_http, maps, mapstore2_adapter, monitoring, oauth2_provider, people, pinax_notifications, ratings, services, sessions, sites, socialaccount, taggit, tastypie, upload, user_messages
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying taggit.0001_initial... OK
  Applying taggit.0002_auto_20150616_2121... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0001_initial... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying people.24_initial... OK
  Applying account.0001_initial... OK
  Applying account.0002_email_max_length... OK
  Applying actstream.0001_initial... OK
  Applying actstream.0002_remove_action_data... OK
  Applying actstream.0003_add_follow_flag... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying announcements.0001_initial... OK
  Applying announcements.0002_auto_20200311_0959... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying avatar.0001_initial... OK
  Applying avatar.0002_auto_20200210_1421... OK
  Applying base.24_initial... OK
  Applying layers.24_initial... OK
  Applying services.24_initial... OK
  Applying services.0025_harvestjob... OK
  Applying services.0026_auto_20171130_0600_squashed_0041_auto_20190404_0820... OK
  Applying layers.24_to_26... OK
  Applying layers.26_to_27... OK
  Applying base.24_to_26... OK
  Applying base.26_to_27... OK
  Applying base.0027_auto_20170801_1228_squashed_0037_auto_20190222_1347... OK
  Applying layers.0027_auto_20170801_1228_squashed_0033_auto_20180606_1543... OK
  Applying services.0027_auto_20190429_0831... OK
  Applying services.0028_remove_service_last_updated... OK
  Applying services.0029_remove_service_created... OK
  Applying base.0028_curatedthumbnail... OK
  Applying base.0029_resourcebase_last_updated... OK
  Applying base.0030_resourcebase_created... OK
  Applying base.0031_auto_20200114_1651... OK
  Applying base.0032_auto_20200115_1121... OK
  Applying base.0033_auto_20200115_1145... OK
  Applying base.0034_auto_20200212_0410... OK
  Applying base.0035_auto_20200212_0428... OK
  Applying base.0036_resourcebase_doi... OK
  Applying base.0037_auto_20200305_1520... OK
  Applying base.0038_configuration... OK
  Applying base.0039_auto_20200321_1338... OK
  Applying base.0038_delete_backup... OK
  Applying base.0040_merge_20200321_2245... OK
  Applying groups.24_initial... OK
  Applying groups.26_to_27... OK
  Applying groups.0027_auto_20180105_1631_squashed_0028_auto_20180606_1543... OK
  Applying groups.0028_auto_20200114_1651... OK
  Applying groups.0029_auto_20200115_1121... OK
  Applying groups.0030_auto_20200221_1107... OK
  Applying groups.0031_auto_20200305_1522... OK
  Applying groups.0031_auto_20200304_1434... OK
  Applying groups.0032_merge_20200306_1153... OK
  Applying base.0038_auto_20200318_0953... OK
  Applying base.0041_merge_20200323_1119... OK
  Applying base.0042_auto_20200414_1554... OK
  Applying base.0043_auto_20200527_0833... OK
  Applying base.0044_resourcebase_bbox_polygon...Traceback (most recent call last):
  File "/usr/bin/django-admin", line 5, in <module>
    management.execute_from_command_line()
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/django/core/management/commands/migrate.py", line 232, in handle
    post_migrate_state = executor.migrate(
  File "/usr/lib/python3/dist-packages/django/db/migrations/executor.py", line 117, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/usr/lib/python3/dist-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/usr/lib/python3/dist-packages/django/db/migrations/executor.py", line 245, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/lib/python3/dist-packages/django/db/migrations/migration.py", line 124, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/usr/lib/python3/dist-packages/django/db/migrations/operations/fields.py", line 110, in database_forwards
    schema_editor.add_field(
  File "/usr/lib/python3/dist-packages/django/db/backends/base/schema.py", line 433, in add_field
    definition, params = self.column_sql(model, field, include_default=True)
  File "/usr/lib/python3/dist-packages/django/db/backends/base/schema.py", line 150, in column_sql
    db_params = field.db_parameters(connection=self.connection)
  File "/usr/lib/python3/dist-packages/django/db/models/fields/__init__.py", line 696, in db_parameters
    type_string = self.db_type(connection)
  File "/usr/lib/python3/dist-packages/django/contrib/gis/db/models/fields.py", line 105, in db_type
    return connection.ops.geo_db_type(self)
AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type'
/usr/lib/python3/dist-packages/django/db/models/fields/__init__.py:1424: RuntimeWarning: DateTimeField Profile.last_login received a naive datetime (2011-06-09 15:45:34) while time zone support is active.
  warnings.warn("DateTimeField %s received a naive datetime (%s)"
/usr/lib/python3/dist-packages/django/db/models/fields/__init__.py:1424: RuntimeWarning: DateTimeField Profile.date_joined received a naive datetime (2011-06-09 15:15:27) while time zone support is active.
  warnings.warn("DateTimeField %s received a naive datetime (%s)"
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedColumn: column "language" of relation "people_profile" does not exist
LINE 1: ...area" = NULL, "zipcode" = NULL, "country" = NULL, "language"...

comment:8 by kalxas, 2 years ago

Summary: GeoNode upgrade to 3.3.xGeoNode fails to start after upgrade to 3.3.2

by kalxas, 2 years ago

comment:9 by kalxas, 2 years ago

The installer issues were fixed:

See screenshot for new runtime error on apache.

comment:10 by kalxas, 2 years ago

Resolution: fixed
Status: newclosed

Fixed in build148

Note: See TracTickets for help on using tickets.