geosolutions-it / geonode-generic

Generic Geonode-project based app, to be used with docker/rancher
https://waffle.io/geosolutions-it/geonode-generic
3 stars 6 forks source link

python manage.py updatelayers fails when not using the default geoserver password #44

Open sindile opened 6 years ago

sindile commented 6 years ago

I have installed geonode using Rancher Template V1.0 image I specified a different password for geoserver admin running python manage.py updatelayers fails WARNINGS: ?: (urls.W002) Your URL pattern '^/?$' [name='home'] has a regex beginning with a '/'. Remove this slash as it is unnecessary. If this pattern is targeted in an include(), ensure the include() pattern has a trailing '/'. Inspecting the available layers in GeoServer ... Traceback (most recent call last): File "manage.py", line 31, in execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 364, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 356, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv self.execute(args, cmd_options) File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute output = self.handle(args, options) File "/usr/src/geonode/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle execute_signals=True) File "/usr/src/geonode/geonode/geoserver/helpers.py", line 559, in gs_slurp resources = cat.get_resources() File "/usr/local/lib/python2.7/site-packages/geoserver/catalog.py", line 860, in get_resources for ws in self.get_workspaces(): File "/usr/local/lib/python2.7/site-packages/geoserver/catalog.py", line 1011, in get_workspaces description = self.get_xml("%s/workspaces.xml" % self.service_url) File "/usr/local/lib/python2.7/site-packages/geoserver/catalog.py", line 216, in get_xml raise FailedRequestError("Tried to make a GET request to %s but got a %d status code: \n%s" % (rest_url, response.status, content)) geoserver.catalog.FailedRequestError: Tried to make a GET request to http://geoserver:8080/geoserver/rest/workspaces.xml but got a 401 status code: <!doctype html>HTTP Status 401 – Unauthorized

HTTP Status 401 – Unauthorized


Type Status Report

Message No AuthenticationProvider found for org.springframework.security.authentication.UsernamePasswordAuthenticationToken

Description The request has not been applied because it lacks valid authentication credentials for the target resource.


Apache Tomcat/9.0.7

Reverting back to a default geoserver admin password solves the problem. This is not ideal as the default password has to be changed.

mlacayoemery commented 3 years ago

This also happens when using https://github.com/GeoNode/geoserver-restconfig directly