<div dir="ltr">Ciao Paolo,<div>doing a full reload for each layer removal is out of question as it becomes exponentially slower with the number of layers.</div><div><br></div><div>A reset (

<a href="https://docs.geoserver.org/stable/en/user/rest/api/reset.html">https://docs.geoserver.org/stable/en/user/rest/api/reset.html</a> ) can be a quick solution to try.</div><div>However, I would want to investigate this further next week with our GeoServer devs.</div><div>Do we have an issue for this yet?</div><div> <br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,<br>Simone Giannecchini<br>==<br>GeoServer Professional Services from the experts!<br>Visit <a href="http://bit.ly/gs-services" target="_blank">http://bit.ly/gs-services</a> for more information.<br>==<br>Ing. Simone Giannecchini<br>@simogeo<br>Founder/Director<br><br>GeoSolutions S.A.S.<br>Via di Montramito 3/A<br>55054  Massarosa (LU)<br>Italy<br>phone: +39 0584 962313<br>fax:     +39 0584 1660272<br>mob:   +39  333 8128928<br><br><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a><br><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a><br><br>-------------------------------------------------------<br>Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.<br><br>This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 5, 2019 at 4:02 PM Paolo Corti <<a href="mailto:pcorti@gmail.com">pcorti@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">can I do that just from API or is there a tool in GS admin site like for reload?<br>
<br>
On Thu, Sep 5, 2019 at 9:55 AM Alessio Fabiani<br>
<<a href="mailto:alessio.fabiani@geo-solutions.it" target="_blank">alessio.fabiani@geo-solutions.it</a>> wrote:<br>
><br>
> Also, maybe just try a reset instead of a reload.<br>
><br>
> Moreover, is this problem related to raster data too?<br>
><br>
> Il giorno gio 5 set 2019 alle ore 15:49 Alessio Fabiani <<a href="mailto:alessio.fabiani@geo-solutions.it" target="_blank">alessio.fabiani@geo-solutions.it</a>> ha scritto:<br>
>><br>
>> Uhm, might be a problem if you have thousands of layers on GeoServer. We need to be careful hitting the catalog reload everytime.<br>
>><br>
>> Do you have the chance to try a reload with a huge GeoServer catalog?<br>
>><br>
>> Il giorno gio 5 set 2019 alle ore 15:45 Paolo Corti <<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a>> ha scritto:<br>
>>><br>
>>> Hi Alessio<br>
>>> reloading the catalog seems to have fixed it. Maybe we should reload<br>
>>> the catalog after a layer remove? (I thought it is already the case)<br>
>>> thanks<br>
>>> Paolo<br>
>>><br>
>>> On Thu, Sep 5, 2019 at 9:35 AM Alessio Fabiani<br>
>>> <<a href="mailto:alessio.fabiani@geo-solutions.it" target="_blank">alessio.fabiani@geo-solutions.it</a>> wrote:<br>
>>> ><br>
>>> > It looks something related to GeoServer catalog.<br>
>>> ><br>
>>> > Could you try if just reloading it, instead of restarting GeoServer, also works?<br>
>>> ><br>
>>> > Il giorno gio 5 set 2019 alle ore 15:31 Paolo Corti <<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a>> ha scritto:<br>
>>> >><br>
>>> >> Dear Alessio<br>
>>> >><br>
>>> >> unfortunately this doesn't appear to be helpful. My idea is that there<br>
>>> >> is something wrong in authorization from GeoFence.<br>
>>> >><br>
>>> >> Here is what happening:<br>
>>> >> * Restart GeoServer<br>
>>> >> * First layer upload works correctly<br>
>>> >> * I then remove the layer and I upload it again<br>
>>> >> * I get the error. Checkin in GeoServer log I see:<br>
>>> >><br>
>>> >> 2019-09-05 13:25:39,175 ERROR [geoserver.rest] - No such datastore:<br>
>>> >> geonode,rivers<br>
>>> >> org.geoserver.rest.ResourceNotFoundException 404 NOT_FOUND: No such<br>
>>> >> datastore: geonode,rivers<br>
>>> >><br>
>>> >> Restarting GeoServer will fix this.<br>
>>> >> This is happening in a GeoNode project, let me see if I can experience<br>
>>> >> the same locally.<br>
>>> >><br>
>>> >> ps: I have seen your PR with the changes in gsconfig, I believe anyway<br>
>>> >> that they are useful, will merge it as soon as build is finalized.<br>
>>> >> thanks for helping with this<br>
>>> >> Paolo<br>
>>> >><br>
>>> >> On Thu, Sep 5, 2019 at 8:56 AM Alessio Fabiani<br>
>>> >> <<a href="mailto:alessio.fabiani@geo-solutions.it" target="_blank">alessio.fabiani@geo-solutions.it</a>> wrote:<br>
>>> >> ><br>
>>> >> > @Paolo any chanche to test the update of the library<br>
>>> >> ><br>
>>> >> > (maybe be sure you first removed completely the old one, gsconfig)<br>
>>> >> ><br>
>>> >> > pip install geoserver-restconfig==1.0.3<br>
>>> >> ><br>
>>> >> ><br>
>>> >> ><br>
>>> >> > Il giorno mer 4 set 2019 alle ore 23:11 Paolo Corti <<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a>> ha scritto:<br>
>>> >> >><br>
>>> >> >> Looking in the GeoServer log, it appears that GeoNode upload fails to<br>
>>> >> >> create the style (and then the layer) in step 7 because it cannot find<br>
>>> >> >> the newly created GeoServer layer (even if this was already created at<br>
>>> >> >> step 4 in the upload process). This is the error I see in GeoServer:<br>
>>> >> >><br>
>>> >> >> 2019-09-04 21:05:42,632 ERROR [geoserver.rest] - No such layer: geonode:rivers<br>
>>> >> >> org.geoserver.rest.ResourceNotFoundException 404 NOT_FOUND: No such<br>
>>> >> >> layer: geonode:rivers<br>
>>> >> >><br>
>>> >> >> That looks like a regression? Or some configuration which is not correct?<br>
>>> >> >> In my case I am using DELAYED_SECURITY_SIGNAL set to True.<br>
>>> >> >><br>
>>> >> >> thanks<br>
>>> >> >> Paolo<br>
>>> >> >><br>
>>> >> >> On Wed, Sep 4, 2019 at 5:01 PM Paolo Corti <<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a>> wrote:<br>
>>> >> >> ><br>
>>> >> >> > Hi devs<br>
>>> >> >> ><br>
>>> >> >> > I am experiencing the following issue on an instance using GeoNode<br>
>>> >> >> > master from a GeoNode project and PostGIS as a datastore. When<br>
>>> >> >> > uploading a layer, I see the following<br>
>>> >> >> > error message:<br>
>>> >> >> ><br>
>>> >> >> > >>> Step 7. Creating style for [rivers]<br>
>>> >> >> > Traceback (most recent call last):<br>
>>> >> >> >   File "/home/ubuntu/geonode/geonode/geoserver/helpers.py", line 246,<br>
>>> >> >> > in get_sld_for<br>
>>> >> >> >     _default_style = layer.default_style<br>
>>> >> >> > AttributeError: 'FeatureType' object has no attribute 'default_style'<br>
>>> >> >> > Traceback (most recent call last):<br>
>>> >> >> >   File "/home/ubuntu/geonode/geonode/geoserver/helpers.py", line 255,<br>
>>> >> >> > in get_sld_for<br>
>>> >> >> >     name = <a href="http://gs_layer.default_style.name" rel="noreferrer" target="_blank">gs_layer.default_style.name</a> if gs_layer.default_style is<br>
>>> >> >> > not None else "raster"<br>
>>> >> >> > AttributeError: 'NoneType' object has no attribute 'default_style'<br>
>>> >> >> ><br>
>>> >> >> > after that, the layer is created in Django but not in GeoServer. Any<br>
>>> >> >> > hint why this could be happening before I debug it on my own?<br>
>>> >> >> ><br>
>>> >> >> > I noticed that after restarting GeoServer the layer is again uploaded correctly.<br>
>>> >> >> > Paolo<br>
>>> >> >> ><br>
>>> >> >> > --<br>
>>> >> >> > Paolo Corti<br>
>>> >> >> > Geospatial software developer<br>
>>> >> >> > web: <a href="http://www.paolocorti.net" rel="noreferrer" target="_blank">http://www.paolocorti.net</a><br>
>>> >> >> > twitter: @capooti<br>
>>> >> >> > skype: capooti<br>
>>> >> >> > #drt3jc1<br>
>>> >> >><br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> --<br>
>>> >> >> Paolo Corti<br>
>>> >> >> Geospatial software developer<br>
>>> >> >> web: <a href="http://www.paolocorti.net" rel="noreferrer" target="_blank">http://www.paolocorti.net</a><br>
>>> >> >> twitter: @capooti<br>
>>> >> >> skype: capooti<br>
>>> >> >> #drt3jc1<br>
>>> >> >> _______________________________________________<br>
>>> >> >> geonode-devel mailing list<br>
>>> >> >> <a href="mailto:geonode-devel@lists.osgeo.org" target="_blank">geonode-devel@lists.osgeo.org</a><br>
>>> >> >> <a href="https://lists.osgeo.org/mailman/listinfo/geonode-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-devel</a><br>
>>> >> ><br>
>>> >> ><br>
>>> >> ><br>
>>> >> > --<br>
>>> >> ><br>
>>> >> > ==<br>
>>> >> ><br>
>>> >> > GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" rel="noreferrer" target="_blank">http://goo.gl/it488V</a> for more information.<br>
>>> >> > ==<br>
>>> >> > Ing. Alessio Fabiani<br>
>>> >> ><br>
>>> >> > @alfa7691<br>
>>> >> > Founder/Technical Lead<br>
>>> >> ><br>
>>> >> ><br>
>>> >> > GeoSolutions S.A.S.<br>
>>> >> > Via di Montramito 3/A - 55054  Massarosa (LU) - Italy<br>
>>> >> > phone: +39 0584 962313<br>
>>> >> > fax:     +39 0584 1660272<br>
>>> >> > mob:   +39 331 6233686<br>
>>> >> ><br>
>>> >> ><br>
>>> >> > <a href="http://www.geo-solutions.it" rel="noreferrer" target="_blank">http://www.geo-solutions.it</a><br>
>>> >> > <a href="http://twitter.com/geosolutions_it" rel="noreferrer" target="_blank">http://twitter.com/geosolutions_it</a><br>
>>> >> > -------------------------------------------------------<br>
>>> >> ><br>
>>> >> > Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.<br>
>>> >> ><br>
>>> >> ><br>
>>> >> > This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.<br>
>>> >><br>
>>> >><br>
>>> >><br>
>>> >> --<br>
>>> >> Paolo Corti<br>
>>> >> Geospatial software developer<br>
>>> >> web: <a href="http://www.paolocorti.net" rel="noreferrer" target="_blank">http://www.paolocorti.net</a><br>
>>> >> twitter: @capooti<br>
>>> >> skype: capooti<br>
>>> >> #drt3jc1<br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> > --<br>
>>> ><br>
>>> > ==<br>
>>> ><br>
>>> > GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" rel="noreferrer" target="_blank">http://goo.gl/it488V</a> for more information.<br>
>>> > ==<br>
>>> > Ing. Alessio Fabiani<br>
>>> ><br>
>>> > @alfa7691<br>
>>> > Founder/Technical Lead<br>
>>> ><br>
>>> ><br>
>>> > GeoSolutions S.A.S.<br>
>>> > Via di Montramito 3/A - 55054  Massarosa (LU) - Italy<br>
>>> > phone: +39 0584 962313<br>
>>> > fax:     +39 0584 1660272<br>
>>> > mob:   +39 331 6233686<br>
>>> ><br>
>>> ><br>
>>> > <a href="http://www.geo-solutions.it" rel="noreferrer" target="_blank">http://www.geo-solutions.it</a><br>
>>> > <a href="http://twitter.com/geosolutions_it" rel="noreferrer" target="_blank">http://twitter.com/geosolutions_it</a><br>
>>> > -------------------------------------------------------<br>
>>> ><br>
>>> > Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.<br>
>>> ><br>
>>> ><br>
>>> > This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.<br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Paolo Corti<br>
>>> Geospatial software developer<br>
>>> web: <a href="http://www.paolocorti.net" rel="noreferrer" target="_blank">http://www.paolocorti.net</a><br>
>>> twitter: @capooti<br>
>>> skype: capooti<br>
>>> #drt3jc1<br>
>><br>
>><br>
>><br>
>> --<br>
>><br>
>> ==<br>
>><br>
>> GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" rel="noreferrer" target="_blank">http://goo.gl/it488V</a> for more information.<br>
>> ==<br>
>> Ing. Alessio Fabiani<br>
>><br>
>> @alfa7691<br>
>> Founder/Technical Lead<br>
>><br>
>><br>
>> GeoSolutions S.A.S.<br>
>> Via di Montramito 3/A - 55054  Massarosa (LU) - Italy<br>
>> phone: +39 0584 962313<br>
>> fax:     +39 0584 1660272<br>
>> mob:   +39 331 6233686<br>
>><br>
>><br>
>> <a href="http://www.geo-solutions.it" rel="noreferrer" target="_blank">http://www.geo-solutions.it</a><br>
>> <a href="http://twitter.com/geosolutions_it" rel="noreferrer" target="_blank">http://twitter.com/geosolutions_it</a><br>
>> -------------------------------------------------------<br>
>><br>
>> Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.<br>
>><br>
>><br>
>> This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.<br>
><br>
><br>
><br>
> --<br>
><br>
> ==<br>
><br>
> GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" rel="noreferrer" target="_blank">http://goo.gl/it488V</a> for more information.<br>
> ==<br>
> Ing. Alessio Fabiani<br>
><br>
> @alfa7691<br>
> Founder/Technical Lead<br>
><br>
><br>
> GeoSolutions S.A.S.<br>
> Via di Montramito 3/A - 55054  Massarosa (LU) - Italy<br>
> phone: +39 0584 962313<br>
> fax:     +39 0584 1660272<br>
> mob:   +39 331 6233686<br>
><br>
><br>
> <a href="http://www.geo-solutions.it" rel="noreferrer" target="_blank">http://www.geo-solutions.it</a><br>
> <a href="http://twitter.com/geosolutions_it" rel="noreferrer" target="_blank">http://twitter.com/geosolutions_it</a><br>
> -------------------------------------------------------<br>
><br>
> Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.<br>
><br>
><br>
> This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.<br>
<br>
<br>
<br>
-- <br>
Paolo Corti<br>
Geospatial software developer<br>
web: <a href="http://www.paolocorti.net" rel="noreferrer" target="_blank">http://www.paolocorti.net</a><br>
twitter: @capooti<br>
skype: capooti<br>
#drt3jc1<br>
_______________________________________________<br>
geonode-devel mailing list<br>
<a href="mailto:geonode-devel@lists.osgeo.org" target="_blank">geonode-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-devel</a><br>
</blockquote></div>