<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hello José,<br></div><div><br data-mce-bogus="1"></div><div>The line: " <!--StartFragment-->Could not ADD GeoServer User 'admin' Rule for Layer 'termicas': ''Duplicate Rule Rule[id:null pri:3742 user:admin srv:WPS ws:geonode l:termicas acc:ALLOW]''<!--EndFragment--> "<br data-mce-bogus="1"></div><div>means there was already a rule with the same content in place. There shouldn´t be any upcoming issues.<br data-mce-bogus="1"></div><div><br></div><div data-marker="__SIG_PRE__">-- <br>MSc Florian Hoedt<br>Coordinator Geoinformatics | OpenData Representative<br>Thünen Institute, Centre for Information Management<br>Bundesallee 44<br>38116 Braunschweig<br><br>Tel:  +49 531 596-1428<br>Fax:  +49 531 596-1499<br>Mail: florian.hoedt@thuenen.de<br>Web:  www.thuenen.de<br><br>The Johann Heinrich von Thünen Institute, Federal Research Institute for Rural Areas, Forestry and Fisheries – Thünen Institute in brief – consists of 14 specialized institutes that carry out research and provide policy advice in the fields of economy, ecology and technology.</div><br><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>Von: </b>"Jose Cáceres" <jose.atyus@gmail.com><br><b>An: </b>"geonode-users" <geonode-users@lists.osgeo.org><br><b>Gesendet: </b>Freitag, 7. Februar 2020 23:50:37<br><b>Betreff: </b>Re: [GeoNode-users] Updatelayers failed<br></div><br><div data-marker="__QUOTED_TEXT__"><div dir="ltr"><div dir="ltr">Hi again,<br><div>Sorry but just as a followed up, I did the following lines as suggested here 

<a href="http://osgeo-org.1560.x6.nabble.com/Command-updatelayers-and-createsuperuser-in-docker-compose-td5393949.html" target="_blank" rel="nofollow noopener noreferrer">http://osgeo-org.1560.x6.nabble.com/Command-updatelayers-and-createsuperuser-in-docker-compose-td5393949.html</a>:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div> </div>mkdir -p /usr/src/app/; \<br>    source $HOME/.override_env; \<br>    echo DATABASE_URL=$DATABASE_URL; \<br>    echo GEODATABASE_URL=$GEODATABASE_URL; \<br>    echo SITEURL=$SITEURL; \<br>    echo ALLOWED_HOSTS=$ALLOWED_HOSTS; \<br>    echo GEOSERVER_PUBLIC_LOCATION=$GEOSERVER_PUBLIC_LOCATION; \<br>    django-admin createsuperuser</blockquote><div><br><br>Then I created the superuser and ran again:</div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>DJANGO_SETTINGS_MODULE=geonode.settings python manage.py updatelayers -w geonode<br></div><br></blockquote>This time it ran ok, although for every layer I got the following message:</div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>Could not ADD GeoServer User 'admin' Rule for Layer 'termicas': ''Duplicate Rule Rule[id:null pri:3742 user:admin srv:WPS ws:geonode l:termicas acc:ALLOW]''<br></div><br></blockquote>But in the end it showed as expected:</div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>113 Created layers<br>1 Updated layers<br>0 Failed layers<br>10.98 seconds per layer<br></div></blockquote><br></div><br><div>I can see my layers just fine in Geonode, but I'm not sure if the error that I got is gonna mess everything, so I would like to know why was that about.</div><br><div>Again thanks for your help.</div><br><div>Kind regards,</div><br><div>José</div><br><br><br><br><div>
        <table cellspacing="0" cellpadding="8" border="0"><tbody><tr><td>
                    <a href="https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&" style="text-decoration:none" target="_blank" rel="nofollow noopener noreferrer">
                        <img alt="Mailtrack" class="" src="https://s3.amazonaws.com/mailtrack-signature/sender_notified.gif" width="32" height="32">
                    </a>
                </td><td>
                    <span style="color:#777">Remitente notificado con</span> <br>
                    <a href="https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&" style="color:#4374f7" target="_blank" rel="nofollow noopener noreferrer">Mailtrack</a>
                    <span style="font-size:0">07/02/20 16:48:26</span>
                </td><td>
                    
                </td></tr></tbody></table>
    </div></div><br><div class="elided-text"><div dir="ltr">On Fri, Feb 7, 2020 at 1:42 PM Jose Cáceres <<a href="mailto:jose.atyus@gmail.com" target="_blank" rel="nofollow noopener noreferrer">jose.atyus@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"><div dir="ltr">Hi everyone,<br><div>Hope everything is well.</div><br><div>I'm running geonode 2.10 using docker instance as per this instructions: <a href="http://docs.geonode.org/en/2.10.x/install/core/#docker" target="_blank" rel="nofollow noopener noreferrer">http://docs.geonode.org/en/2.10.x/install/core/#docker</a> </div><br><div>I'm running it on a local IP, not localhost directly, but I thought everything went well with the installation since I could load the page, load geoserver, uploading a layer using the upload function form the site, I could dump me own database into geonode_data and I could see my layers in geoserver, all as shown in the screenshots attached.</div><br><div>However, when I try to import my data to geonode from geoserver, using the updatelayers command I get the following error message.</div><br><div>So I enter the container running:</div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><pre style="font-family:'sfmono-regular' , 'menlo' , 'monaco' , 'consolas' , 'liberation mono' , 'courier new' , 'courier' , monospace;font-size:12px;margin-top:0px;margin-bottom:0px;padding:12px;line-height:1.4;color:rgb( 64 , 64 , 64 )">docker <span style="color:rgb( 0 , 112 , 32 )">exec</span> -it geoserver4geonode /bin/bash</pre></div></blockquote><div>The I ran:</div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><pre style="font-family:'sfmono-regular' , 'menlo' , 'monaco' , 'consolas' , 'liberation mono' , 'courier new' , 'courier' , monospace;font-size:12px;margin-top:0px;margin-bottom:0px;padding:12px;line-height:1.4;color:rgb( 64 , 64 , 64 )">python manage.py makemigrations
python manage.py migrate</pre><pre style="font-family:'sfmono-regular' , 'menlo' , 'monaco' , 'consolas' , 'liberation mono' , 'courier new' , 'courier' , monospace;font-size:12px;margin-top:0px;margin-bottom:0px;padding:12px;line-height:1.4;color:rgb( 64 , 64 , 64 )">python manage.py migrate --run-syncdb</pre></div></div></blockquote><div><br><div>Everything went without any issues. Then I tried:</div></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>DJANGO_SETTINGS_MODULE=geonode.settings python manage.py updatelayers -w geonode --skip-geonode-registered</div></blockquote></div><div><br><div>And got the following error:</div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>Traceback (most recent call last):<br>  File "manage.py", line 29, in <module><br>    execute_from_command_line(sys.argv)<br>  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line<br>    utility.execute()<br>  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute<br>    self.fetch_command(subcommand).run_from_argv(self.argv)<br>  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv<br>    self.execute(*args, **cmd_options)<br>  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute<br>    output = self.handle(*args, **options)<br>  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 98, in handle<br>    owner = get_valid_user(user)<br>  File "/usr/src/app/geonode/people/utils.py", line 46, in get_valid_user<br>    theuser = get_default_user()<br>  File "/usr/src/app/geonode/people/utils.py", line 37, in get_default_user<br>    raise GeoNodeException('You must have an admin account configured '<br>geonode.GeoNodeException: You must have an admin account configured before importing data. Try: django-admin.py createsuperuser<br></div></div></blockquote><div><br><div>Then I tried passing the flag user to the previous command, like this:</div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>DJANGO_SETTINGS_MODULE=geonode.settings python manage.py updatelayers -u admin -w geonode --skip-geonode-registered<br><br></div><div>Traceback (most recent call last):<br>  File "manage.py", line 29, in <module><br>    execute_from_command_line(sys.argv)<br>  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line<br>    utility.execute()<br>  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute<br>    self.fetch_command(subcommand).run_from_argv(self.argv)<br>  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv<br>    self.execute(*args, **cmd_options)<br>  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute<br>    output = self.handle(*args, **options)<br>  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 98, in handle<br>    owner = get_valid_user(user)<br>  File "/usr/src/app/geonode/people/utils.py", line 48, in get_valid_user<br>    theuser = get_user_model().objects.get(username=user)<br>  File "/usr/local/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method<br>    return getattr(self.get_queryset(), name)(*args, **kwargs)<br>  File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get<br>    self.model._meta.object_name<br>geonode.people.models.DoesNotExist: Profile matching query does not exist.<br></div></div></blockquote><div><br><div>No luck either, I can log to the site using the default credentials, but I haven't created any other users, is that necesary in order to use the updatelayers?</div><br><div>Thanks in advance for all your help!</div><br><div>José</div><br>-- <br><div dir="ltr"><div dir="ltr"><div>José David Cáceres<div>Ingeniero Ambiental</div><div>Máster en Tecnologías de la Información Geográfica<br><div>e-mail: <a href="mailto:jose.atyus@gmail.com" target="_blank" rel="nofollow noopener noreferrer">jose.atyus@gmail.com</a><br data-mce-bogus="1"></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div>José David Cáceres<div>Ingeniero Ambiental</div><div>Máster en Tecnologías de la Información Geográfica<br><div>e-mail: <a href="mailto:jose.atyus@gmail.com" target="_blank" rel="nofollow noopener noreferrer">jose.atyus@gmail.com</a><br data-mce-bogus="1"></div></div></div></div></div><img class="mailtrack-img" alt="" src="https://mailtrack.io/trace/mail/feb52013ed34e419c9eeb880cfa81736043016e4.png?u=16998" style="display: none !important;" width="0" hidden="" height="0"></div>
<br>_______________________________________________<br>geonode-users mailing list<br>geonode-users@lists.osgeo.org<br>https://lists.osgeo.org/mailman/listinfo/geonode-users<br></div></div></body></html>