<div dir="ltr"><div><div><div><div>OK, I gave up in trying to find why my GeoFence / GeoServer / GeoNode was acting all crazy. Since I only needed WMS access to the layers, I fixed my problem in the most embarrassingly (and ugly) way possible.<br><br></div>I wrote a python code that will get a list of layers using WMS GetCapabilities and the list of GeoFence Rules (both authenticated as the geoserver admin). I then look for layers that have no rules set and allow both WMS and GWC for each.<br><br></div><div>Funny thins is that while creating the rules, all of a sudden it stops working (response 500 from the GeoFence post request). I then restart tomcat, create one rule manually and then my script will work again. Seems like GeoFence is chocking... <br></div><div><br></div>For now it seems to be working. Just hope I don't break more things in the process :)<br><br></div>Cheers<br></div>Daniel<br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 7, 2018 at 11:25 AM Alessio Fabiani <<a href="mailto:alessio.fabiani@geo-solutions.it">alessio.fabiani@geo-solutions.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The risk is very high.<div><br></div><div>Try to compare the one from 2.7.x branch with your one. Maybe they have diverged less.</div></div><div class="gmail_extra"></div><div class="gmail_extra"><br clear="all"><div><div class="m_-9001183749271107525gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Regards,</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Alessio Fabiani</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Ing. Alessio Fabiani</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">@alfa7691</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Founder/Technical Lead</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">GeoSolutions S.A.S.</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g">Via di Montramito 3/A</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g">55054 Massarosa</a> (LU)</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Italy</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">phone: <a href="tel:+39%200584%20962313" value="+390584962313" target="_blank">+39 0584 962313</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">fax: <a href="tel:+39%200584%20166%200272" value="+3905841660272" target="_blank">+39 0584 1660272</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">mob: <a href="tel:+39%20331%20623%203686" value="+393316233686" target="_blank">+39 331 6233686</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">-------------------------------------------------------</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">AVVERTENZE AI SENSI DEL D.Lgs. 196/2003</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"> </span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.</span></p></span></div></div></div></div></div></div></div></div>
<br></div><div class="gmail_extra"><div class="gmail_quote">2018-03-07 15:22 GMT+01:00 Daniel Victoria <span dir="ltr"><<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've seem that the geonode/security/models.py in the master branch is quite different from what I got installed using the apt-sources. The file from the 2.6.x branch also differs from what I've got. Can I pull the security/models.py from the 2.6.x branch into my APT installation? Or do I risk messing things up even more?<br><br><br></div><div class="m_-9001183749271107525HOEnZb"><div class="m_-9001183749271107525h5"><br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 7, 2018 at 10:55 AM Alessio Fabiani <<a href="mailto:alessio.fabiani@geo-solutions.it" target="_blank">alessio.fabiani@geo-solutions.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Uhm that's strange, from what I see on the code it should be the same that updating permissions from the gui.<div><br></div><div><div><font face="monospace, monospace">print 'Synchronizing permissions for layer %s/%s: %s' % (count, layers_count, layer.alternate)</font></div><div><font face="monospace, monospace">perm_spec = json.loads(_perms_info_json(layer))</font></div><div><font face="monospace, monospace">layer.set_permissions(perm_spec)</font></div></div><div><br></div><div><br></div><div>it's possible that the old geofence methods have some bugs. There were a lot or fixes since 2.6.3 version there also.</div><div><br></div><div><br></div></div><div class="gmail_extra"></div><div class="gmail_extra"><br clear="all"><div><div class="m_-9001183749271107525m_2732205575512000116m_-5147210788688889125gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Regards,</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Alessio Fabiani</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Ing. Alessio Fabiani</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">@alfa7691</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Founder/Technical Lead</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">GeoSolutions S.A.S.</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g" target="_blank">Via di Montramito 3/A</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g" target="_blank">55054 Massarosa</a> (LU)</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Italy</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">phone: <a href="tel:+39%200584%20962313" value="+390584962313" target="_blank">+39 0584 962313</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">fax: <a href="tel:+39%200584%20166%200272" value="+3905841660272" target="_blank">+39 0584 1660272</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">mob: <a href="tel:+39%20331%20623%203686" value="+393316233686" target="_blank">+39 331 6233686</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">-------------------------------------------------------</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">AVVERTENZE AI SENSI DEL D.Lgs. 196/2003</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"> </span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.</span></p></span></div></div></div></div></div></div></div></div>
<br></div><div class="gmail_extra"><div class="gmail_quote">2018-03-07 13:54 GMT+01:00 Daniel Victoria <span dir="ltr"><<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Thanks Alessio,<br><br></div>I had substituted "layer.alternate" to "<a href="http://layer.name" target="_blank">layer.name</a>" and sync_geofence worked with no complains. I also added a 5 second timeout between each layer processing to try to bypass the problem mentioned by Paolo when adding several rules to GeoFence.<br><br></div>However, each time I run sync_geofence I still get a different set of data access rules in GeoFence. And I haven't figured out a pattern of which layers are or not included in the rules. <br><br></div>Cheers<span class="m_-9001183749271107525m_2732205575512000116m_-5147210788688889125HOEnZb"><font color="#888888"><br></font></span></div><span class="m_-9001183749271107525m_2732205575512000116m_-5147210788688889125HOEnZb"><font color="#888888">Daniel<br></font></span></div><div class="m_-9001183749271107525m_2732205575512000116m_-5147210788688889125HOEnZb"><div class="m_-9001183749271107525m_2732205575512000116m_-5147210788688889125h5"><br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 7, 2018 at 5:34 AM Alessio Fabiani <<a href="mailto:alessio.fabiani@geo-solutions.it" target="_blank">alessio.fabiani@geo-solutions.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear all,<div>"alternate" attribute has been introduced on GeoNode 2.7+ with the update of pycsw.</div><div><br></div><div>In the older versions you must use "typename" instead.</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-9001183749271107525m_2732205575512000116m_-5147210788688889125m_-5379664616107065136m_594075388298869118gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Regards,</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Alessio Fabiani</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Ing. Alessio Fabiani</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">@alfa7691</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Founder/Technical Lead</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">GeoSolutions S.A.S.</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g" target="_blank">Via di Montramito 3/A</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g" target="_blank">55054 Massarosa</a> (LU)</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Italy</span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">phone: <a href="tel:+39%200584%20962313" value="+390584962313" target="_blank">+39 0584 962313</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">fax: <a href="tel:+39%200584%20166%200272" value="+3905841660272" target="_blank">+39 0584 1660272</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">mob: <a href="tel:+39%20331%20623%203686" value="+393316233686" target="_blank">+39 331 6233686</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">-------------------------------------------------------</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">AVVERTENZE AI SENSI DEL D.Lgs. 196/2003</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap"> </span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;vertical-align:baseline;white-space:pre-wrap">The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.</span></p></span></div></div></div></div></div></div></div></div></div><div class="gmail_extra">
<br><div class="gmail_quote">2018-03-06 17:26 GMT+01:00 Daniel Victoria <span dir="ltr"><<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi Paolo,<br><br></div>I removed the try block. The error happens in the first print statement, when it tries to print layer.alternate.<br>It says:<br><font size="2"><span style="font-family:monospace">AttributeError: 'Layer' object has no attribute 'alternate'<br></span><br></font></div><font size="2">I then removed the layer.alternate from the print statement and the sync_geofence command runs. But each time I run it, I get a different number of geofence data rules.<br></font></div><font size="2">I'll try to run the commands in a python interpreter and try to identify what's going on.<br><br></font></div><font size="2">Cheers<br></font><div><div><div><br></div></div></div></div><div class="m_-9001183749271107525m_2732205575512000116m_-5147210788688889125m_-5379664616107065136m_594075388298869118HOEnZb"><div class="m_-9001183749271107525m_2732205575512000116m_-5147210788688889125m_-5379664616107065136m_594075388298869118h5"><br><div class="gmail_quote"><div dir="ltr">On Tue, Mar 6, 2018 at 11:37 AM Paolo Corti <<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Daniel<br>
remove the try block, and paste here the error trace stack<br>
ps: to debug with the shell, you must use "django-admin shell" command<br>
(which is "geonode shell" if you are using the Ubuntu package, I<br>
believe)<br>
thanks<br>
Paolo<br>
<br>
On Tue, Mar 6, 2018 at 7:11 AM, Daniel Victoria<br>
<<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>> wrote:<br>
> Hi Paolo,<br>
><br>
> There are 2 print statements in the except block. The first prints the error<br>
> and the second is the one that complains about the variable 'perm_spec'<br>
> referenced before assignment.<br>
><br>
> If I comment out just the second print statement I the following message<br>
> printed to the screen, one for each layer registered in GeoServer<br>
><br>
> ('Unexpected error:', <type 'exceptions.AttributeError'>)<br>
><br>
> I tried to run the commands in a python interpreter to debug this. But I<br>
> could not get the environment set. When I import the geonode.layers.models<br>
> in the interpreter, it complains about django_settings_module.<br>
><br>
> Cheers<br>
> Daniel<br>
><br>
> On Mon, Mar 5, 2018 at 10:08 PM Paolo Corti <<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a>> wrote:<br>
>><br>
>> Hi Daniel<br>
>> can you try to remove the line with the print statement and see what<br>
>> kind of error is raising?<br>
>><br>
>> Paolo<br>
>><br>
>> On Mon, Mar 5, 2018 at 12:26 PM, Daniel Victoria<br>
>> <<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>> wrote:<br>
>> > Hi Paolo,<br>
>> ><br>
>> > Thanks for the tip. However, I installed GeoNode from the APT repository<br>
>> > and<br>
>> > I have no idea how to upgrade GeoNode or change GeoFence store from H2<br>
>> > to<br>
>> > PostgreSQL.<br>
>> ><br>
>> > I also added time.sleep(5) in sync_geofence.py, right before the try<br>
>> > block<br>
>> > but I'm still getting an error: It fails with the message:<br>
>> ><br>
>> > ('Unexpected error:', <type 'exceptions.AttributeError'>)<br>
>> > Traceback (most recent call last):<br>
>> > File "/usr/bin/django-admin", line 21, in <module><br>
>> > management.execute_from_command_line()<br>
>> > File<br>
>> > "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",<br>
>> > line<br>
>> > 354, in execute_from_command_line<br>
>> > utility.execute()<br>
>> > File<br>
>> > "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",<br>
>> > line<br>
>> > 346, in execute<br>
>> > self.fetch_command(subcommand).run_from_argv(self.argv)<br>
>> > File<br>
>> > "/usr/lib/python2.7/dist-packages/django/core/management/base.py",<br>
>> > line 394, in run_from_argv<br>
>> > self.execute(*args, **cmd_options)<br>
>> > File<br>
>> > "/usr/lib/python2.7/dist-packages/django/core/management/base.py",<br>
>> > line 445, in execute<br>
>> > output = self.handle(*args, **options)<br>
>> > File<br>
>> ><br>
>> > "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/management/commands/sync_geofence.py",<br>
>> > line 60, in handle<br>
>> > print 'perm_spec is %s' % perm_spec<br>
>> > UnboundLocalError: local variable 'perm_spec' referenced before<br>
>> > assignment<br>
>> ><br>
>> > Any other tips on how to fix this permission mess-up?<br>
>> ><br>
>> > Thanks<br>
>> > Daniel<br>
>> ><br>
>> > On Mon, Mar 5, 2018 at 12:13 PM Paolo Corti <<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a>> wrote:<br>
>> >><br>
>> >> Another option could be to run a time.sleep for some seconds after<br>
>> >> each layer iteration in sync_geofence command<br>
>> >> cheers<br>
>> >> Paolo<br>
>> >><br>
>> >> On Mon, Mar 5, 2018 at 10:04 AM, Paolo Corti <<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a>> wrote:<br>
>> >> > Hi Daniel<br>
>> >> ><br>
>> >> > You seem to have hit this bug which I reported to GeoFence team in<br>
>> >> > the<br>
>> >> > past:<br>
>> >> > <a href="https://github.com/geoserver/geofence/issues/98" rel="noreferrer" target="_blank">https://github.com/geoserver/geofence/issues/98</a><br>
>> >> ><br>
>> >> > I didn't notice this happening in latest GeoFence version, so<br>
>> >> > upgrading to latest GeoNode could be an option.<br>
>> >> > Or you could try to use PostgreSQL instead than H2 as a GeoFence<br>
>> >> > store<br>
>> >> ><br>
>> >> > hope this helps<br>
>> >> ><br>
>> >> > cheers<br>
>> >> > Paolo<br>
>> >> ><br>
>> >> > On Mon, Mar 5, 2018 at 9:19 AM, Daniel Victoria<br>
>> >> > <<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>> wrote:<br>
>> >> >> Update: Apparently, if I update the layer permissions in the web<br>
>> >> >> interface<br>
>> >> >> or if i run `geonode updatelayers -f <layer_name>`, the correct<br>
>> >> >> GeoFence<br>
>> >> >> permissions are created. Thus, doing so a layer at a time works. But<br>
>> >> >> several<br>
>> >> >> layers at once, no.<br>
>> >> >><br>
>> >> >> What should I look for in the GeoServer log to try to figure out<br>
>> >> >> where<br>
>> >> >> the<br>
>> >> >> problem is occurring? I can attach the GeoServer log if that helps.<br>
>> >> >><br>
>> >> >> Cheers<br>
>> >> >> Daniel<br>
>> >> >><br>
>> >> >> On Mon, Mar 5, 2018 at 9:52 AM Daniel Victoria<br>
>> >> >> <<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>><br>
>> >> >> wrote:<br>
>> >> >>><br>
>> >> >>> Hi list,<br>
>> >> >>><br>
>> >> >>> I have GeoNode 2.6.3, installed from apt, in a Ubuntu machine.<br>
>> >> >>> Right<br>
>> >> >>> now i<br>
>> >> >>> have 108 registered layers, some imported using the web interface,<br>
>> >> >>> some<br>
>> >> >>> using the `geonode importlayers` command.<br>
>> >> >>><br>
>> >> >>> Last week I noticed that some of the layers I was importing using<br>
>> >> >>> the<br>
>> >> >>> management command had view permission problems. I realized that<br>
>> >> >>> the<br>
>> >> >>> cause<br>
>> >> >>> was that the GeoFence rules were not being created correctly.<br>
>> >> >>><br>
>> >> >>> Looking at the messages on the list, I saw that there were some<br>
>> >> >>> discussions about this issue and that 1) there was a patch for<br>
>> >> >>> geoserver/helper.py [1] and 2) a new `sync_geofence` management<br>
>> >> >>> command.<br>
>> >> >>><br>
>> >> >>> I applied the patch and downloaded the `sync_geofence` command.<br>
>> >> >>><br>
>> >> >>> Now, every time I run `geonode updatelayers` I end up with a<br>
>> >> >>> different<br>
>> >> >>> set<br>
>> >> >>> of rules in GeoFence. Some times with 106 rules, some times with<br>
>> >> >>> 209<br>
>> >> >>> rules<br>
>> >> >>> etc. And I can't run `geonode sync_geofence` since I'm getting an<br>
>> >> >>> error:<br>
>> >> >>><br>
>> >> >>> UnboundLocalError: local variable 'perm_spec' referenced before<br>
>> >> >>> assignment<br>
>> >> >>><br>
>> >> >>> Any idea how to fix this issue so I don't have to manually create<br>
>> >> >>> the<br>
>> >> >>> GeoFence rules? And also, not have `geonode updatelayers` mess up<br>
>> >> >>> the<br>
>> >> >>> rules<br>
>> >> >>> already created?<br>
>> >> >>><br>
>> >> >>> Cheers<br>
>> >> >>> Daniel<br>
>> >> >>><br>
>> >> >>> [1] -<br>
>> >> >>><br>
>> >> >>><br>
>> >> >>> <a href="https://github.com/GeoNode/geonode/commit/94b3b6abfd1bc856be94eb58f5bf13" rel="noreferrer" target="_blank">https://github.com/GeoNode/geonode/commit/94b3b6abfd1bc856be94eb58f5bf13</a><br>
>> >> >><br>
>> >> >><br>
>> >> >> _______________________________________________<br>
>> >> >> geonode-users mailing list<br>
>> >> >> <a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
>> >> >> <a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
>> >> >><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>
>> >><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>
>><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>
<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>
</blockquote></div>
</div></div><br>_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
<br></blockquote></div><br></div></blockquote></div>
</div></div></blockquote></div><br></div></blockquote></div>
</div></div></blockquote></div><br></div></blockquote></div>