<div dir="auto">Are you sure Geoserver credentials (admin user and password) are configured correctly on GeoNode?<div dir="auto"><br></div><div dir="auto">Giovanni </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il gio 19 mar 2020, 21:37 Giuliano Grigolin <<a href="mailto:giuliano.geobases@gmail.com">giuliano.geobases@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">Hi all !</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">I have a GeoNode 2.8 in production, with internet domain, in Ubuntu Server 16.04.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">When i try update a layer that i import trough "Import Data" in GeoServer, i get the following message:<br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">root@geonode# python manage.py updatelayers -w geonode -f my_layer_in_GeoServer<br><br>Inspecting the available layers in GeoServer ...<br>GET <a href="http://localhost:8080/geoserver/rest/workspaces.xml" target="_blank" rel="noreferrer">http://localhost:8080/geoserver/rest/workspaces.xml</a><br>Traceback (most recent call last):<br>  File "manage.py", line 11, in <module><br>    execute_from_command_line(sys.argv)<br>  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line<br>    utility.execute()<br>  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute<br>    self.fetch_command(subcommand).run_from_argv(self.argv)<br>  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv<br>    self.execute(*args, **cmd_options)<br>  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute<br>    output = self.handle(*args, **options)<br>  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/management/commands/updatelayers.py", line 122, in handle<br>    execute_signals=True)<br>  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/helpers.py", line 531, in gs_slurp<br>    workspace = cat.get_workspace(workspace)<br>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 1031, in get_workspace<br>    workspaces = self.get_workspaces(name)<br>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 1011, in get_workspaces<br>    description = self.get_xml("%s/workspaces.xml" % self.service_url)<br>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 211, in get_xml<br>    response, content = self.http.request(rest_url)<br>  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1659, in request<br>    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)<br>  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1399, in _request<br>    (response, content) = self._conn_request(conn, request_uri, method, body, headers)<br>  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1319, in _conn_request<br>    conn.connect()<br>  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 946, in connect<br>    self.sock.connect((self.host, self.port) + sa[2:])<br>  File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 434, in connect<br>    self.__negotiatehttp(destpair[0], destpair[1])<br>  File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 400, in __negotiatehttp<br>    raise HTTPError((statuscode, statusline[2]))<br>httplib2.socks.HTTPError: (403, 'Forbidden')<br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">The 'importlayers' command returns an 403 error message too:</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">python manage.py importlayers -v 3 /mnt/GEOSRVVOL01/000-transf/34_787_test/<br>Verifying that GeoNode is running ...<br><br>Found 1 potential layers.<br><br>Using name as requested<br>In pre_save_layer<br>instance.alternate is: geonode:_34_787_test<br>Checking for permissions.<br>There are no permissions for this object, setting default perms.<br>Inside set_geofence_all for instance geonode:_34_787_test<br>going to work in workspace 'geonode'<br>Attempt 1/5 - Found layer in the database<br>>>> Step 2. Make sure we are not trying to overwrite a existing resource named [_34_787_test] with the wrong type<br>GET <a href="http://localhost:8080/geoserver/rest/workspaces.xml" target="_blank" rel="noreferrer">http://localhost:8080/geoserver/rest/workspaces.xml</a><br>[failed] Layer for '/mnt/GEOSRVVOL01/000-transf/34_787_test/34_787_test.shp' (1/1)<br><br><br>Detailed report of failures:<br><br><br>/mnt/GEOSRVVOL01/000-transf/34_787_test/34_787_test.shp<br>================<br>Traceback (most recent call last):<br>  File "/usr/local/lib/python2.7/dist-packages/geonode/layers/utils.py", line 778, in upload<br>    charset=charset)<br>  File "/usr/local/lib/python2.7/dist-packages/geonode/layers/utils.py", line 553, in file_upload<br>    defaults=defaults<br>  File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 127, in manager_method<br>    return getattr(self.get_queryset(), name)(*args, **kwargs)<br>  File "/usr/lib/python2.7/dist-packages/modeltranslation/manager.py", line 389, in get_or_create<br>    return super(MultilingualQuerySet, self).get_or_create(**kwargs)<br>  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 407, in get_or_create<br>    return self._create_object_from_params(lookup, params)<br>  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 439, in _create_object_from_params<br>    obj = self.create(**params)<br>  File "/usr/lib/python2.7/dist-packages/modeltranslation/manager.py", line 381, in create<br>    return super(MultilingualQuerySet, self).create(**kwargs)<br>  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 348, in create<br>    obj.save(force_insert=True, using=self.db)<br>  File "/usr/lib/python2.7/dist-packages/polymorphic/models.py", line 74, in save<br>    return super(PolymorphicModel, self).save(*args, **kwargs)<br>  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 734, in save<br>    force_update=force_update, update_fields=update_fields)<br>  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 771, in save_base<br>    update_fields=update_fields, raw=raw, using=using)<br>  File "/usr/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 189, in send<br>    response = receiver(signal=self, sender=sender, **named)<br>  File "/usr/local/lib/python2.7/dist-packages/geonode/decorators.py", line 44, in wrapper<br>    return func(*args, **kwargs)<br>  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/signals.py", line 87, in geoserver_post_save<br>    producer.geoserver_upload_layer(payload)<br>  File "<decorator-gen-3>", line 2, in geoserver_upload_layer<br>  File "/usr/local/lib/python2.7/dist-packages/geonode/messaging/producer.py", line 62, in sync_if_local_memory<br>    worker.run()<br>  File "/usr/lib/python2.7/dist-packages/kombu/mixins.py", line 170, in run<br>    for _ in self.consume(limit=None, **kwargs):<br>  File "/usr/lib/python2.7/dist-packages/kombu/mixins.py", line 192, in consume<br>    conn.drain_events(timeout=safety_interval)<br>  File "/usr/lib/python2.7/dist-packages/kombu/connection.py", line 301, in drain_events<br>    return self.transport.drain_events(self.connection, **kwargs)<br>  File "/usr/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 961, in drain_events<br>    get(self._deliver, timeout=timeout)<br>  File "/usr/lib/python2.7/dist-packages/kombu/utils/scheduling.py", line 56, in get<br>    return self.fun(resource, callback, **kwargs)<br>  File "/usr/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 999, in _drain_channel<br>    return channel.drain_events(callback=callback, timeout=timeout)<br>  File "/usr/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 745, in drain_events<br>    return self._poll(self.cycle, callback, timeout=timeout)<br>  File "/usr/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 402, in _poll<br>    return cycle.get(callback)<br>  File "/usr/lib/python2.7/dist-packages/kombu/utils/scheduling.py", line 56, in get<br>    return self.fun(resource, callback, **kwargs)<br>  File "/usr/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 406, in _get_and_deliver<br>    callback(message, queue)<br>  File "/usr/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 981, in _deliver<br>    callback(message)<br>  File "/usr/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 633, in _callback<br>    return callback(message)<br>  File "/usr/lib/python2.7/dist-packages/kombu/messaging.py", line 624, in _receive_callback<br>    return on_m(message) if on_m else self.receive(decoded, message)<br>  File "/usr/lib/python2.7/dist-packages/kombu/messaging.py", line 590, in receive<br>    [callback(body, message) for callback in callbacks]<br>  File "/usr/local/lib/python2.7/dist-packages/geonode/messaging/consumer.py", line 99, in on_geoserver_messages<br>    geoserver_post_save_local(layer)<br>  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/signals.py", line 130, in geoserver_post_save_local<br>    charset=instance.charset)<br>  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/upload.py", line 71, in geoserver_upload<br>    workspace = cat.get_workspace(settings.DEFAULT_WORKSPACE)<br>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 1031, in get_workspace<br>    workspaces = self.get_workspaces(name)<br>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 1011, in get_workspaces<br>    description = self.get_xml("%s/workspaces.xml" % self.service_url)<br>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 211, in get_xml<br>    response, content = self.http.request(rest_url)<br>  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1659, in request<br>    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)<br>  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1399, in _request<br>    (response, content) = self._conn_request(conn, request_uri, method, body, headers)<br>  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1319, in _conn_request<br>    conn.connect()<br>  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 946, in connect<br>    self.sock.connect((self.host, self.port) + sa[2:])<br>  File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 434, in connect<br>    self.__negotiatehttp(destpair[0], destpair[1])<br>  File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 400, in __negotiatehttp<br>    raise HTTPError((statuscode, statusline[2]))<br>HTTPError: (403, 'Forbidden')<br><br><br>Finished processing 1 layers in 3.0 seconds.<br><br>0 Created layers<br>0 Updated layers<br>0 Skipped layers<br>1 Failed layers<br>3.000000 seconds per layer<br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">Any tip on where is the prmission issue ?</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">Thanks</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br clear="all"></div><br clear="all"><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div><br></div><div><br></div><div><br></div><div><img src="https://docs.google.com/uc?export=download&id=0B0E3SdLdPu6SV19QX1pkSFJwUlE&revid=0B0E3SdLdPu6SUTJldkZmaGFTNktCRTJocXBjSXM0eG9CM0tjPQ" width="420" height="123"><br></div><div><span style="font-size:12.8px">       <span style="font-size:12.8px"></span>  </span><span style="font-size:12.8px">       </span><span style="font-size:12.8px"> </span><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank" rel="noreferrer">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</blockquote></div>