Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on list_layers or get_layer operations of GeoServerSpatialDatasetEngine #6

Open
swainn opened this issue Oct 3, 2016 · 1 comment

Comments

@swainn
Copy link
Member

swainn commented Oct 3, 2016

I get the following error when trying to call list_layers() or get_layer(...) operations for GeoServer:

[Errno 113] No route to host

Request Method: POST
Request URL: http://192.168.99.134:8000/apps/geoserver-app/map/

Django Version: 1.9.9
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_gravatar',
'bootstrap3',
'termsandconditions',
'tethys_config',
'tethys_apps',
'tethys_gizmos',
'tethys_services',
'tethys_compute',
'social.apps.django_app.default',
'guardian')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'tethys_portal.middleware.TethysSocialAuthExceptionMiddleware')

Traceback:

File "/usr/lib/tethys/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                 response = self.process_exception_by_middleware(e, request)
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                 response = wrapped_callback(request, _callback_args, *_callback_kwargs)
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view

  1.             return view_func(request, _args, *_kwargs)
    

File "/usr/lib/tethys/src/tethys_apps/tethysapp/geoserver_app/controllers.py" in map

  1. response = geoserver_engine.list_layers(with_properties=True)
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/tethys_dataset_services/engines/geoserver_engine.py" in list_layers

  1.     return self._handle_list(layer_objects, with_properties, debug)
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/tethys_dataset_services/engines/geoserver_engine.py" in _handle_list

  1.     gs_object_dicts = self._transcribe_geoserver_objects(gs_objects)
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/tethys_dataset_services/engines/geoserver_engine.py" in _transcribe_geoserver_objects

  1.         gs_dict_list.append(self._transcribe_geoserver_object(gs_object))
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/tethys_dataset_services/engines/geoserver_engine.py" in _transcribe_geoserver_object

  1.         if not callable(getattr(gs_object, attribute)):
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/geoserver/layer.py" in _get_default_style

  1.     return self._resolve_style(element) if element is not None else None
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/geoserver/layer.py" in _resolve_style

  1.         return self.catalog.get_style_by_url(style_workspace_url)
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/geoserver/catalog.py" in get_style_by_url

  1.         dom = self.get_xml(style_workspace_url)
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/geoserver/catalog.py" in get_xml

  1.         response, content = self.http.request(rest_url)
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/httplib2/init.py" in request

  1.                 (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/httplib2/init.py" in _request

  1.     (response, content) = self._conn_request(conn, request_uri, method, body, headers)
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/httplib2/init.py" in _conn_request

  1.                 conn.connect()
    

File "/usr/lib/tethys/local/lib/python2.7/site-packages/httplib2/init.py" in connect

  1.         raise socket.error, msg
    

Exception Type: error at /apps/geoserver-app/map/
Exception Value: [Errno 113] No route to host

@swainn
Copy link
Member Author

swainn commented Oct 3, 2016

You can replicate this issue by checking out the master branch of this demo app: https://github.com/tethysplatform/tethysapp-geoserver_app

Then change line 64 of controllers.py to:
response = geoserver_engine.list_layers(with_properties=True)

Reload the server and visit the map page (/apps/geoserver-app/map/) and you should get that error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant