[GeoNode-users] Error Updating GeoNode ip

Sara Ahmadi ziba.ahmadi at gmail.com
Fri Feb 21 10:25:03 PST 2020


I am installing Geonode 2.10.1 following the instruction in the link below:
http://docs.geonode.org/en/2.10.1/install/core/index.html

I faced several errors (mostly apps version) and solved them until I wanted
to Update the GeoNode ip or hostname:

`sudo PYTHONWARNINGS=ignore VIRTUAL_ENV=$VIRTUAL_ENV
DJANGO_SETTINGS_MODULE=geonode.local_settings GEONODE_ETC=/opt/geonode
GEOSERVER_DATA_DIR=/opt/data/geoserver_data TOMCAT_SERVICE="service tomcat"
APACHE_SERVICE="service nginx" geonode_updateip -p localhost
`

where I get the following error:
```
PUBLIC_IP http://localhost
LOCAL_IP http://localhost
Replacing SITEURL value with 'http://localhost' in /opt/geo
node/local_settings.py ... done.
Adding entry for 'localhost' in /opt/data/geoserver_data/pr
inting/config.yaml ... done.
Traceback (most recent call last):
  File "/usr/local/bin/django-admin", line 11, in <module>
    sys.exit(execute_from_command_line())
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/core/management/__init__.py", line 364, in execute_from_comm and_line
    utility.execute()
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/opt/geonode/geonode/base/management/commands/fixsiten ame.py",
line 39, in handle
    site = Site.objects.get_current()
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/contrib/sites/models.py", line 63, in get_current
    return self._get_site_by_id(site_id)
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/contrib/sites/models.py", line 35, in _get_site_by_id
    site = self.get(pk=site_id)
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/db/models/query.py", line 374, in get
    num = len(clone)
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/db/models/query.py", line 232, in __len__
    self._fetch_all()
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/db/models/query.py", line 1121, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_ fetch)
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/db/models/sql/compiler.py", line 899, in execute_sql
    raise original_exception
django.db.utils.ProgrammingError: relation "django_site" does  not exist
LINE 1: ..."django_site"."domain", "django_site"."name" FROM " django_si...
                                                             ^

Setting up oauth
Waiting Tomcat Service to Restart...
Waiting Apache HTTPD Service to Restart...
Traceback (most recent call last):
  File "/usr/local/bin/django-admin", line 11, in <module>
    sys.exit(execute_from_command_line())
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/core/management/__init__.py", line 364, in execute_from_comm and_line
    utility.execute()
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/opt/geonode/geonode/geoserver/management/commands/upd
atelayers.py", line 98, in handle
    owner = get_valid_user(user)
  File "/opt/geonode/geonode/people/utils.py", line 44, in get _valid_user
    theuser = get_default_user()
  File "/opt/geonode/geonode/people/utils.py", line 31, in get _default_user
    if superusers.count() > 0:
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/db/models/query.py", line 364, in count
    return self.query.get_count(using=self.db)
  File "/home/geonode/.local/lib/python2.7/site-packages/djang
o/db/models/sql/query.py", line 499, in get_count
    number = obj.get_aggregation(using, ['__count'])['__count' ]
   ...
```

I could not figure out the problem. Any helps are appreciated. especially
if any up-to-date installation is available for Geonode 2.10.x on Ubuntu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20200221/c34bc29c/attachment.html>


More information about the geonode-users mailing list