Info about updatelayers command?

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Info about updatelayers command?

Ana Boljevic

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

Tweedle
 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

image001.jpg (2K) Download Attachment
image002.jpg (1K) Download Attachment
image001.jpg (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

Ana Boljevic

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

xbartolone
Hi Ana,

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

Hope this helps,
Francesco

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

image001.jpg (2K) Download Attachment
image002.jpg (1K) Download Attachment
image001.jpg (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

Ana Boljevic
Dear Francesco,

We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d

In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?

Regards

Ana




-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

Hope this helps,
Francesco

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

xbartolone
If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:
Dear Francesco,

We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d

In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?

Regards

Ana




-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

Hope this helps,
Francesco

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

Ana Boljevic

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

xbartolone
If you already cloned it then you can just execute

git pull origin master

Rebuilding all the containers is not terrible until you don’t remove the volumes. 

Hope this helps

Francesco
On 26 Oct 2018, 12:54 +0200, Ana Boljevic <[hidden email]>, wrote:

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

Ana Boljevic
In reply to this post by Ana Boljevic
Sorry, but my docker experience is weak. I don't know how to solve the problem. 
I want to apply fix from github without loosing my data. Is it possible?

Can you please write commands?

Regards,

Ana


-------- Original message --------
From: Francesco Bartoli <[hidden email]>
Date: 10/26/18 14:25 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: geonode-users <[hidden email]>, [hidden email]
Subject: RE: [GeoNode-users] Info about updatelayers command?

If you already cloned it then you can just execute

git pull origin master

Rebuilding all the containers is not terrible until you don’t remove the volumes. 

Hope this helps

Francesco
On 26 Oct 2018, 12:54 +0200, Ana Boljevic <[hidden email]>, wrote:

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

Alessio Fabiani-2
Hi Ana,
In order to update the GeoNode on your GeoNode instance, I guess you can try something like

docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

[hidden email] can you confirm?


Il giorno ven 26 ott 2018 alle ore 15:45 Ana Boljevic <[hidden email]> ha scritto:
Sorry, but my docker experience is weak. I don't know how to solve the problem. 
I want to apply fix from github without loosing my data. Is it possible?

Can you please write commands?

Regards,

Ana


-------- Original message --------
From: Francesco Bartoli <[hidden email]>
Date: 10/26/18 14:25 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: geonode-users <[hidden email]>, [hidden email]
Subject: RE: [GeoNode-users] Info about updatelayers command?

If you already cloned it then you can just execute

git pull origin master

Rebuilding all the containers is not terrible until you don’t remove the volumes. 

Hope this helps

Francesco
On 26 Oct 2018, 12:54 +0200, Ana Boljevic <[hidden email]>, wrote:

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


--

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead


GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

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.


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.


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

41799D00941E4F9D835FE3B20C02EF9E.png (9K) Download Attachment
C3C0DE65A6A44755872317B0B90CE659.png (2K) Download Attachment
C3C0DE65A6A44755872317B0B90CE659.png (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

Ana Boljevic

Dear Alessio,

We have done:
docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

and after that, from django4geonode container error still remains:

root@5058e8a1637f:/usr/src/app# python manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process OPSTINE', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'OPSTINE'",))

Regards,

Ana




-------- Original message --------
From: Alessio Fabiani <[hidden email]>
Date: 10/26/18 15:51 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Francesco Bartoli <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,
In order to update the GeoNode on your GeoNode instance, I guess you can try something like

docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

[hidden email] can you confirm?


Il giorno ven 26 ott 2018 alle ore 15:45 Ana Boljevic <[hidden email]> ha scritto:
Sorry, but my docker experience is weak. I don't know how to solve the problem. 
I want to apply fix from github without loosing my data. Is it possible?

Can you please write commands?

Regards,

Ana


-------- Original message --------
From: Francesco Bartoli <[hidden email]>
Date: 10/26/18 14:25 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: geonode-users <[hidden email]>, [hidden email]
Subject: RE: [GeoNode-users] Info about updatelayers command?

If you already cloned it then you can just execute

git pull origin master

Rebuilding all the containers is not terrible until you don’t remove the volumes. 

Hope this helps

Francesco
On 26 Oct 2018, 12:54 +0200, Ana Boljevic <[hidden email]>, wrote:

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


--

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead


GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

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.


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.


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

Ana Boljevic
Sorry,
we have error, I didn't notice at first:
geonode@testgis:~/geonode$ docker exec -i -t django4geonode bash
root@5058e8a1637f:/usr/src/app# git pull
remote: Enumerating objects: 321, done.
remote: Counting objects: 100% (321/321), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 620 (delta 308), reused 307 (delta 301), pack-reused 299
Receiving objects: 100% (620/620), 3.66 MiB | 812.00 KiB/s, done.
Resolving deltas: 100% (441/441), completed with 126 local objects.
From https://github.com/GeoNode/geonode
   33aa3e6..34ac634  master     -> origin/master
   2ea8bc6..89efc19  2.8.x      -> origin/2.8.x
 * [new branch]      ISSUE_4025 -> origin/ISSUE_4025
Updating 33aa3e6..34ac634
error: Your local changes to the following files would be overwritten by merge:
        geonode/settings.py
Please, commit your changes or stash them before you can merge.
Aborting

Regards,

Ana


-------- Original message --------
From: Ana Boljevic <[hidden email]>
Date: 10/26/18 19:50 (GMT+01:00)
To: Alessio Fabiani <[hidden email]>
Cc: [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?


Dear Alessio,

We have done:
docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

and after that, from django4geonode container error still remains:

root@5058e8a1637f:/usr/src/app# python manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process OPSTINE', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'OPSTINE'",))

Regards,

Ana




-------- Original message --------
From: Alessio Fabiani <[hidden email]>
Date: 10/26/18 15:51 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Francesco Bartoli <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,
In order to update the GeoNode on your GeoNode instance, I guess you can try something like

docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

[hidden email] can you confirm?


Il giorno ven 26 ott 2018 alle ore 15:45 Ana Boljevic <[hidden email]> ha scritto:
Sorry, but my docker experience is weak. I don't know how to solve the problem. 
I want to apply fix from github without loosing my data. Is it possible?

Can you please write commands?

Regards,

Ana


-------- Original message --------
From: Francesco Bartoli <[hidden email]>
Date: 10/26/18 14:25 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: geonode-users <[hidden email]>, [hidden email]
Subject: RE: [GeoNode-users] Info about updatelayers command?

If you already cloned it then you can just execute

git pull origin master

Rebuilding all the containers is not terrible until you don’t remove the volumes. 

Hope this helps

Francesco
On 26 Oct 2018, 12:54 +0200, Ana Boljevic <[hidden email]>, wrote:

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


--

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead


GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

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.


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.


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

xbartolone
Yes Alessio but I guessed Ana would be ended up with a merge issue. One easy solution if settings.py is the only file edited would be to copy it somewhere else then run

git checkout

before

git pull

finally overwrite settings.py with the copied one.

Il giorno ven 26 ott 2018 alle ore 20:00 Ana Boljevic <[hidden email]> ha scritto:
Sorry,
we have error, I didn't notice at first:
geonode@testgis:~/geonode$ docker exec -i -t django4geonode bash
root@5058e8a1637f:/usr/src/app# git pull
remote: Enumerating objects: 321, done.
remote: Counting objects: 100% (321/321), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 620 (delta 308), reused 307 (delta 301), pack-reused 299
Receiving objects: 100% (620/620), 3.66 MiB | 812.00 KiB/s, done.
Resolving deltas: 100% (441/441), completed with 126 local objects.
From https://github.com/GeoNode/geonode
   33aa3e6..34ac634  master     -> origin/master
   2ea8bc6..89efc19  2.8.x      -> origin/2.8.x
 * [new branch]      ISSUE_4025 -> origin/ISSUE_4025
Updating 33aa3e6..34ac634
error: Your local changes to the following files would be overwritten by merge:
        geonode/settings.py
Please, commit your changes or stash them before you can merge.
Aborting

Regards,

Ana


-------- Original message --------
From: Ana Boljevic <[hidden email]>
Date: 10/26/18 19:50 (GMT+01:00)
To: Alessio Fabiani <[hidden email]>
Cc: [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?


Dear Alessio,

We have done:
docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

and after that, from django4geonode container error still remains:

root@5058e8a1637f:/usr/src/app# python manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process OPSTINE', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'OPSTINE'",))

Regards,

Ana




-------- Original message --------
From: Alessio Fabiani <[hidden email]>
Date: 10/26/18 15:51 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Francesco Bartoli <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,
In order to update the GeoNode on your GeoNode instance, I guess you can try something like

docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

[hidden email] can you confirm?


Il giorno ven 26 ott 2018 alle ore 15:45 Ana Boljevic <[hidden email]> ha scritto:
Sorry, but my docker experience is weak. I don't know how to solve the problem. 
I want to apply fix from github without loosing my data. Is it possible?

Can you please write commands?

Regards,

Ana


-------- Original message --------
From: Francesco Bartoli <[hidden email]>
Date: 10/26/18 14:25 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: geonode-users <[hidden email]>, [hidden email]
Subject: RE: [GeoNode-users] Info about updatelayers command?

If you already cloned it then you can just execute

git pull origin master

Rebuilding all the containers is not terrible until you don’t remove the volumes. 

Hope this helps

Francesco
On 26 Oct 2018, 12:54 +0200, Ana Boljevic <[hidden email]>, wrote:

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


--

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead


GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

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.


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.

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

Ana Boljevic

Dear Francesco and Alessio,

We have moved all changed files in /tmp folder of the host, git pull, put moved files back in thair original path and than
docker-compose stop
docker-compose up --no-build -d
but now django container can't bring up



root@5058e8a1637f:/usr/src/app# git checkout                                                                                                    
M       docker-compose.yml
M       entrypoint.sh
M       geonode/settings.py
M       scripts/docker/env/production/celery.env
M       scripts/docker/env/production/django.env
M       scripts/docker/env/production/geoserver.env

geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/entrypoint.sh /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/geonode/settings.py /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/celery.env /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/django.env /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/geoserver.env /tmp

rm docker-compose.yml entrypoint.sh geonode/settings.py scripts/docker/env/production/celery.env scripts/docker/env/production/django.env scripts/docker/env/production/geoserver.env

git pull

geonode@testgis:~/geonode$ docker cp /tmp/docker-compose.yml 5058e8a1637f:/usr/src/app/docker-compose.yml
geonode@testgis:~/geonode$ docker cp /tmp/entrypoint.sh 5058e8a1637f:/usr/src/app/entrypoint.sh
geonode@testgis:~/geonode$ docker cp /tmp/settings.py 5058e8a1637f:/usr/src/app/geonode/settings.py
geonode@testgis:~/geonode$ docker cp /tmp/celery.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/celery.env
geonode@testgis:~/geonode$ docker cp /tmp/django.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/django.env
geonode@testgis:~/geonode$ docker cp /tmp/geoserver.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/geoserver.env

docker-compose stop
docker-compose up --no-build -d


Regards,

Ana


-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/27/18 00:36 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Alessio Fabiani <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Yes Alessio but I guessed Ana would be ended up with a merge issue. One easy solution if settings.py is the only file edited would be to copy it somewhere else then run

git checkout

before

git pull

finally overwrite settings.py with the copied one.

Il giorno ven 26 ott 2018 alle ore 20:00 Ana Boljevic <[hidden email]> ha scritto:
Sorry,
we have error, I didn't notice at first:
geonode@testgis:~/geonode$ docker exec -i -t django4geonode bash
root@5058e8a1637f:/usr/src/app# git pull
remote: Enumerating objects: 321, done.
remote: Counting objects: 100% (321/321), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 620 (delta 308), reused 307 (delta 301), pack-reused 299
Receiving objects: 100% (620/620), 3.66 MiB | 812.00 KiB/s, done.
Resolving deltas: 100% (441/441), completed with 126 local objects.
From https://github.com/GeoNode/geonode
   33aa3e6..34ac634  master     -> origin/master
   2ea8bc6..89efc19  2.8.x      -> origin/2.8.x
 * [new branch]      ISSUE_4025 -> origin/ISSUE_4025
Updating 33aa3e6..34ac634
error: Your local changes to the following files would be overwritten by merge:
        geonode/settings.py
Please, commit your changes or stash them before you can merge.
Aborting

Regards,

Ana


-------- Original message --------
From: Ana Boljevic <[hidden email]>
Date: 10/26/18 19:50 (GMT+01:00)
To: Alessio Fabiani <[hidden email]>
Cc: [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?


Dear Alessio,

We have done:
docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

and after that, from django4geonode container error still remains:

root@5058e8a1637f:/usr/src/app# python manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process OPSTINE', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'OPSTINE'",))

Regards,

Ana




-------- Original message --------
From: Alessio Fabiani <[hidden email]>
Date: 10/26/18 15:51 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Francesco Bartoli <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,
In order to update the GeoNode on your GeoNode instance, I guess you can try something like

docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

[hidden email] can you confirm?


Il giorno ven 26 ott 2018 alle ore 15:45 Ana Boljevic <[hidden email]> ha scritto:
Sorry, but my docker experience is weak. I don't know how to solve the problem. 
I want to apply fix from github without loosing my data. Is it possible?

Can you please write commands?

Regards,

Ana


-------- Original message --------
From: Francesco Bartoli <[hidden email]>
Date: 10/26/18 14:25 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: geonode-users <[hidden email]>, [hidden email]
Subject: RE: [GeoNode-users] Info about updatelayers command?

If you already cloned it then you can just execute

git pull origin master

Rebuilding all the containers is not terrible until you don’t remove the volumes. 

Hope this helps

Francesco
On 26 Oct 2018, 12:54 +0200, Ana Boljevic <[hidden email]>, wrote:

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


--

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead


GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

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.


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.

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

xbartolone
Ana,

if you run

git checkout -- <file>

for each changed file then you don't need to remove them. Can you try again? What is the error from the container that doesn't start?

Il giorno dom 28 ott 2018 alle ore 12:54 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco and Alessio,

We have moved all changed files in /tmp folder of the host, git pull, put moved files back in thair original path and than
docker-compose stop
docker-compose up --no-build -d
but now django container can't bring up



root@5058e8a1637f:/usr/src/app# git checkout                                                                                                    
M       docker-compose.yml
M       entrypoint.sh
M       geonode/settings.py
M       scripts/docker/env/production/celery.env
M       scripts/docker/env/production/django.env
M       scripts/docker/env/production/geoserver.env

geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/entrypoint.sh /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/geonode/settings.py /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/celery.env /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/django.env /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/geoserver.env /tmp

rm docker-compose.yml entrypoint.sh geonode/settings.py scripts/docker/env/production/celery.env scripts/docker/env/production/django.env scripts/docker/env/production/geoserver.env

git pull

geonode@testgis:~/geonode$ docker cp /tmp/docker-compose.yml 5058e8a1637f:/usr/src/app/docker-compose.yml
geonode@testgis:~/geonode$ docker cp /tmp/entrypoint.sh 5058e8a1637f:/usr/src/app/entrypoint.sh
geonode@testgis:~/geonode$ docker cp /tmp/settings.py 5058e8a1637f:/usr/src/app/geonode/settings.py
geonode@testgis:~/geonode$ docker cp /tmp/celery.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/celery.env
geonode@testgis:~/geonode$ docker cp /tmp/django.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/django.env
geonode@testgis:~/geonode$ docker cp /tmp/geoserver.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/geoserver.env

docker-compose stop
docker-compose up --no-build -d


Regards,

Ana


-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/27/18 00:36 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Alessio Fabiani <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Yes Alessio but I guessed Ana would be ended up with a merge issue. One easy solution if settings.py is the only file edited would be to copy it somewhere else then run

git checkout

before

git pull

finally overwrite settings.py with the copied one.

Il giorno ven 26 ott 2018 alle ore 20:00 Ana Boljevic <[hidden email]> ha scritto:
Sorry,
we have error, I didn't notice at first:
geonode@testgis:~/geonode$ docker exec -i -t django4geonode bash
root@5058e8a1637f:/usr/src/app# git pull
remote: Enumerating objects: 321, done.
remote: Counting objects: 100% (321/321), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 620 (delta 308), reused 307 (delta 301), pack-reused 299
Receiving objects: 100% (620/620), 3.66 MiB | 812.00 KiB/s, done.
Resolving deltas: 100% (441/441), completed with 126 local objects.
From https://github.com/GeoNode/geonode
   33aa3e6..34ac634  master     -> origin/master
   2ea8bc6..89efc19  2.8.x      -> origin/2.8.x
 * [new branch]      ISSUE_4025 -> origin/ISSUE_4025
Updating 33aa3e6..34ac634
error: Your local changes to the following files would be overwritten by merge:
        geonode/settings.py
Please, commit your changes or stash them before you can merge.
Aborting

Regards,

Ana


-------- Original message --------
From: Ana Boljevic <[hidden email]>
Date: 10/26/18 19:50 (GMT+01:00)
To: Alessio Fabiani <[hidden email]>
Cc: [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?


Dear Alessio,

We have done:
docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

and after that, from django4geonode container error still remains:

root@5058e8a1637f:/usr/src/app# python manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process OPSTINE', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'OPSTINE'",))

Regards,

Ana




-------- Original message --------
From: Alessio Fabiani <[hidden email]>
Date: 10/26/18 15:51 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Francesco Bartoli <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,
In order to update the GeoNode on your GeoNode instance, I guess you can try something like

docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

[hidden email] can you confirm?


Il giorno ven 26 ott 2018 alle ore 15:45 Ana Boljevic <[hidden email]> ha scritto:
Sorry, but my docker experience is weak. I don't know how to solve the problem. 
I want to apply fix from github without loosing my data. Is it possible?

Can you please write commands?

Regards,

Ana


-------- Original message --------
From: Francesco Bartoli <[hidden email]>
Date: 10/26/18 14:25 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: geonode-users <[hidden email]>, [hidden email]
Subject: RE: [GeoNode-users] Info about updatelayers command?

If you already cloned it then you can just execute

git pull origin master

Rebuilding all the containers is not terrible until you don’t remove the volumes. 

Hope this helps

Francesco
On 26 Oct 2018, 12:54 +0200, Ana Boljevic <[hidden email]>, wrote:

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


--

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead


GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

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.


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.

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

Ana Boljevic

Dear Francessco,

 

We have done by your instruction, but after doing so, django4geonode container can't bring up :

docker exec -i -t django4geonode bash

root@5058e8a1637f:/usr/src/app# git checkout                                                                                                    

M       docker-compose.yml

M       entrypoint.sh

M       geonode/settings.py

M       scripts/docker/env/production/celery.env

M       scripts/docker/env/production/django.env

M       scripts/docker/env/production/geoserver.env

git checkout -- /usr/src/app/docker-compose.yml

git checkout -- /usr/src/app/entrypoint.sh

git checkout -- /usr/src/app/geonode/settings.py

git checkout -- /usr/src/app/scripts/docker/env/production/celery.env

git checkout -- /usr/src/app/scripts/docker/env/production/django.env

git checkout -- /usr/src/app/scripts/docker/env/production/geoserver.env

git pull

exit

docker-compose stop

docker-compose up --no-build -d

 

Last part of docker-compose logs -t (full log in attachment):

rabbitmq4geonode | 2018-10-29T12:43:20.588892346Z 2018-10-29 12:43:20.588 [info] <0.540.0> Stopping application 'rabbit'

rabbitmq4geonode | 2018-10-29T12:43:20.589183104Z 2018-10-29 12:43:20.589 [info] <0.218.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping unregistration.

rabbitmq4geonode | 2018-10-29T12:43:20.589676074Z 2018-10-29 12:43:20.589 [info] <0.432.0> stopped TCP Listener on [::]:5672

rabbitmq4geonode | 2018-10-29T12:43:20.590238567Z 2018-10-29 12:43:20.590 [info] <0.284.0> Closing all connections in vhost '/' on node 'rabbit@39ca0b651470' because the vhost is stopping

rabbitmq4geonode | 2018-10-29T12:43:20.595635959Z 2018-10-29 12:43:20.595 [info] <0.343.0> Stopping message store for directory '/var/lib/rabbitmq/mnesia/rabbit@39ca0b651470/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent'

rabbitmq4geonode | 2018-10-29T12:43:20.599318737Z 2018-10-29 12:43:20.599 [info] <0.343.0> Message store for directory '/var/lib/rabbitmq/mnesia/rabbit@39ca0b651470/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent' is stopped

rabbitmq4geonode | 2018-10-29T12:43:20.599446920Z 2018-10-29 12:43:20.599 [info] <0.340.0> Stopping message store for directory '/var/lib/rabbitmq/mnesia/rabbit@39ca0b651470/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_transient'

rabbitmq4geonode | 2018-10-29T12:43:20.603303639Z 2018-10-29 12:43:20.603 [info] <0.340.0> Message store for directory '/var/lib/rabbitmq/mnesia/rabbit@39ca0b651470/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_transient' is stopped

rabbitmq4geonode | 2018-10-29T12:43:20.608970890Z 2018-10-29 12:43:20.608 [info] <0.540.0> Stopping application 'mnesia'

rabbitmq4geonode | 2018-10-29T12:43:20.608994851Z 2018-10-29 12:43:20.608 [info] <0.33.0> Application rabbit exited with reason: stopped

rabbitmq4geonode | 2018-10-29T12:43:20.611254941Z 2018-10-29 12:43:20.611 [info] <0.33.0> Application mnesia exited with reason: stopped

rabbitmq4geonode | 2018-10-29T12:43:20.611271354Z 2018-10-29 12:43:20.611 [info] <0.540.0> Stopping application 'rabbit_common'

rabbitmq4geonode | 2018-10-29T12:43:20.611332663Z 2018-10-29 12:43:20.611 [info] <0.540.0> Stopping application 'os_mon'

rabbitmq4geonode | 2018-10-29T12:43:20.611344830Z 2018-10-29 12:43:20.611 [info] <0.33.0> Application rabbit_common exited with reason: stopped

rabbitmq4geonode | 2018-10-29T12:43:20.612459731Z 2018-10-29 12:43:20.612 [info] <0.540.0> Successfully stopped RabbitMQ and its dependencies

rabbitmq4geonode | 2018-10-29T12:43:20.612470835Z 2018-10-29 12:43:20.612 [info] <0.33.0> Application os_mon exited with reason: stopped

rabbitmq4geonode | 2018-10-29T12:43:20.612722429Z 2018-10-29 12:43:20.612 [info] <0.540.0> Halting Erlang VM with the following applications:

rabbitmq4geonode | 2018-10-29T12:43:20.612734347Z     ranch_proxy_protocol

rabbitmq4geonode | 2018-10-29T12:43:20.612739407Z     ranch

rabbitmq4geonode | 2018-10-29T12:43:20.612744182Z     ssl

rabbitmq4geonode | 2018-10-29T12:43:20.612748862Z     public_key

rabbitmq4geonode | 2018-10-29T12:43:20.612753388Z     asn1

rabbitmq4geonode | 2018-10-29T12:43:20.612757814Z     xmerl

rabbitmq4geonode | 2018-10-29T12:43:20.612762239Z     recon

rabbitmq4geonode | 2018-10-29T12:43:20.612766700Z     jsx

rabbitmq4geonode | 2018-10-29T12:43:20.612771098Z     inets

rabbitmq4geonode | 2018-10-29T12:43:20.612775351Z     crypto

rabbitmq4geonode | 2018-10-29T12:43:20.612779629Z     lager

rabbitmq4geonode | 2018-10-29T12:43:20.612783758Z     goldrush

rabbitmq4geonode | 2018-10-29T12:43:20.612788015Z     compiler

rabbitmq4geonode | 2018-10-29T12:43:20.612803534Z     syntax_tools

rabbitmq4geonode | 2018-10-29T12:43:20.612808638Z     syslog

rabbitmq4geonode | 2018-10-29T12:43:20.612813120Z     sasl

rabbitmq4geonode | 2018-10-29T12:43:20.612817409Z     stdlib

rabbitmq4geonode | 2018-10-29T12:43:20.612821461Z     kernel

rabbitmq4geonode | 2018-10-29T12:43:20.612959249Z Gracefully halting Erlang VM

rabbitmq4geonode | 2018-10-29T12:43:33.091907754Z 2018-10-29 12:43:33.065 [info] <0.33.0> Application lager started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.029168547Z 2018-10-29 12:43:36.028 [info] <0.33.0> Application crypto started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.029992423Z 2018-10-29 12:43:36.029 [info] <0.33.0> Application inets started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.030546671Z 2018-10-29 12:43:36.030 [info] <0.33.0> Application os_mon started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.030810293Z 2018-10-29 12:43:36.030 [info] <0.33.0> Application jsx started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.049033039Z 2018-10-29 12:43:36.048 [info] <0.33.0> Application mnesia started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.050909483Z 2018-10-29 12:43:36.050 [info] <0.33.0> Application recon started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.052442655Z 2018-10-29 12:43:36.051 [info] <0.33.0> Application xmerl started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.052714043Z 2018-10-29 12:43:36.052 [info] <0.33.0> Application asn1 started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.053066947Z 2018-10-29 12:43:36.052 [info] <0.33.0> Application public_key started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.053215735Z 2018-10-29 12:43:36.052 [info] <0.33.0> Application ssl started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.053542399Z 2018-10-29 12:43:36.053 [info] <0.33.0> Application ranch started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.053777832Z 2018-10-29 12:43:36.053 [info] <0.33.0> Application ranch_proxy_protocol started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.053924296Z 2018-10-29 12:43:36.053 [info] <0.33.0> Application rabbit_common started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.054515076Z 2018-10-29 12:43:36.054 [info] <0.222.0>

rabbitmq4geonode | 2018-10-29T12:43:36.054553438Z  Starting RabbitMQ 3.7.8 on Erlang 20.3.8.5

rabbitmq4geonode | 2018-10-29T12:43:36.054561791Z  Copyright (C) 2007-2018 Pivotal Software, Inc.

rabbitmq4geonode | 2018-10-29T12:43:36.054567013Z  Licensed under the MPL.  See http://www.rabbitmq.com/

rabbitmq4geonode | 2018-10-29T12:43:36.054751509Z

rabbitmq4geonode | 2018-10-29T12:43:36.054764333Z   ##  ##

rabbitmq4geonode | 2018-10-29T12:43:36.054769868Z   ##  ##      RabbitMQ 3.7.8. Copyright (C) 2007-2018 Pivotal Software, Inc.

rabbitmq4geonode | 2018-10-29T12:43:36.054774924Z   ##########  Licensed under the MPL.  See http://www.rabbitmq.com/

rabbitmq4geonode | 2018-10-29T12:43:36.054779743Z   ######  ##

rabbitmq4geonode | 2018-10-29T12:43:36.054784220Z   ##########  Logs: <stdout>

rabbitmq4geonode | 2018-10-29T12:43:36.054800451Z

rabbitmq4geonode | 2018-10-29T12:43:36.054805564Z               Starting broker...

rabbitmq4geonode | 2018-10-29T12:43:36.056202160Z 2018-10-29 12:43:36.055 [info] <0.222.0>

rabbitmq4geonode | 2018-10-29T12:43:36.056215245Z  node           : rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.056220775Z  home dir       : /var/lib/rabbitmq

rabbitmq4geonode | 2018-10-29T12:43:36.056225395Z  config file(s) : /etc/rabbitmq/rabbitmq.conf

rabbitmq4geonode | 2018-10-29T12:43:36.056230030Z  cookie hash    : ex/x+PypG9qStotoDhyANw==

rabbitmq4geonode | 2018-10-29T12:43:36.056234375Z  log(s)         : <stdout>

rabbitmq4geonode | 2018-10-29T12:43:36.056239009Z  database dir   : /var/lib/rabbitmq/mnesia/rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.091638434Z 2018-10-29 12:43:36.091 [info] <0.264.0> Memory high watermark set to 3192 MiB (3347958988 bytes) of 7982 MiB (8369897472 bytes) total

rabbitmq4geonode | 2018-10-29T12:43:36.107514572Z 2018-10-29 12:43:36.107 [info] <0.266.0> Enabling free disk space monitoring

rabbitmq4geonode | 2018-10-29T12:43:36.107690505Z 2018-10-29 12:43:36.107 [info] <0.266.0> Disk free limit set to 50MB

rabbitmq4geonode | 2018-10-29T12:43:36.126513337Z 2018-10-29 12:43:36.126 [info] <0.269.0> Limiting to approx 1048476 file handles (943626 sockets)

rabbitmq4geonode | 2018-10-29T12:43:36.126767100Z 2018-10-29 12:43:36.126 [info] <0.270.0> FHC read buffering:  OFF

rabbitmq4geonode | 2018-10-29T12:43:36.126895478Z 2018-10-29 12:43:36.126 [info] <0.270.0> FHC write buffering: ON

rabbitmq4geonode | 2018-10-29T12:43:36.129582128Z 2018-10-29 12:43:36.129 [info] <0.222.0> Waiting for Mnesia tables for 30000 ms, 9 retries left

rabbitmq4geonode | 2018-10-29T12:43:36.157630132Z 2018-10-29 12:43:36.157 [info] <0.222.0> Waiting for Mnesia tables for 30000 ms, 9 retries left

rabbitmq4geonode | 2018-10-29T12:43:36.157694197Z 2018-10-29 12:43:36.157 [info] <0.222.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping registration.

rabbitmq4geonode | 2018-10-29T12:43:36.158718359Z 2018-10-29 12:43:36.158 [info] <0.222.0> Priority queues enabled, real BQ is rabbit_variable_queue

rabbitmq4geonode | 2018-10-29T12:43:36.162726893Z 2018-10-29 12:43:36.162 [info] <0.292.0> Starting rabbit_node_monitor

rabbitmq4geonode | 2018-10-29T12:43:36.189329652Z 2018-10-29 12:43:36.188 [info] <0.338.0> Making sure data directory '/var/lib/rabbitmq/mnesia/rabbit@39ca0b651470/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L' for vhost '/' exists

rabbitmq4geonode | 2018-10-29T12:43:36.205375889Z 2018-10-29 12:43:36.205 [info] <0.338.0> Starting message stores for vhost '/'

rabbitmq4geonode | 2018-10-29T12:43:36.205674103Z 2018-10-29 12:43:36.205 [info] <0.342.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_transient": using rabbit_msg_store_ets_index to provide index

rabbitmq4geonode | 2018-10-29T12:43:36.208536564Z 2018-10-29 12:43:36.208 [info] <0.338.0> Started message store of type transient for vhost '/'

rabbitmq4geonode | 2018-10-29T12:43:36.208822596Z 2018-10-29 12:43:36.208 [info] <0.345.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent": using rabbit_msg_store_ets_index to provide index

rabbitmq4geonode | 2018-10-29T12:43:36.215934044Z 2018-10-29 12:43:36.215 [info] <0.338.0> Started message store of type persistent for vhost '/'

rabbitmq4geonode | 2018-10-29T12:43:36.243343874Z 2018-10-29 12:43:36.243 [info] <0.434.0> started TCP Listener on [::]:5672

rabbitmq4geonode | 2018-10-29T12:43:36.243855088Z 2018-10-29 12:43:36.243 [info] <0.222.0> Setting up a table for connection tracking on this node: tracked_connection_on_node_rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.244177734Z 2018-10-29 12:43:36.243 [info] <0.222.0> Setting up a table for per-vhost connection counting on this node: tracked_connection_per_vhost_on_node_rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.244673829Z 2018-10-29 12:43:36.244 [info] <0.33.0> Application rabbit started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.665060821Z 2018-10-29 12:43:36.664 [info] <0.5.0> Server startup complete; 0 plugins started.

rabbitmq4geonode | 2018-10-29T12:43:36.665094232Z  completed with 0 plugins.

rabbitmq4geonode | 2018-10-29T12:43:52.068167997Z 2018-10-29 12:43:52.067 [info] <0.440.0> accepting AMQP connection <0.440.0> (172.18.0.3:42078 -> 172.18.0.2:5672)

rabbitmq4geonode | 2018-10-29T12:43:52.070800718Z 2018-10-29 12:43:52.070 [info] <0.440.0> connection <0.440.0> (172.18.0.3:42078 -> 172.18.0.2:5672): user 'guest' authenticated and granted access to vhost '/'

rabbitmq4geonode | 2018-10-29T12:43:52.081172134Z 2018-10-29 12:43:52.080 [info] <0.449.0> accepting AMQP connection <0.449.0> (172.18.0.3:42080 -> 172.18.0.2:5672)

rabbitmq4geonode | 2018-10-29T12:43:52.103513457Z 2018-10-29 12:43:52.103 [info] <0.449.0> connection <0.449.0> (172.18.0.3:42080 -> 172.18.0.2:5672): user 'guest' authenticated and granted access to vhost '/'

rabbitmq4geonode | 2018-10-29T12:43:52.143869719Z 2018-10-29 12:43:52.143 [info] <0.469.0> accepting AMQP connection <0.469.0> (172.18.0.3:42082 -> 172.18.0.2:5672)

rabbitmq4geonode | 2018-10-29T12:43:52.147983783Z 2018-10-29 12:43:52.147 [info] <0.469.0> connection <0.469.0> (172.18.0.3:42082 -> 172.18.0.2:5672): user 'guest' authenticated and granted access to vhost '/'

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

CEDIS

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

jelkicaPlease do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Sunday, October 28, 2018 3:02 PM
To: Ana Boljevic <[hidden email]>
Cc: Alessio Fabiani <[hidden email]>; [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

Ana,

 

if you run

 

git checkout -- <file>

 

for each changed file then you don't need to remove them. Can you try again? What is the error from the container that doesn't start?

 

Il giorno dom 28 ott 2018 alle ore 12:54 Ana Boljevic <[hidden email]> ha scritto:

 

Dear Francesco and Alessio,


We have moved all changed files in /tmp folder of the host, git pull, put moved files back in thair original path and than
docker-compose stop
docker-compose up --no-build -d
but now django container can't bring up



root@5058e8a1637f:/usr/src/app# git checkout                                                                                                    
M       docker-compose.yml
M       entrypoint.sh
M       geonode/settings.py
M       scripts/docker/env/production/celery.env
M       scripts/docker/env/production/django.env
M       scripts/docker/env/production/geoserver.env

geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/entrypoint.sh /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/geonode/settings.py /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/celery.env /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/django.env /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/geoserver.env /tmp

rm docker-compose.yml entrypoint.sh geonode/settings.py scripts/docker/env/production/celery.env scripts/docker/env/production/django.env scripts/docker/env/production/geoserver.env

git pull

geonode@testgis:~/geonode$ docker cp /tmp/docker-compose.yml 5058e8a1637f:/usr/src/app/docker-compose.yml
geonode@testgis:~/geonode$ docker cp /tmp/entrypoint.sh 5058e8a1637f:/usr/src/app/entrypoint.sh
geonode@testgis:~/geonode$ docker cp /tmp/settings.py 5058e8a1637f:/usr/src/app/geonode/settings.py
geonode@testgis:~/geonode$ docker cp /tmp/celery.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/celery.env
geonode@testgis:~/geonode$ docker cp /tmp/django.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/django.env
geonode@testgis:~/geonode$ docker cp /tmp/geoserver.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/geoserver.env

docker-compose stop
docker-compose up --no-build -d


Regards,

 

Ana



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/27/18 00:36 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Alessio Fabiani <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Yes Alessio but I guessed Ana would be ended up with a merge issue. One easy solution if settings.py is the only file edited would be to copy it somewhere else then run

 

git checkout

 

before

 

git pull

 

finally overwrite settings.py with the copied one.

 

Il giorno ven 26 ott 2018 alle ore 20:00 Ana Boljevic <[hidden email]> ha scritto:

Sorry,
we have error, I didn't notice at first:
geonode@testgis:~/geonode$ docker exec -i -t django4geonode bash
root@5058e8a1637f:/usr/src/app# git pull
remote: Enumerating objects: 321, done.
remote: Counting objects: 100% (321/321), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 620 (delta 308), reused 307 (delta 301), pack-reused 299
Receiving objects: 100% (620/620), 3.66 MiB | 812.00 KiB/s, done.
Resolving deltas: 100% (441/441), completed with 126 local objects.
From https://github.com/GeoNode/geonode
   33aa3e6..34ac634  master     -> origin/master
   2ea8bc6..89efc19  2.8.x      -> origin/2.8.x
 * [new branch]      ISSUE_4025 -> origin/ISSUE_4025
Updating 33aa3e6..34ac634
error: Your local changes to the following files would be overwritten by merge:
        geonode/settings.py
Please, commit your changes or stash them before you can merge.
Aborting

Regards,

 

Ana



-------- Original message --------
From: Ana Boljevic <[hidden email]>
Date: 10/26/18 19:50 (GMT+01:00)
To: Alessio Fabiani <[hidden email]>
Cc: [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

Dear Alessio,


We have done:
docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

and after that, from django4geonode container error still remains:

root@5058e8a1637f:/usr/src/app# python manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process OPSTINE', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'OPSTINE'",))

Regards,

 

Ana

 

 



-------- Original message --------
From: Alessio Fabiani <[hidden email]>
Date: 10/26/18 15:51 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Francesco Bartoli <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

In order to update the GeoNode on your GeoNode instance, I guess you can try something like

 

docker exec -i -t django4geonode bash

git pull

exit

docker-compose stop

docker-compose up --no-build -d

 

[hidden email] can you confirm?

 

 

Il giorno ven 26 ott 2018 alle ore 15:45 Ana Boljevic <[hidden email]> ha scritto:

Sorry, but my docker experience is weak. I don't know how to solve the problem. 

I want to apply fix from github without loosing my data. Is it possible?


Can you please write commands?

 

Regards,

 

Ana



-------- Original message --------
From: Francesco Bartoli <[hidden email]>
Date: 10/26/18 14:25 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: geonode-users <[hidden email]>, [hidden email]
Subject: RE: [GeoNode-users] Info about updatelayers command?

If you already cloned it then you can just execute

 

git pull origin master

 

Rebuilding all the containers is not terrible until you don’t remove the volumes. 


Hope this helps

Francesco

On 26 Oct 2018, 12:54 +0200, Ana Boljevic <[hidden email]>, wrote:

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


 

--

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead

 

GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

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.


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.

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

logs.txt (792K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Info about updatelayers command?

xbartolone
Dear Ana,

Did you see errors in the django4geonode bootstratp? I did not. Also, the git commands can be executed outside the container. Now that you have the backup of the files changed I'd suggest to start from scratch with a new clone from github. I would do the following actions:

  1. docker-compose down -v (so we remove all the volumes)
  2. Remove the geonode folder cloned by github
  3. Clone again geonode
  4. Modify the .env files just for address and port where you want to navigate geonode
    1. GEONODE_LB_HOST_IP
    2. GEONODE_LB_PORT
  5. Verify that geonode can be correctly browsed
  6. docker-compose down -v
  7. copy you custom changes
  8. docker-compose up --build -d
  9. See what happens and eventually share your changes

Il giorno mar 30 ott 2018 alle ore 07:11 Ana Boljevic <[hidden email]> ha scritto:

Dear Francessco,

 

We have done by your instruction, but after doing so, django4geonode container can't bring up :

docker exec -i -t django4geonode bash

root@5058e8a1637f:/usr/src/app# git checkout                                                                                                    

M       docker-compose.yml

M       entrypoint.sh

M       geonode/settings.py

M       scripts/docker/env/production/celery.env

M       scripts/docker/env/production/django.env

M       scripts/docker/env/production/geoserver.env

git checkout -- /usr/src/app/docker-compose.yml

git checkout -- /usr/src/app/entrypoint.sh

git checkout -- /usr/src/app/geonode/settings.py

git checkout -- /usr/src/app/scripts/docker/env/production/celery.env

git checkout -- /usr/src/app/scripts/docker/env/production/django.env

git checkout -- /usr/src/app/scripts/docker/env/production/geoserver.env

git pull

exit

docker-compose stop

docker-compose up --no-build -d

 

Last part of docker-compose logs -t (full log in attachment):

rabbitmq4geonode | 2018-10-29T12:43:20.588892346Z 2018-10-29 12:43:20.588 [info] <0.540.0> Stopping application 'rabbit'

rabbitmq4geonode | 2018-10-29T12:43:20.589183104Z 2018-10-29 12:43:20.589 [info] <0.218.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping unregistration.

rabbitmq4geonode | 2018-10-29T12:43:20.589676074Z 2018-10-29 12:43:20.589 [info] <0.432.0> stopped TCP Listener on [::]:5672

rabbitmq4geonode | 2018-10-29T12:43:20.590238567Z 2018-10-29 12:43:20.590 [info] <0.284.0> Closing all connections in vhost '/' on node 'rabbit@39ca0b651470' because the vhost is stopping

rabbitmq4geonode | 2018-10-29T12:43:20.595635959Z 2018-10-29 12:43:20.595 [info] <0.343.0> Stopping message store for directory '/var/lib/rabbitmq/mnesia/rabbit@39ca0b651470/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent'

rabbitmq4geonode | 2018-10-29T12:43:20.599318737Z 2018-10-29 12:43:20.599 [info] <0.343.0> Message store for directory '/var/lib/rabbitmq/mnesia/rabbit@39ca0b651470/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent' is stopped

rabbitmq4geonode | 2018-10-29T12:43:20.599446920Z 2018-10-29 12:43:20.599 [info] <0.340.0> Stopping message store for directory '/var/lib/rabbitmq/mnesia/rabbit@39ca0b651470/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_transient'

rabbitmq4geonode | 2018-10-29T12:43:20.603303639Z 2018-10-29 12:43:20.603 [info] <0.340.0> Message store for directory '/var/lib/rabbitmq/mnesia/rabbit@39ca0b651470/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L/msg_store_transient' is stopped

rabbitmq4geonode | 2018-10-29T12:43:20.608970890Z 2018-10-29 12:43:20.608 [info] <0.540.0> Stopping application 'mnesia'

rabbitmq4geonode | 2018-10-29T12:43:20.608994851Z 2018-10-29 12:43:20.608 [info] <0.33.0> Application rabbit exited with reason: stopped

rabbitmq4geonode | 2018-10-29T12:43:20.611254941Z 2018-10-29 12:43:20.611 [info] <0.33.0> Application mnesia exited with reason: stopped

rabbitmq4geonode | 2018-10-29T12:43:20.611271354Z 2018-10-29 12:43:20.611 [info] <0.540.0> Stopping application 'rabbit_common'

rabbitmq4geonode | 2018-10-29T12:43:20.611332663Z 2018-10-29 12:43:20.611 [info] <0.540.0> Stopping application 'os_mon'

rabbitmq4geonode | 2018-10-29T12:43:20.611344830Z 2018-10-29 12:43:20.611 [info] <0.33.0> Application rabbit_common exited with reason: stopped

rabbitmq4geonode | 2018-10-29T12:43:20.612459731Z 2018-10-29 12:43:20.612 [info] <0.540.0> Successfully stopped RabbitMQ and its dependencies

rabbitmq4geonode | 2018-10-29T12:43:20.612470835Z 2018-10-29 12:43:20.612 [info] <0.33.0> Application os_mon exited with reason: stopped

rabbitmq4geonode | 2018-10-29T12:43:20.612722429Z 2018-10-29 12:43:20.612 [info] <0.540.0> Halting Erlang VM with the following applications:

rabbitmq4geonode | 2018-10-29T12:43:20.612734347Z     ranch_proxy_protocol

rabbitmq4geonode | 2018-10-29T12:43:20.612739407Z     ranch

rabbitmq4geonode | 2018-10-29T12:43:20.612744182Z     ssl

rabbitmq4geonode | 2018-10-29T12:43:20.612748862Z     public_key

rabbitmq4geonode | 2018-10-29T12:43:20.612753388Z     asn1

rabbitmq4geonode | 2018-10-29T12:43:20.612757814Z     xmerl

rabbitmq4geonode | 2018-10-29T12:43:20.612762239Z     recon

rabbitmq4geonode | 2018-10-29T12:43:20.612766700Z     jsx

rabbitmq4geonode | 2018-10-29T12:43:20.612771098Z     inets

rabbitmq4geonode | 2018-10-29T12:43:20.612775351Z     crypto

rabbitmq4geonode | 2018-10-29T12:43:20.612779629Z     lager

rabbitmq4geonode | 2018-10-29T12:43:20.612783758Z     goldrush

rabbitmq4geonode | 2018-10-29T12:43:20.612788015Z     compiler

rabbitmq4geonode | 2018-10-29T12:43:20.612803534Z     syntax_tools

rabbitmq4geonode | 2018-10-29T12:43:20.612808638Z     syslog

rabbitmq4geonode | 2018-10-29T12:43:20.612813120Z     sasl

rabbitmq4geonode | 2018-10-29T12:43:20.612817409Z     stdlib

rabbitmq4geonode | 2018-10-29T12:43:20.612821461Z     kernel

rabbitmq4geonode | 2018-10-29T12:43:20.612959249Z Gracefully halting Erlang VM

rabbitmq4geonode | 2018-10-29T12:43:33.091907754Z 2018-10-29 12:43:33.065 [info] <0.33.0> Application lager started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.029168547Z 2018-10-29 12:43:36.028 [info] <0.33.0> Application crypto started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.029992423Z 2018-10-29 12:43:36.029 [info] <0.33.0> Application inets started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.030546671Z 2018-10-29 12:43:36.030 [info] <0.33.0> Application os_mon started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.030810293Z 2018-10-29 12:43:36.030 [info] <0.33.0> Application jsx started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.049033039Z 2018-10-29 12:43:36.048 [info] <0.33.0> Application mnesia started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.050909483Z 2018-10-29 12:43:36.050 [info] <0.33.0> Application recon started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.052442655Z 2018-10-29 12:43:36.051 [info] <0.33.0> Application xmerl started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.052714043Z 2018-10-29 12:43:36.052 [info] <0.33.0> Application asn1 started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.053066947Z 2018-10-29 12:43:36.052 [info] <0.33.0> Application public_key started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.053215735Z 2018-10-29 12:43:36.052 [info] <0.33.0> Application ssl started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.053542399Z 2018-10-29 12:43:36.053 [info] <0.33.0> Application ranch started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.053777832Z 2018-10-29 12:43:36.053 [info] <0.33.0> Application ranch_proxy_protocol started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.053924296Z 2018-10-29 12:43:36.053 [info] <0.33.0> Application rabbit_common started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.054515076Z 2018-10-29 12:43:36.054 [info] <0.222.0>

rabbitmq4geonode | 2018-10-29T12:43:36.054553438Z  Starting RabbitMQ 3.7.8 on Erlang 20.3.8.5

rabbitmq4geonode | 2018-10-29T12:43:36.054561791Z  Copyright (C) 2007-2018 Pivotal Software, Inc.

rabbitmq4geonode | 2018-10-29T12:43:36.054567013Z  Licensed under the MPL.  See http://www.rabbitmq.com/

rabbitmq4geonode | 2018-10-29T12:43:36.054751509Z

rabbitmq4geonode | 2018-10-29T12:43:36.054764333Z   ##  ##

rabbitmq4geonode | 2018-10-29T12:43:36.054769868Z   ##  ##      RabbitMQ 3.7.8. Copyright (C) 2007-2018 Pivotal Software, Inc.

rabbitmq4geonode | 2018-10-29T12:43:36.054774924Z   ##########  Licensed under the MPL.  See http://www.rabbitmq.com/

rabbitmq4geonode | 2018-10-29T12:43:36.054779743Z   ######  ##

rabbitmq4geonode | 2018-10-29T12:43:36.054784220Z   ##########  Logs: <stdout>

rabbitmq4geonode | 2018-10-29T12:43:36.054800451Z

rabbitmq4geonode | 2018-10-29T12:43:36.054805564Z               Starting broker...

rabbitmq4geonode | 2018-10-29T12:43:36.056202160Z 2018-10-29 12:43:36.055 [info] <0.222.0>

rabbitmq4geonode | 2018-10-29T12:43:36.056215245Z  node           : rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.056220775Z  home dir       : /var/lib/rabbitmq

rabbitmq4geonode | 2018-10-29T12:43:36.056225395Z  config file(s) : /etc/rabbitmq/rabbitmq.conf

rabbitmq4geonode | 2018-10-29T12:43:36.056230030Z  cookie hash    : ex/x+PypG9qStotoDhyANw==

rabbitmq4geonode | 2018-10-29T12:43:36.056234375Z  log(s)         : <stdout>

rabbitmq4geonode | 2018-10-29T12:43:36.056239009Z  database dir   : /var/lib/rabbitmq/mnesia/rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.091638434Z 2018-10-29 12:43:36.091 [info] <0.264.0> Memory high watermark set to 3192 MiB (3347958988 bytes) of 7982 MiB (8369897472 bytes) total

rabbitmq4geonode | 2018-10-29T12:43:36.107514572Z 2018-10-29 12:43:36.107 [info] <0.266.0> Enabling free disk space monitoring

rabbitmq4geonode | 2018-10-29T12:43:36.107690505Z 2018-10-29 12:43:36.107 [info] <0.266.0> Disk free limit set to 50MB

rabbitmq4geonode | 2018-10-29T12:43:36.126513337Z 2018-10-29 12:43:36.126 [info] <0.269.0> Limiting to approx 1048476 file handles (943626 sockets)

rabbitmq4geonode | 2018-10-29T12:43:36.126767100Z 2018-10-29 12:43:36.126 [info] <0.270.0> FHC read buffering:  OFF

rabbitmq4geonode | 2018-10-29T12:43:36.126895478Z 2018-10-29 12:43:36.126 [info] <0.270.0> FHC write buffering: ON

rabbitmq4geonode | 2018-10-29T12:43:36.129582128Z 2018-10-29 12:43:36.129 [info] <0.222.0> Waiting for Mnesia tables for 30000 ms, 9 retries left

rabbitmq4geonode | 2018-10-29T12:43:36.157630132Z 2018-10-29 12:43:36.157 [info] <0.222.0> Waiting for Mnesia tables for 30000 ms, 9 retries left

rabbitmq4geonode | 2018-10-29T12:43:36.157694197Z 2018-10-29 12:43:36.157 [info] <0.222.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping registration.

rabbitmq4geonode | 2018-10-29T12:43:36.158718359Z 2018-10-29 12:43:36.158 [info] <0.222.0> Priority queues enabled, real BQ is rabbit_variable_queue

rabbitmq4geonode | 2018-10-29T12:43:36.162726893Z 2018-10-29 12:43:36.162 [info] <0.292.0> Starting rabbit_node_monitor

rabbitmq4geonode | 2018-10-29T12:43:36.189329652Z 2018-10-29 12:43:36.188 [info] <0.338.0> Making sure data directory '/var/lib/rabbitmq/mnesia/rabbit@39ca0b651470/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L' for vhost '/' exists

rabbitmq4geonode | 2018-10-29T12:43:36.205375889Z 2018-10-29 12:43:36.205 [info] <0.338.0> Starting message stores for vhost '/'

rabbitmq4geonode | 2018-10-29T12:43:36.205674103Z 2018-10-29 12:43:36.205 [info] <0.342.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_transient": using rabbit_msg_store_ets_index to provide index

rabbitmq4geonode | 2018-10-29T12:43:36.208536564Z 2018-10-29 12:43:36.208 [info] <0.338.0> Started message store of type transient for vhost '/'

rabbitmq4geonode | 2018-10-29T12:43:36.208822596Z 2018-10-29 12:43:36.208 [info] <0.345.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent": using rabbit_msg_store_ets_index to provide index

rabbitmq4geonode | 2018-10-29T12:43:36.215934044Z 2018-10-29 12:43:36.215 [info] <0.338.0> Started message store of type persistent for vhost '/'

rabbitmq4geonode | 2018-10-29T12:43:36.243343874Z 2018-10-29 12:43:36.243 [info] <0.434.0> started TCP Listener on [::]:5672

rabbitmq4geonode | 2018-10-29T12:43:36.243855088Z 2018-10-29 12:43:36.243 [info] <0.222.0> Setting up a table for connection tracking on this node: tracked_connection_on_node_rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.244177734Z 2018-10-29 12:43:36.243 [info] <0.222.0> Setting up a table for per-vhost connection counting on this node: tracked_connection_per_vhost_on_node_rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.244673829Z 2018-10-29 12:43:36.244 [info] <0.33.0> Application rabbit started on node rabbit@39ca0b651470

rabbitmq4geonode | 2018-10-29T12:43:36.665060821Z 2018-10-29 12:43:36.664 [info] <0.5.0> Server startup complete; 0 plugins started.

rabbitmq4geonode | 2018-10-29T12:43:36.665094232Z  completed with 0 plugins.

rabbitmq4geonode | 2018-10-29T12:43:52.068167997Z 2018-10-29 12:43:52.067 [info] <0.440.0> accepting AMQP connection <0.440.0> (172.18.0.3:42078 -> 172.18.0.2:5672)

rabbitmq4geonode | 2018-10-29T12:43:52.070800718Z 2018-10-29 12:43:52.070 [info] <0.440.0> connection <0.440.0> (172.18.0.3:42078 -> 172.18.0.2:5672): user 'guest' authenticated and granted access to vhost '/'

rabbitmq4geonode | 2018-10-29T12:43:52.081172134Z 2018-10-29 12:43:52.080 [info] <0.449.0> accepting AMQP connection <0.449.0> (172.18.0.3:42080 -> 172.18.0.2:5672)

rabbitmq4geonode | 2018-10-29T12:43:52.103513457Z 2018-10-29 12:43:52.103 [info] <0.449.0> connection <0.449.0> (172.18.0.3:42080 -> 172.18.0.2:5672): user 'guest' authenticated and granted access to vhost '/'

rabbitmq4geonode | 2018-10-29T12:43:52.143869719Z 2018-10-29 12:43:52.143 [info] <0.469.0> accepting AMQP connection <0.469.0> (172.18.0.3:42082 -> 172.18.0.2:5672)

rabbitmq4geonode | 2018-10-29T12:43:52.147983783Z 2018-10-29 12:43:52.147 [info] <0.469.0> connection <0.469.0> (172.18.0.3:42082 -> 172.18.0.2:5672): user 'guest' authenticated and granted access to vhost '/'

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Sunday, October 28, 2018 3:02 PM
To: Ana Boljevic <[hidden email]>
Cc: Alessio Fabiani <[hidden email]>; [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

Ana,

 

if you run

 

git checkout -- <file>

 

for each changed file then you don't need to remove them. Can you try again? What is the error from the container that doesn't start?

 

Il giorno dom 28 ott 2018 alle ore 12:54 Ana Boljevic <[hidden email]> ha scritto:

 

Dear Francesco and Alessio,


We have moved all changed files in /tmp folder of the host, git pull, put moved files back in thair original path and than
docker-compose stop
docker-compose up --no-build -d
but now django container can't bring up



root@5058e8a1637f:/usr/src/app# git checkout                                                                                                    
M       docker-compose.yml
M       entrypoint.sh
M       geonode/settings.py
M       scripts/docker/env/production/celery.env
M       scripts/docker/env/production/django.env
M       scripts/docker/env/production/geoserver.env

geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/entrypoint.sh /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/geonode/settings.py /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/celery.env /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/django.env /tmp
geonode@testgis:/tmp$ docker cp 5058e8a1637f:/usr/src/app/scripts/docker/env/production/geoserver.env /tmp

rm docker-compose.yml entrypoint.sh geonode/settings.py scripts/docker/env/production/celery.env scripts/docker/env/production/django.env scripts/docker/env/production/geoserver.env

git pull

geonode@testgis:~/geonode$ docker cp /tmp/docker-compose.yml 5058e8a1637f:/usr/src/app/docker-compose.yml
geonode@testgis:~/geonode$ docker cp /tmp/entrypoint.sh 5058e8a1637f:/usr/src/app/entrypoint.sh
geonode@testgis:~/geonode$ docker cp /tmp/settings.py 5058e8a1637f:/usr/src/app/geonode/settings.py
geonode@testgis:~/geonode$ docker cp /tmp/celery.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/celery.env
geonode@testgis:~/geonode$ docker cp /tmp/django.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/django.env
geonode@testgis:~/geonode$ docker cp /tmp/geoserver.env 5058e8a1637f:/usr/src/app/scripts/docker/env/production/geoserver.env

docker-compose stop
docker-compose up --no-build -d


Regards,

 

Ana



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/27/18 00:36 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Alessio Fabiani <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Yes Alessio but I guessed Ana would be ended up with a merge issue. One easy solution if settings.py is the only file edited would be to copy it somewhere else then run

 

git checkout

 

before

 

git pull

 

finally overwrite settings.py with the copied one.

 

Il giorno ven 26 ott 2018 alle ore 20:00 Ana Boljevic <[hidden email]> ha scritto:

Sorry,
we have error, I didn't notice at first:
geonode@testgis:~/geonode$ docker exec -i -t django4geonode bash
root@5058e8a1637f:/usr/src/app# git pull
remote: Enumerating objects: 321, done.
remote: Counting objects: 100% (321/321), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 620 (delta 308), reused 307 (delta 301), pack-reused 299
Receiving objects: 100% (620/620), 3.66 MiB | 812.00 KiB/s, done.
Resolving deltas: 100% (441/441), completed with 126 local objects.
From https://github.com/GeoNode/geonode
   33aa3e6..34ac634  master     -> origin/master
   2ea8bc6..89efc19  2.8.x      -> origin/2.8.x
 * [new branch]      ISSUE_4025 -> origin/ISSUE_4025
Updating 33aa3e6..34ac634
error: Your local changes to the following files would be overwritten by merge:
        geonode/settings.py
Please, commit your changes or stash them before you can merge.
Aborting

Regards,

 

Ana



-------- Original message --------
From: Ana Boljevic <[hidden email]>
Date: 10/26/18 19:50 (GMT+01:00)
To: Alessio Fabiani <[hidden email]>
Cc: [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

Dear Alessio,


We have done:
docker exec -i -t django4geonode bash
git pull
exit
docker-compose stop
docker-compose up --no-build -d

and after that, from django4geonode container error still remains:

root@5058e8a1637f:/usr/src/app# python manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process OPSTINE', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'OPSTINE'",))

Regards,

 

Ana

 

 



-------- Original message --------
From: Alessio Fabiani <[hidden email]>
Date: 10/26/18 15:51 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Francesco Bartoli <[hidden email]>, [hidden email], geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

In order to update the GeoNode on your GeoNode instance, I guess you can try something like

 

docker exec -i -t django4geonode bash

git pull

exit

docker-compose stop

docker-compose up --no-build -d

 

[hidden email] can you confirm?

 

 

Il giorno ven 26 ott 2018 alle ore 15:45 Ana Boljevic <[hidden email]> ha scritto:

Sorry, but my docker experience is weak. I don't know how to solve the problem. 

I want to apply fix from github without loosing my data. Is it possible?


Can you please write commands?

 

Regards,

 

Ana



-------- Original message --------
From: Francesco Bartoli <[hidden email]>
Date: 10/26/18 14:25 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: geonode-users <[hidden email]>, [hidden email]
Subject: RE: [GeoNode-users] Info about updatelayers command?

If you already cloned it then you can just execute

 

git pull origin master

 

Rebuilding all the containers is not terrible until you don’t remove the volumes. 


Hope this helps

Francesco

On 26 Oct 2018, 12:54 +0200, Ana Boljevic <[hidden email]>, wrote:

Dear Francesco,

Can you please be more specific.
Should we pull latest code with this command:
git clone https://github.com/GeoNode/geonode.git

Do I have to rebuild all containers or can I rebuild only django4geonode ?
Will I lose all of my settings and data by doing this ?

Regards,

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: francesco bartoli [mailto:[hidden email]]
Sent: Friday, October 26, 2018 11:12 AM
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>; geonode-users <[hidden email]>; [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

If you apply changes or you have got new updates from the repo then you have to rebuild the image so please try to add and use the option "--build" that I mentioned above.

 

However if you are going to modify geonode and don't want to contribute back with pull requests then the suggested method would be to use a geonode-project.

 

Il giorno ven 26 ott 2018 alle ore 09:46 Ana Boljevic <[hidden email]> ha scritto:

Dear Francesco,


We did the following 15 days ago:
git clone https://github.com/GeoNode/geonode.git
cd /home/geonode/geonode
docker-compose up -d


In meantime, we make changes on containers and then commit those changes.
Can you please explain in details how to apply fix from github ?


Regards

 

Ana

 

 



-------- Original message --------
From: francesco bartoli <[hidden email]>
Date: 10/26/18 08:50 (GMT+01:00)
To: Ana Boljevic <[hidden email]>
Cc: Michael Fedak <[hidden email]>, geonode-users <[hidden email]>, [hidden email]
Subject: Re: [GeoNode-users] Info about updatelayers command?

Hi Ana,

 

can you please explain what did you do? The better to try is to pull the latest code from github and then run "docker-compose up --build" regardless of the version. The fix is for sure also in master.

 

Hope this helps,

Francesco

 

Il giorno ven 26 ott 2018 alle ore 07:16 Ana Boljevic <[hidden email]> ha scritto:

Dears,

 

We have tried to implement solution by Mr. Fabiani:

https://github.com/GeoNode/geonode/pull/3986/files

but after we have manually changed those 4 files django4geonode containers can't bring up anymore.

Does this solution apply also for GeoNode version 2.10rc4 ?

 

Thanks in advance.

 

Regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

From: Michael Fedak [mailto:[hidden email]]
Sent: Monday, October 22, 2018 3:20 PM
To: Ana Boljevic <[hidden email]>
Cc: [hidden email]; geonode-users <[hidden email]>
Subject: Re: [GeoNode-users] Info about updatelayers command?

 

 I had a similar issue on 2.8 last week. See here for the discussion/fix: https://github.com/GeoNode/geonode/issues/3984

 

On Mon, Oct 22, 2018 at 7:25 AM Ana Boljevic <[hidden email]> wrote:

Dear Geonode community,

 

If someone knows little bit more about this, we would appreciate your help J Explanation below:


We have installed Geonode on docker (version 2.10rc4). We imported first kml layer but updatelayers (from inside of django4geonode container) report problem "Could not ADD GeoServer User None Rule for Layer":

root@5058e8a1637f:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 1 layers, starting processing
Stopping process because --ignore-errors was not set and an error was found.
Traceback (most recent call last):
  File "./manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle
    execute_signals=True)
  File "/usr/src/app/geonode/geoserver/helpers.py", line 637, in gs_slurp
    layer.set_permissions(perm_spec)
  File "/usr/src/app/geonode/security/models.py", line 216, in set_permissions
    sync_geofence_with_guardian(self.layer, perms, group=group)
  File "/usr/src/app/geonode/decorators.py", line 44, in wrapper
    return func(*args, **kwargs)
  File "/usr/src/app/geonode/security/utils.py", line 392, in sync_geofence_with_guardian
    _update_geofence_rule(layer.name, layer.workspace, service)
  File "/usr/src/app/geonode/security/utils.py", line 563, in _update_geofence_rule
    raise RuntimeError(msg)
Exception: ('Failed to process novi_r6_Slijepac_most_10kV', RuntimeError("Could not ADD GeoServer User None Rule for Layer u'novi_r6_Slijepac_most_10kV'",))

But the same command from celery4geonode container has different output:

root@bca672a5673d:/usr/src/app# ./manage.py updatelayers
Inspecting the available layers in GeoServer ...
Found 6 layers, starting processing
/usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties.  This is currently implemented in .identificationinfo.  Please see https://github.com/geopython/OWSLib/issues/38 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/owslib/iso.py:482: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
  FutureWarning)
/usr/local/lib/python2.7/site-packages/geoserver/style.py:73: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if not user_style:
/usr/local/lib/python2.7/site-packages/geoserver/style.py:77: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if user_style:
... Creating Thumbnail for Layer [geonode:OPSTINE]
[updated] Layer OPSTINE (1/6)
... Creating Thumbnail for Layer [geonode:novi_novi_r6_Pavino_Polje_10kV_izmijenjen]
[updated] Layer novi_novi_r6_Pavino_Polje_10kV_izmijenjen (2/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
... Creating Thumbnail for Layer [geonode:novi_r6_Ambarine_Przista_10kV]
[created] Layer novi_r6_Ambarine_Przista_10kV (3/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Gimnazija_10_kV]
[updated] Layer novi_r6_Gimnazija_10_kV (4/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Planinica_10_kV]
[updated] Layer novi_r6_Planinica_10_kV (5/6)
... Creating Thumbnail for Layer [geonode:novi_r6_Rasovo_10kV]
[updated] Layer novi_r6_Rasovo_10kV (6/6)


Finished processing 6 layers in 53.0 seconds.

1 Created layers
5 Updated layers
0 Failed layers
8.830000 seconds per layer

Is such behavior normal ?

Thanks in advance.

 

Kind regards,

 

Ana Boljević

Direkcija za razvoj, pristup mreži i ICT

Sektor za ICT

Služba za GIS i tehničku bazu podataka

DOO „Crnogorski elektrodistributivni sistem“ Podgorica

Ivana Milutinovića br.12, Podgorica

Tel: +382 20 408 473

www.cedis.me

Please do not print this e-mail unless you really need to

 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


 

--

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead

 

GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

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.


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.

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

image001.jpg (2K) Download Attachment
image002.jpg (1K) Download Attachment
image002.jpg (1K) Download Attachment