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

WMS Record missing for layer #917

Closed
capooti opened this issue Jun 18, 2013 · 8 comments
Closed

WMS Record missing for layer #917

capooti opened this issue Jun 18, 2013 · 8 comments
Assignees
Labels
feature A new feature to be added to the codebase
Milestone

Comments

@capooti
Copy link
Member

capooti commented Jun 18, 2013

When uploading some geotiff to GN (both 1.2 and 2.0) I am experiencing this error:

The layer [weather] was not correctly saved to Catalogue/GeoServer. Error is: WMS Record missing for layer [geonode:weather]

Because of this error, the layer is NOT uploaded to GeoNode.

I have seen that this issue was already mentioned in mailing list ( @ischneider proposed something about it): https://groups.google.com/forum/#!msg/geonode-users/4l2TwJtEIsc/K3IycsdCATIJ

I suspect it is a problem connected with GeoServer.
I am attaching a sample file if you want to reproduce the error:
https://dl.dropboxusercontent.com/u/512462/geonode/issue/weather.tiff

I can investigate into this, but maybe some of you GeoServer gurus have a quick fix.

@ghost ghost assigned capooti Jun 18, 2013
@simod
Copy link
Member

simod commented Jun 20, 2013

Here the stack trace of this:
any ideas?

https://gist.github.com/simod/5822264

@simod
Copy link
Member

simod commented Jun 21, 2013

Could this be related to the specific dataset?

@capooti
Copy link
Member Author

capooti commented Jun 27, 2013

Yes, @simod in fact the problem it is that the dataset has an unrecognized srid for GeoServer.
After doing a gdal_translate with the -a_srs option set to a valid EPSG code on the image, the upload works correctly.
I am downgrading this from bug to feature request, as I think we may need a better error message here.

@simod
Copy link
Member

simod commented Jul 4, 2013

moving to 2.1

@gamesbook
Copy link
Contributor

The screen after a failed upload, when trying to upload the same file, is not informative at all:

tiff-error

The actual stack trace is:

Traceback (most recent call last):
  File ".../geonode/geonode/layers/views.py", line 149, in layer_upload
    permissions = form.cleaned_data["permissions"],
  File ".../geonode/geonode/layers/utils.py", line 471, in save
    defaults=defaults)
  File ".../.virtualenvs/geonode/local/lib/python2.7/site-packages/django/db/models/manager.py", line 146, in get_or_create
    return self.get_query_set().get_or_create(**kwargs)
  File ".../.virtualenvs/geonode/local/lib/python2.7/site-packages/django/db/models/query.py", line 491, in get_or_create
    obj.save(force_insert=True, using=self.db)
  File ".../.virtualenvs/geonode/local/lib/python2.7/site-packages/django/db/models/base.py", line 546, in save
    force_update=force_update, update_fields=update_fields)
  File ".../.virtualenvs/geonode/local/lib/python2.7/site-packages/django/db/models/base.py", line 664, in save_base
    update_fields=update_fields, raw=raw, using=using)
  File ".../.virtualenvs/geonode/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 170, in send
    response = receiver(signal=self, sender=sender, **named)
  File ".../geonode/geonode/catalogue/models.py", line 88, in catalogue_post_save
    instance.save()
  File ".../.virtualenvs/geonode/local/lib/python2.7/site-packages/django/db/models/base.py", line 546, in save
    force_update=force_update, update_fields=update_fields)
  File ".../.virtualenvs/geonode/local/lib/python2.7/site-packages/django/db/models/base.py", line 664, in save_base
    update_fields=update_fields, raw=raw, using=using)
  File ".../.virtualenvs/geonode/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 170, in send
    response = receiver(signal=self, sender=sender, **named)
  File ".../geonode/geonode/layers/models.py", line 483, in geoserver_post_save
    covWidth, covHeight = get_coverage_grid_extent(instance)[:2]
  File ".../geonode/geonode/layers/models.py", line 678, in get_coverage_grid_extent
    grid = wcs.contents[instance.workspace + ':' + instance.name].grid
KeyError: 'geonode:weather'

The data about the file gets stored in GeoNode, but obviously the actual file cannot be processed by GeoServer. What is the correct procedure here ... delete the failed image from GeoNode; or delay storing it until the whole operation succeeds? And is it not possible to capture the error from GeoServer and return that for display/checking as the current code seems to just assume the operation was successful?

@jean
Copy link
Contributor

jean commented May 9, 2014

I seem to be having a similar issue. After upload, the Geonode Django UI reports: Your layer was successfully uploaded.
However browsing the layer shows up blank, and the log contains a traceback similar to that reported by @simod . My traceback is here: https://gist.github.com/jean/347cb708b1f4d9de4691

Unlike @gamesbook I do not see any error in the Django log.

I'm running the https://github.com/GeoNode/geonode/tree/2.0.x branch.

@capooti
Copy link
Member Author

capooti commented Feb 2, 2015

I tried it right now on the original imaged (attached in my initial comment) and now with master works well.
+1 to close this

@capooti
Copy link
Member Author

capooti commented Nov 17, 2015

closing as I think it is an old one.

@capooti capooti closed this as completed Nov 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature to be added to the codebase
Projects
None yet
Development

No branches or pull requests

6 participants