[GeoNode-users] GeoNode-Project CenTOS7 Installation
Ran L.
kula009 at gmail.com
Wed Jul 17 10:23:45 PDT 2019
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-users/attachments/20190717/502c6473/attachment-0001.html>
More information about the geonode-users
mailing list