[GeoNode-devel] [GeoNode-users] GeoNode-Project CenTOS7 Installation
1520 gis
juliermeopensourcedeveloper at gmail.com
Wed Jul 17 11:52:47 PDT 2019
Thank you for the update @francesco bartoli <xbartolone at gmail.com>. And
please, @Ran L. <kula009 at gmail.com> do not consider the previous e-mail, I
was on the wrong server. I will try on the right one and I will send the
response.
On Wed, Jul 17, 2019 at 3:46 PM 1520 gis <
juliermeopensourcedeveloper at gmail.com> wrote:
> Yes, you are right. We got close, but still an issue. See bellow please
> with django-admin and manage.py
>
> root at bdeea2347fe6:/usr/src/my_geonode# django-admin updatelayers
> Traceback (most recent call last):
> File "/usr/local/bin/django-admin", line 10, in <module>
> sys.exit(execute_from_command_line())
> 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/local/lib/python2.7/site-packages/geonode/geoserver/management/commands/updatelayers.py",
> line 98, in handle
> owner = get_valid_user(user)
> File "/usr/local/lib/python2.7/site-packages/geonode/people/utils.py",
> line 44, in get_valid_user
> theuser = get_default_user()
> File "/usr/local/lib/python2.7/site-packages/geonode/people/utils.py",
> line 31, in get_default_user
> if superusers.count() > 0:
> File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py",
> line 364, in count
> return self.query.get_count(using=self.db)
> File
> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py",
> line 499, in get_count
> number = obj.get_aggregation(using, ['__count'])['__count']
> File
> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py",
> line 480, in get_aggregation
> result = compiler.execute_sql(SINGLE)
> File
> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
> line 899, in execute_sql
> raise original_exception
> django.db.utils.OperationalError: no such table: people_profile
> root at bdeea2347fe6:/usr/src/my_geonode# python manage.py updatelayers
> Traceback (most recent call last):
> File "manage.py", line 31, 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/local/lib/python2.7/site-packages/geonode/geoserver/management/commands/updatelayers.py",
> line 98, in handle
> owner = get_valid_user(user)
> File "/usr/local/lib/python2.7/site-packages/geonode/people/utils.py",
> line 44, in get_valid_user
> theuser = get_default_user()
> File "/usr/local/lib/python2.7/site-packages/geonode/people/utils.py",
> line 31, in get_default_user
> if superusers.count() > 0:
> File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py",
> line 364, in count
> return self.query.get_count(using=self.db)
> File
> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py",
> line 499, in get_count
> number = obj.get_aggregation(using, ['__count'])['__count']
> File
> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py",
> line 480, in get_aggregation
> result = compiler.execute_sql(SINGLE)
> File
> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
> line 899, in execute_sql
> raise original_exception
> django.db.utils.OperationalError: no such table: people_profile
>
> On Wed, Jul 17, 2019 at 2:59 PM Ran L. <kula009 at gmail.com> wrote:
>
>> But you are getting a different error message this time. Could you try
>> the simple command:
>>
>> 'django-admin updatelayers'
>>
>> And see how it goes?
>>
>> Ran
>>
>> On Wed, Jul 17, 2019 at 10:30 AM 1520 gis <
>> juliermeopensourcedeveloper at gmail.com> wrote:
>>
>>> Thank you very much Ran, but the issue remains.
>>>
>>> mkdir -p /usr/src/app/; \
>>> > source $HOME/.override_env; \
>>> > echo DATABASE_URL=$DATABASE_URL; \
>>> > echo GEODATABASE_URL=$GEODATABASE_URL; \
>>> > echo SITEURL=$SITEURL; \
>>> > echo ALLOWED_HOSTS=$ALLOWED_HOSTS; \
>>> > echo GEOSERVER_PUBLIC_LOCATION=$GEOSERVER_PUBLIC_LOCATION;
>>> DATABASE_URL=postgres://geonode:geonode@db:5432/geonode
>>> GEODATABASE_URL=postgis://geonode_data:geonode_data@db:5432/geonode_data
>>> SITEURL=http://cgticgeo.sipam.gov.br/
>>> ALLOWED_HOSTS=['cgticgeo.sipam.gov.br', 'cgticgeo.sipam.gov.br', '
>>> cgticgeo.sipam.gov.br:80', 'geonode', 'django']
>>> GEOSERVER_PUBLIC_LOCATION=http://cgticgeo.sipam.gov.br/geoserver/
>>> root at 2ff53eacb7e9:/usr/src/my_geonode# python manage.py updatelayers -w
>>> geonode -f previsao_meteorologica_aml
>>> JSONField implementation is: <class 'jsonfield.fields.JSONField'>
>>> Inspecting the available layers in GeoServer ...
>>> Found 1 layers, starting processing
>>> Could not retrieve GeoFence Rules count.
>>> Could not retrieve GeoFence Rules count.
>>> ... Creating Thumbnail for Layer [geonode:previsao_meteorologica_aml]
>>> Could not retrieve GeoFence Rules count.
>>> Could not retrieve GeoFence Rules count.
>>> Stopping process because --ignore-errors was not set and an error was
>>> found.
>>> Traceback (most recent call last):
>>> File "manage.py", line 31, in <module>
>>> execute_from_command_line(sys.argv)
>>> File
>>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>> line 354, in execute_from_command_line
>>> utility.execute()
>>> File
>>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>> line 346, 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 394, in run_from_argv
>>> self.execute(*args, **cmd_options)
>>> File
>>> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
>>> line 445, in execute
>>> output = self.handle(*args, **options)
>>> File
>>> "/usr/src/geonode/geonode/geoserver/management/commands/updatelayers.py",
>>> line 124, in handle
>>> execute_signals=True)
>>> File "/usr/src/geonode/geonode/geoserver/helpers.py", line 630, in
>>> gs_slurp
>>> layer.set_permissions(perm_spec)
>>> File "/usr/src/geonode/geonode/security/models.py", line 205, in
>>> set_permissions
>>> sync_geofence_with_guardian(self.layer, perms, user=geofence_user)
>>> File "/usr/src/geonode/geonode/decorators.py", line 48, in wrapper
>>> return func(*args, **kwargs)
>>> File "/usr/src/geonode/geonode/security/utils.py", line 448, in
>>> sync_geofence_with_guardian
>>> _update_geofence_rule(layer.name, layer.workspace, service,
>>> user=_user)
>>> File "/usr/src/geonode/geonode/security/utils.py", line 592, in
>>> _update_geofence_rule
>>> raise RuntimeError(msg)
>>> Exception: ('Failed to process previsao_meteorologica_aml',
>>> RuntimeError('Could not ADD GeoServer User \'admin\' Rule for Layer
>>> u\'previsao_meteorologica_aml\': \'u\'<!doctype html><html
>>> lang="en"><head><title>HTTP Status 404 \\u2013 Not Found</title><style
>>> type="text/css">h1
>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
>>> h2
>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
>>> h3
>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
>>> body
>>> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b
>>> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
>>> p
>>> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}
>>> a {color:black;} a.name {color:black;} .line
>>> {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP
>>> Status 404 \\u2013 Not Found</h1><hr class="line" /><p><b>Type</b> Status
>>> Report</p><p><b>Description</b> The origin server did not find a current
>>> representation for the target resource or is not willing to disclose that
>>> one exists.</p><hr class="line" /><h3>Apache
>>> Tomcat/9.0.19</h3></body></html>\'\'',))
>>>
>>> Kind regards
>>>
>>> Julierme
>>>
>>> On Wed, Jul 17, 2019 at 2:23 PM Ran L. <kula009 at gmail.com> wrote:
>>>
>>>> Hi Julierme,
>>>>
>>>> I had the problem you described before. The reason you are getting this
>>>> is because the env variables are not set properly. Run this command before
>>>> running any other commands:
>>>>
>>>> mkdir -p /usr/src/app/; \
>>>> source $HOME/.override_env; \
>>>> echo DATABASE_URL=$DATABASE_URL; \
>>>> echo GEODATABASE_URL=$GEODATABASE_URL; \
>>>> echo SITEURL=$SITEURL; \
>>>> echo ALLOWED_HOSTS=$ALLOWED_HOSTS; \
>>>> echo GEOSERVER_PUBLIC_LOCATION=$GEOSERVER_PUBLIC_LOCATION;
>>>>
>>>> You should be able to run the commands then.
>>>>
>>>> I
>>>>
>>>>
>>>>
>>>> On Wed, Jul 17, 2019 at 10:19 AM 1520 gis <
>>>> juliermeopensourcedeveloper at gmail.com> wrote:
>>>>
>>>>> Hi Ran,
>>>>>
>>>>> Thank you very much for your reply. Yes, I just installed a brand new
>>>>> version of GeoNode-Project at 2.8 and updatelayers did not work. See the
>>>>> response in [1]. I then ran
>>>>>
>>>>> python manage.py makemigrations
>>>>> python manage.py migrate
>>>>>
>>>>> However, the problem remains. I am now asked for a superuser [2]. I
>>>>> did create a superuser for GeoNode-Project in a CenTOS7, but did not solve
>>>>> the problem. The issue also happens in GeoNode-Project at 2.10.
>>>>> Any help would be appreciated.
>>>>>
>>>>> Kind regards
>>>>>
>>>>> Julierme
>>>>>
>>>>> [1]
>>>>> root at 2ff53eacb7e9:/usr/src/my_geonode# python manage.py updatelayers
>>>>> -s metoc -f previsao_meteorologica_aml
>>>>> JSONField implementation is: <class 'jsonfield.fields.JSONField'>
>>>>> Traceback (most recent call last):
>>>>> File "manage.py", line 31, in <module>
>>>>> execute_from_command_line(sys.argv)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>>>> line 354, in execute_from_command_line
>>>>> utility.execute()
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>>>> line 346, 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 394, in run_from_argv
>>>>> self.execute(*args, **cmd_options)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
>>>>> line 445, in execute
>>>>> output = self.handle(*args, **options)
>>>>> File
>>>>> "/usr/src/geonode/geonode/geoserver/management/commands/updatelayers.py",
>>>>> line 98, in handle
>>>>> owner = get_valid_user(user)
>>>>> File "/usr/src/geonode/geonode/people/utils.py", line 44, in
>>>>> get_valid_user
>>>>> theuser = get_default_user()
>>>>> File "/usr/src/geonode/geonode/people/utils.py", line 31, in
>>>>> get_default_user
>>>>> if superusers.count() > 0:
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line
>>>>> 318, in count
>>>>> return self.query.get_count(using=self.db)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py",
>>>>> line 466, in get_count
>>>>> number = obj.get_aggregation(using, ['__count'])['__count']
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py",
>>>>> line 447, in get_aggregation
>>>>> result = compiler.execute_sql(SINGLE)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
>>>>> line 840, in execute_sql
>>>>> cursor.execute(sql, params)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line
>>>>> 79, in execute
>>>>> return super(CursorDebugWrapper, self).execute(sql, params)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line
>>>>> 64, in execute
>>>>> return self.cursor.execute(sql, params)
>>>>> File "/usr/local/lib/python2.7/site-packages/django/db/utils.py",
>>>>> line 98, in __exit__
>>>>> six.reraise(dj_exc_type, dj_exc_value, traceback)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line
>>>>> 64, in execute
>>>>> return self.cursor.execute(sql, params)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
>>>>> line 318, in execute
>>>>> return Database.Cursor.execute(self, query, params)
>>>>> django.db.utils.OperationalError: no such table: people_profile
>>>>>
>>>>> [2]
>>>>> root at 2ff53eacb7e9:/usr/src/my_geonode# python manage.py updatelayers
>>>>> -f previsao_meteorologica_aml
>>>>> JSONField implementation is: <class 'jsonfield.fields.JSONField'>
>>>>> Traceback (most recent call last):
>>>>> File "manage.py", line 31, in <module>
>>>>> execute_from_command_line(sys.argv)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>>>> line 354, in execute_from_command_line
>>>>> utility.execute()
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>>>>> line 346, 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 394, in run_from_argv
>>>>> self.execute(*args, **cmd_options)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
>>>>> line 445, in execute
>>>>> output = self.handle(*args, **options)
>>>>> File
>>>>> "/usr/src/geonode/geonode/geoserver/management/commands/updatelayers.py",
>>>>> line 98, in handle
>>>>> owner = get_valid_user(user)
>>>>> File "/usr/src/geonode/geonode/people/utils.py", line 44, in
>>>>> get_valid_user
>>>>> theuser = get_default_user()
>>>>> File "/usr/src/geonode/geonode/people/utils.py", line 35, in
>>>>> get_default_user
>>>>> raise GeoNodeException('You must have an admin account configured '
>>>>> geonode.GeoNodeException: You must have an admin account configured
>>>>> before importing data. Try: django-admin.py createsuperuser
>>>>>
>>>>> On Wed, Jul 17, 2019 at 2:06 PM Ran L. <kula009 at gmail.com> wrote:
>>>>>
>>>>>> Hello Julierme,
>>>>>>
>>>>>> I also had issues with the geonode "updatelayers" command yesterday,
>>>>>> and might have found a possible solution for it:
>>>>>>
>>>>>> I'm also using geonode-project with docker on a Ubuntu machine. I
>>>>>> couldn't run the command successfully after building the service. You can
>>>>>> see the details here: https://github.com/GeoNode/geonode/issues/4650
>>>>>>
>>>>>> *A fix: *I took my own customized files (templates, python files,
>>>>>> statics, etc.) and dump them into a newly created geonode-project. The
>>>>>> command worked after that.
>>>>>>
>>>>>> My speculation is that the geonode-project files I had were not
>>>>>> compatible with the current geonode, since I haven't updated them for a
>>>>>> long while.
>>>>>>
>>>>>> Hope this provides some insights.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Ran
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Jul 17, 2019 at 9:47 AM 1520 gis <
>>>>>> juliermeopensourcedeveloper at gmail.com> wrote:
>>>>>>
>>>>>>> Dear users and developers,
>>>>>>>
>>>>>>> I am not sure if it is on the scope of future work, but I have
>>>>>>> already started a tutorial to install GeoNode-Project via Docker on a
>>>>>>> CentOS7 server. I got it installed, but not sure that I got all required
>>>>>>> geonode packages on a CenTOS7. Also, I had an issue while using python
>>>>>>> manage.py updatelayers.
>>>>>>>
>>>>>>> I am making myself a volunteer to help on this theme. I would like
>>>>>>> to share the command lines and have someones' contribution to improve what
>>>>>>> I got so far.
>>>>>>>
>>>>>>> Kind regards,
>>>>>>>
>>>>>>> Julierme
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> geonode-users mailing list
>>>>>>> geonode-users at lists.osgeo.org
>>>>>>> https://lists.osgeo.org/mailman/listinfo/geonode-users
>>>>>>>
>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20190717/73ba07b7/attachment-0001.html>
More information about the geonode-devel
mailing list