kartoza / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
http://geonode.org/
GNU General Public License v3.0
8 stars 17 forks source link

Geoserver geofencing error in security models #173

Open lucernae opened 7 years ago

lucernae commented 7 years ago

The package geonode.security.models might be all related with GeoServer, because GeoServer has permission managements. When we uses QGIS Server, it generates error because it can't find GeoServer:

Replicated when uploading a layer (succeed but with debug message).

Traceback (most recent call last):
  File "/usr/src/app/geonode/security/models.py", line 262, in set_geofence_all
    auth=HTTPBasicAuth(user, passwd))
  File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 110, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /geoserver/geofence/rest/rules (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f5e471b0310>: Failed to establish a new connection: [Errno 111] Connection refused',))

Investigate either we have to create a switch on the function (disable it) or disable the entire module.

lucernae commented 7 years ago

CC @timlinux @gubuntu

Forgot to comment on this one. Do we need to create similar counterpart for QGIS Server? Adding authorization to qgis server? Right now it was handled internally by geonode using django guardian.

gubuntu commented 7 years ago

duplicate of / related to #147

Yes we do need a counterpart for QGIS server