[GeoNode-users] Get Remote Service (harvest CSW); add external WMS to Base Maps list

Florian Hoedt florian.hoedt at hs-owl.de
Tue Jun 23 07:52:04 PDT 2015


Hello,
I did not get any answers to my questions below. Is something unclear? Are those uncommon issues?
Questions:
[1] Get remote Services – harvest a CSW
[2] ArcGIS WMS as Base Map in GeoNode

[1] Get remote Services – harvest a CSW:

I have changed my
Local_settings.py to switch to our GeoNetwork instance which is on a different machine (Windwos Server with ArcGIS Server) since I thought GeoNode would load the data which is stored in there (but it does not):

CATALOGUE = {
    'default': {
        # The underlying CSW backend
        # ("pycsw_http", "pycsw_local", "geonetwork", "deegree")
        #'ENGINE': 'geonode.catalogue.backends.pycsw_local',
        # The FULLY QUALIFIED base url to the CSW instance for this GeoNode
        #'URL': '%scatalogue/csw' % SITEURL,

        # GeoNetwork opensource
        'ENGINE': 'geonode.catalogue.backends.geonetwork',
        'URL': 'http://gissrv.aes.hs-owl.de:8080/geonetwork/srv/en/csw',
        'USER': 'admin',
        'PASSWORD': 'AwesomePassword',

    }
}

I have added some entries to ALLOWED_HOSTS,  but am not quite shure if these are correct:

# For more information on available settings please consult the Django docs at
# https://docs.djangoproject.com/en/dev/ref/settings

ALLOWED_HOSTS=['localhost', 'geonode.aes.hs-owl.de','.hs-owl.de','*']
PROXY_ALLOWED_HOSTS=['*', 'localhost']


Since I still am not able to harvest a REMOTE CSW with the following settings:
SERVICE URL:
http://geoportal.geodaten.niedersachsen.de/harvest/srv/ger/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetCapabilities

SERVICE TYPE:
Calalogue Service

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster at localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
________________________________
Apache/2.4.7 (Ubuntu) Server at geonode.aes.hs-owl.de Port 80

ErrorLog:
[Thu Jun 18 05:20:58.600426 2015] [:error] [pid 8795] Internal Server Error: /services/register/
[Thu Jun 18 05:20:58.600469 2015] [:error] [pid 8795] Traceback (most recent call last):
[Thu Jun 18 05:20:58.600474 2015] [:error] [pid 8795]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
[Thu Jun 18 05:20:58.600479 2015] [:error] [pid 8795]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Thu Jun 18 05:20:58.600484 2015] [:error] [pid 8795]   File "/usr/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Thu Jun 18 05:20:58.600489 2015] [:error] [pid 8795]     return view_func(request, *args, **kwargs)
[Thu Jun 18 05:20:58.600493 2015] [:error] [pid 8795]   File "/usr/local/lib/python2.7/dist-packages/geonode/services/views.py", line 127, in register_service
[Thu Jun 18 05:20:58.600498 2015] [:error] [pid 8795]     return _register_harvested_service(url, name, user, password, owner=request.user)
[Thu Jun 18 05:20:58.600502 2015] [:error] [pid 8795]   File "/usr/local/lib/python2.7/dist-packages/geonode/services/views.py", line 698, in _register_harvested_service
[Thu Jun 18 05:20:58.600507 2015] [:error] [pid 8795]     csw = CatalogueServiceWeb(url)
[Thu Jun 18 05:20:58.600511 2015] [:error] [pid 8795]   File "/usr/lib/python2.7/dist-packages/owslib/csw.py", line 80, in __init__
[Thu Jun 18 05:20:58.600515 2015] [:error] [pid 8795]     self._invoke()
[Thu Jun 18 05:20:58.600520 2015] [:error] [pid 8795]   File "/usr/lib/python2.7/dist-packages/owslib/csw.py", line 598, in _invoke
[Thu Jun 18 05:20:58.600533 2015] [:error] [pid 8795]     self.response = urlopen(req, timeout=self.timeout).read()
[Thu Jun 18 05:20:58.600537 2015] [:error] [pid 8795]   File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
[Thu Jun 18 05:20:58.600542 2015] [:error] [pid 8795]     return _opener.open(url, data, timeout)
[Thu Jun 18 05:20:58.600546 2015] [:error] [pid 8795]   File "/usr/lib/python2.7/urllib2.py", line 404, in open
[Thu Jun 18 05:20:58.600550 2015] [:error] [pid 8795]     response = self._open(req, data)
[Thu Jun 18 05:20:58.600553 2015] [:error] [pid 8795]   File "/usr/lib/python2.7/urllib2.py", line 422, in _open
[Thu Jun 18 05:20:58.600557 2015] [:error] [pid 8795]     '_open', req)
[Thu Jun 18 05:20:58.600561 2015] [:error] [pid 8795]   File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
[Thu Jun 18 05:20:58.600565 2015] [:error] [pid 8795]     result = func(*args)
[Thu Jun 18 05:20:58.600569 2015] [:error] [pid 8795]   File "/usr/lib/python2.7/urllib2.py", line 1214, in http_open
[Thu Jun 18 05:20:58.600573 2015] [:error] [pid 8795]     return self.do_open(httplib.HTTPConnection, req)
[Thu Jun 18 05:20:58.600577 2015] [:error] [pid 8795]   File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
[Thu Jun 18 05:20:58.600581 2015] [:error] [pid 8795]     raise URLError(err)
[Thu Jun 18 05:20:58.600584 2015] [:error] [pid 8795] URLError: <urlopen error [Errno 111] Connection refused>
[Thu Jun 18 05:20:58.670305 2015] [:error] [pid 8795] [remote 193.16.120.81:5732] mod_wsgi (pid=8795): Exception occurred processing WSGI script '/var/www/geonode/wsgi/geonode.wsgi'.
[Thu Jun 18 05:20:58.670344 2015] [:error] [pid 8795] [remote 193.16.120.81:5732] Traceback (most recent call last):
[Thu Jun 18 05:20:58.670368 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 206, in __call__
[Thu Jun 18 05:20:58.670512 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     response = self.get_response(request)
[Thu Jun 18 05:20:58.670531 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 194, in get_response
[Thu Jun 18 05:20:58.670557 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Thu Jun 18 05:20:58.670583 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 236, in handle_uncaught_exception
[Thu Jun 18 05:20:58.670604 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     return callback(request, **param_dict)
[Thu Jun 18 05:20:58.670619 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py", line 99, in _wrapped_view
[Thu Jun 18 05:20:58.670703 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     response = view_func(request, *args, **kwargs)
[Thu Jun 18 05:20:58.670720 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/views/defaults.py", line 46, in server_error
[Thu Jun 18 05:20:58.670785 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     return http.HttpResponseServerError(template.render(Context({})))
[Thu Jun 18 05:20:58.670801 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 140, in render
[Thu Jun 18 05:20:58.671217 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     return self._render(context)
[Thu Jun 18 05:20:58.671237 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 134, in _render
[Thu Jun 18 05:20:58.671260 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     return self.nodelist.render(context)
[Thu Jun 18 05:20:58.671275 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 840, in render
[Thu Jun 18 05:20:58.671306 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     bit = self.render_node(node, context)
[Thu Jun 18 05:20:58.671320 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 854, in render_node
[Thu Jun 18 05:20:58.671337 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     return node.render(context)
[Thu Jun 18 05:20:58.671352 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 53, in render
[Thu Jun 18 05:20:58.671461 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     result = self.nodelist.render(context)
[Thu Jun 18 05:20:58.671478 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 840, in render
[Thu Jun 18 05:20:58.671499 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     bit = self.render_node(node, context)
[Thu Jun 18 05:20:58.671511 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 854, in render_node
[Thu Jun 18 05:20:58.671529 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     return node.render(context)
[Thu Jun 18 05:20:58.671541 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 155, in render
[Thu Jun 18 05:20:58.671559 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     return self.render_template(self.template, context)
[Thu Jun 18 05:20:58.671571 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 137, in render_template
[Thu Jun 18 05:20:58.671588 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     output = template.render(context)
[Thu Jun 18 05:20:58.671599 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 140, in render
[Thu Jun 18 05:20:58.671616 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     return self._render(context)
[Thu Jun 18 05:20:58.671628 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 134, in _render
[Thu Jun 18 05:20:58.671644 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     return self.nodelist.render(context)
[Thu Jun 18 05:20:58.671655 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 840, in render
[Thu Jun 18 05:20:58.671671 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     bit = self.render_node(node, context)
[Thu Jun 18 05:20:58.671683 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 854, in render_node
[Thu Jun 18 05:20:58.671699 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     return node.render(context)
[Thu Jun 18 05:20:58.671711 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/announcements/templatetags/announcements_tags.py", line 24, in render
[Thu Jun 18 05:20:58.671771 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     request = context["request"]
[Thu Jun 18 05:20:58.671789 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]   File "/usr/lib/python2.7/dist-packages/django/template/context.py", line 56, in __getitem__
[Thu Jun 18 05:20:58.671871 2015] [:error] [pid 8795] [remote 193.16.120.81:5732]     raise KeyError(key)
[Thu Jun 18 05:20:58.671894 2015] [:error] [pid 8795] [remote 193.16.120.81:5732] KeyError: 'request'


[2] ArcGIS WMS as Base Map in GeoNode
I managed to achieve this by using a cascaded WMS from Geonodes Geoserver instance. I can query the geoserver and add the wms to my map as layer.
How to get it displayed in the list of basemaps?
[cid:image001.jpg at 01D0ADD4.EEA30F00]


mit freundlichen Grüßen
Florian Hoedt

B.Sc. Florian Hoedt
Hochschule Ostwestfalen-Lippe / Campus Höxter
FB 9 Landschaftsarchitektur und Umweltplanung
An der Wilhelmshöhe 44
37671 Höxter
Tel.: 05271-687-7478
E-Mail: florian.hoedt at hs-owl.de<mailto:florian.hoedt at hs-owl.de>
www.hs-owl.de/fb9<http://www.hs-owl.de/fb9>

Von: GC-54 [mailto:nepanode at gmail.com]
Gesendet: Donnerstag, 18. Juni 2015 00:04
An: Florian Hoedt
Cc: geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
Betreff: Re: [GeoNode-users] Implementing GeoNode for University

Geonode 2.4 beta has "remote services" feature which allows admins to register remote WMS/ESRI REST/CSW services from the admin menu... I'd suggest this for the #1 but know the limitations - https://github.com/GeoNode/geonode/issues/2064.

For #2 I'd suggest putting in a wildcard for allowed proxy while testing out in your local_settings.py file within your geonode_project:
PROXY_ALLOWED_HOSTS=['*', 'localhost']

When ready for production you'll want to enter each IP address ['192.168.1.1', '_________', 'localhost'] of the servers you'll be registering remote services from. Do you have access over these ArcGIS servers? if so I'd suggest enabling their WMS service for each resource your'e registering and setting its default projection to ESPG:3857. That way legend/getfeatureinfo/query will work for those services when registered remotely. Otherwise all you'll get from registering from ESRI REST is the map export which is essentially a tiling service.

On Wed, Jun 17, 2015 at 9:33 AM, Florian Hoedt <florian.hoedt at hs-owl.de<mailto:florian.hoedt at hs-owl.de>> wrote:
Hello Internet,
Thanks for the variety of info about the usefullnes of Geonode for an organisation like my university!
I spent the last couple of days to install geonode on a server and am able to get to the web interface. Some things bother me though:
1. How can I harvest other CSW? I have a GeoNetwork running which does an excellent job there - is it possible to just use that as input for geonode?
2. I want to add our ArcGIS Server with its REST point to the list of servers, so the users could use the add layer button from the map view to query the datasets there. But I get this error:
>> DEBUG is set to False but the host of the path provided to the proxy service is not in the PROXY_ALLOWED_HOSTS setting
Seems like I should change some settings.
Thanks in advance

Florian Hoedt

B.Sc. Florian Hoedt
Hochschule Ostwestfalen-Lippe / Campus Höxter
FB 9 Landschaftsarchitektur und Umweltplanung
An der Wilhelmshöhe 44
37671 Höxter
Tel.: 05271-687-7478
E-Mail: florian.hoedt at hs-owl.de<mailto:florian.hoedt at hs-owl.de>
www.hs-owl.de/fb9<http://www.hs-owl.de/fb9>


_______________________________________________
geonode-users mailing list
geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150623/51a82cdc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 35464 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150623/51a82cdc/attachment-0001.jpg>


More information about the geonode-users mailing list