Open pieterprovoost opened 2 years ago
Import currently fails for all layers on the production machine:
root@d48a96c2f1c7:/usr/src/geonode# python manage.py importlayers -v 2 import
System check identified some issues:
WARNINGS:
?: (urls.W005) URL namespace 'rest_framework' isn't unique. You may not be able to reverse all URLs in this namespace
Verifying that GeoNode is running ...
Found 1 potential layers.
[failed] Layer for 'import/acoustic_tracking_array_platform/acoustic_tracking_array_platform.shp' (1/1)
Detailed report of failures:
import/acoustic_tracking_array_platform/acoustic_tracking_array_platform.shp
================
Traceback (most recent call last):
File "/usr/src/geonode/geonode/security/utils.py", line 1038, in _update_geofence_rule
_create_geofence_rule(payload)
File "/usr/src/geonode/geonode/security/utils.py", line 1012, in _create_geofence_rule
raise GeofenceRequestError(detail=response.text)
geonode.security.utils.GeofenceRequestError: <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/9.0.53</h3></body></html>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/geonode/geonode/security/models.py", line 252, in set_default_permissions
self.set_dirty_state()
File "/usr/src/geonode/geonode/security/utils.py", line 163, in __exit__
self._execute_requests()
File "/usr/src/geonode/geonode/security/utils.py", line 169, in _execute_requests
self.adapter_requests_map[request["name"]](
File "/usr/src/geonode/geonode/security/utils.py", line 102, in update_rule
_update_geofence_rule(*args, **kwargs)
File "/usr/src/geonode/geonode/security/utils.py", line 1047, in _update_geofence_rule
raise RuntimeError(msg)
RuntimeError: Could not ADD GeoServer User admin Rule for Layer acoustic_tracking_array_platform: '<!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/9.0.53</h3></body></html>'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/geonode/geonode/layers/utils.py", line 814, in upload
layer = file_upload(
File "/usr/local/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/usr/src/geonode/geonode/layers/utils.py", line 615, in file_upload
layer = Layer.objects.create(
File "/usr/local/lib/python3.8/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/modeltranslation/manager.py", line 375, in create
return super(MultilingualQuerySet, self).create(**kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/models/query.py", line 422, in create
obj.save(force_insert=True, using=self.db)
File "/usr/src/geonode/geonode/base/models.py", line 1068, in save
super(ResourceBase, self).save(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/polymorphic/models.py", line 91, in save
return super(PolymorphicModel, self).save(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/local/lib/python3.8/site-packages/django/db/models/base.py", line 791, in save_base
post_save.send(
File "/usr/local/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 173, in send
return [
File "/usr/local/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 174, in <listcomp>
(receiver, receiver(signal=self, sender=sender, **named))
File "/usr/src/geonode/geonode/base/models.py", line 2002, in resourcebase_post_save
instance.set_missing_info()
File "/usr/src/geonode/geonode/base/models.py", line 1685, in set_missing_info
self.set_default_permissions(owner=user)
File "/usr/src/geonode/geonode/security/models.py", line 255, in set_default_permissions
raise GeoNodeException(e)
geonode.GeoNodeException: Could not ADD GeoServer User admin Rule for Layer acoustic_tracking_array_platform: '<!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Unauthorized</p><p><b>Description</b> The request has not been applied because it lacks valid authentication credentials for the target resource.</p><hr class="line" /><h3>Apache Tomcat/9.0.53</h3></body></html>'
Finished processing 1 layers in 29.21 seconds.
0 Created layers
0 Updated layers
0 Skipped layers
1 Failed layers
29.212242 seconds per layer