[GeoNode-devel] [GeoNode-users] Problem with saving styles "there was an error saving the style back to the server" on 2.4b25 on trusty / Vagrant VM

Rainer Lissewski r.lissewski at aplikate.eu
Wed May 13 00:13:13 PDT 2015


Yes I saw that the permissions previously were www-data:root , so it makes
sense to change them.
Thanks for clarifying that it was the thumbnail creatiion that created the
issue. Now I understand better.
But shouldnt the corrected permissions be set during installation, i.e. in
the postinstall scripts or so?

_____________________________________
*A P L I K @ T E . E U <http://www.aplikate.eu/>*
Linux, GIS and database developer team

Wittmannsdorfer Str. 4
12053 Berlin
Germany / Allemagne

Tel.: +49 (0) 30 28 45 40 71
Mobil: +49 (0) 163 681 77 34
Fax: +49 (0)30 / 48 49 81 286

2015-05-12 18:18 GMT+02:00 Francesco Bartoli <xbartolone at gmail.com>:

> Hello Rainer,
>
> The error you are facing with is the creation of thumb for the issued
> layer in geonode and not the style itself into geoserver that should be
> created through its REST API.
>
> The permissions are correct since the process of geonode belongs to the
> user that is currently executing apache
>
> Francesco
>
> Il giorno 12/mag/2015, alle ore 18:04, Rainer Lissewski <
> r.lissewski at aplikate.eu> ha scritto:
>
> Hm I tried it and it helped. But does this make sense ? Styles arent
> uploaded to this directory but sent to geoserver via http request afaik?
>
> _____________________________________
> *A P L I K @ T E . E U <http://www.aplikate.eu/>*
> Linux, GIS and database developer team
>
> Wittmannsdorfer Str. 4
> 12053 Berlin
> Germany / Allemagne
>
> Tel.: +49 (0) 30 28 45 40 71
> Mobil: +49 (0) 163 681 77 34
> Fax: +49 (0)30 / 48 49 81 286
>
> 2015-05-12 17:05 GMT+02:00 Ariel Nunez <ingenieroariel at gmail.com>:
>
>> The fix is:
>>
>> sudo chown -R /var/www/geonode/uploaded www-data:www-data
>>
>> On Tue, May 12, 2015 at 10:01 AM, Rainer Lissewski <
>> rainerlissewski at gmail.com> wrote:
>>
>>> Hi I get an  "there was an error saving the style back to the server"
>>> msg on trying to save styles. Eventually it (partially works, but the error
>>> comes up very frequent. It is a layer that has been added from another
>>> postgis datastore along the lines  of
>>> http://geonode.readthedocs.org/en/latest/tutorials/admin/commands.html#updatelayers
>>>
>>>
>>> Stacktrace:
>>>
>>> [Tue May 12 09:52:27.968168 2015] [:error] [pid 30225:tid
>>> 139984521770752] Internal Server Error:
>>> /gs/rest/styles/HVTgeom2_9b5c1e56.xml
>>> [Tue May 12 09:52:27.968289 2015] [:error] [pid 30225:tid
>>> 139984521770752] Traceback (most recent call last):
>>> [Tue May 12 09:52:27.968356 2015] [:error] [pid 30225:tid
>>> 139984521770752]   File
>>> "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112,
>>> in get_response
>>> [Tue May 12 09:52:27.968386 2015] [:error] [pid 30225:tid
>>> 139984521770752]     response = wrapped_callback(request, *callback_args,
>>> **callback_kwargs)
>>> [Tue May 12 09:52:27.968475 2015] [:error] [pid 30225:tid
>>> 139984521770752]   File
>>> "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/views.py", line
>>> 339, in geoserver_rest_proxy
>>> [Tue May 12 09:52:27.968545 2015] [:error] [pid 30225:tid
>>> 139984521770752]     style_update(request, url)
>>> [Tue May 12 09:52:27.968573 2015] [:error] [pid 30225:tid
>>> 139984521770752]   File
>>> "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/helpers.py", line
>>> 1481, in style_update
>>> [Tue May 12 09:52:27.968715 2015] [:error] [pid 30225:tid
>>> 139984521770752]     layer.save()
>>> [Tue May 12 09:52:27.968732 2015] [:error] [pid 30225:tid
>>> 139984521770752]   File
>>> "/usr/lib/python2.7/dist-packages/polymorphic/polymorphic_model.py", line
>>> 90, in save
>>> [Tue May 12 09:52:27.968742 2015] [:error] [pid 30225:tid
>>> 139984521770752]     return super(PolymorphicModel, self).save(*args,
>>> **kwargs)
>>> [Tue May 12 09:52:27.968751 2015] [:error] [pid 30225:tid
>>> 139984521770752]   File
>>> "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 545, in
>>> save
>>> [Tue May 12 09:52:27.968761 2015] [:error] [pid 30225:tid
>>> 139984521770752]     force_update=force_update, update_fields=update_fields)
>>> [Tue May 12 09:52:27.968770 2015] [:error] [pid 30225:tid
>>> 139984521770752]   File
>>> "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 582, in
>>> save_base
>>> [Tue May 12 09:52:27.968779 2015] [:error] [pid 30225:tid
>>> 139984521770752]     update_fields=update_fields, raw=raw, using=using)
>>> [Tue May 12 09:52:27.968801 2015] [:error] [pid 30225:tid
>>> 139984521770752]   File
>>> "/usr/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 185,
>>> in send
>>> [Tue May 12 09:52:27.968839 2015] [:error] [pid 30225:tid
>>> 139984521770752]     response = receiver(signal=self, sender=sender,
>>> **named)
>>> [Tue May 12 09:52:27.968865 2015] [:error] [pid 30225:tid
>>> 139984521770752]   File
>>> "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/signals.py", line
>>> 390, in geoserver_post_save
>>> [Tue May 12 09:52:27.968931 2015] [:error] [pid 30225:tid
>>> 139984521770752]     create_thumbnail(instance, thumbnail_remote_url,
>>> thumbnail_create_url, ogc_client=http_client)
>>> [Tue May 12 09:52:27.968959 2015] [:error] [pid 30225:tid
>>> 139984521770752]   File
>>> "/usr/local/lib/python2.7/dist-packages/geonode/layers/utils.py", line 592,
>>> in create_thumbnail
>>> [Tue May 12 09:52:27.969019 2015] [:error] [pid 30225:tid
>>> 139984521770752]     instance.save_thumbnail(filename, image=image)
>>> [Tue May 12 09:52:27.969048 2015] [:error] [pid 30225:tid
>>> 139984521770752]   File
>>> "/usr/local/lib/python2.7/dist-packages/geonode/base/models.py", line 559,
>>> in save_thumbnail
>>> [Tue May 12 09:52:27.969075 2015] [:error] [pid 30225:tid
>>> 139984521770752]     with open(os.path.join(upload_path, filename), 'w') as
>>> f:
>>> [Tue May 12 09:52:27.969106 2015] [:error] [pid 30225:tid
>>> 139984521770752] IOError: [Errno 13] Permission denied:
>>> u'/var/www/geonode/uploaded/thumbs/layer-efe85a37-9a78-41ce-9692-cd0920486afd-thumb.png'
>>> [Tue May 12 09:52:27.988412 2015] [:error] [pid 30225:tid
>>> 139984521770752] [remote 10.0.2.2:15799] mod_wsgi (pid=30225):
>>> Exception occurred processing WSGI script
>>> '/var/www/geonode/wsgi/geonode.wsgi'.
>>>
>>>
>>> _______________________________________________
>>> geonode-devel mailing list
>>> geonode-devel at lists.osgeo.org
>>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-devel
>>>
>>>
>>
> _______________________________________________
> geonode-users mailing list
> 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-devel/attachments/20150513/dfc1d37d/attachment.html>


More information about the geonode-devel mailing list