[GeoNode-users] R: Migrate from Geonode 2.4 to 2.10
Eugenio Trumpy
frippe12573 at hotmail.com
Thu Apr 2 07:14:56 PDT 2020
Dear Toni,
thanks for these further hints.
I comment and put the testing results among your lines:
Check which connection is used by Django shell:
# enable your venv
# set your correct settings with DJANGO_SETTINGS_MODULE
DJANGO_SETTINGS_MODULE=my_geonode.local_settings python manage.py shell
from django import db
db.utils.settings.DATABASES['default']['NAME']
... '/Users/ts/git/gitlabtest/env/src/geonode/geonode/development.db'
^ this shows I'm using sqlite. Namely development.db. I would expect something with postgres here in your case.
If I did correctly I got, I gave: db.utils.settings.DATABASES['default']
I got
{'NAME': 'geonode',
'USER': 'geonode',
'PASSWORD': 'geonode',
'HOST': 'localhost',
'PORT': 5432,
'CONN_MAX_AGE': 5,
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'OPTIONS': {'connect_timeout': 5},
'ATOMIC_REQUESTS': False,
'AUTOCOMMIT': True,
'TIME_ZONE': None,
'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}
which is the geonode db, and not the one with the data.
I presume this is not correct, I would expect the connection string to the geonode_data database.
I pastebin some my settings.py lines related to the DATABASES: https://pastebin.com/nyiV23gm
If above gives you something with postgres still in terminal let's check which layers your database
holds.
yes, if the simple geonode (and not geonode_data) is correct
from geonode.layers.models import Layer
l = Layer.objects.all()
for i in l: print (i.title)
This should give you a listing of all your layer titles.
If not either your layers are not in geonode database found
or your local_setting is using a wrong database connection (which ends f.e in sqlite)
This returns me a lot of layers, all I have actually
I can offer to have a look at your settings but would need:
- screenshot of your oauth2 and rest setting on side of geoserver
- screenshot of your oauth2 settings on side of geonode
- the part from your local_settings for Geoserver endpoints.
* of course as p.m.
Somewhere here I would expect something wrong.
Well, apart last point, I think the problem is still the connection to the geonode_data db.
Thanks for now,
other suggestions?
Eugenio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20200402/fecdb4fa/attachment.html>
More information about the geonode-users
mailing list