[GeoNode-users] Migrate from Geonode 2.4 to 2.10
toni.schoenbuchner at csgis.de
Thu Apr 2 00:40:18 PDT 2020
beeing a bit under time pressure please excuse my short answer.
> I inserted my domain in the ALLOWED_HOSTS, and changed the URLs of Geoserver and set-up the connection with geonode db.
> I'm not sure geonode_data db connection works fine. How could I check it?
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
^ this shows I'm using sqlite. Namely development.db. I would expect something with postgres here in your case.
> As pointed by Alessio, I restored the geoserver data directories in the new instance. Geoserver is up and running with almost all the datasets I had in the old instance. So I see no problem from this side if I'm not wrong. The layers can be perfectly checked in geoserver 'Layer preview'.
> I restored even the geonode db in the new server without issue, and by using directly settings.py file with the adjusted db connection, I was able to follow the instruction of db migration suggested in guide by Paolo.
If above gives you something with postgres still in terminal let's check which layers your database
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)
> I think I have now geoserver running, geonode db migrated and restored and geonode_data restored. I'm not sure that the set-up of the new authorization system geonode/geoserver is ok, I followed this documentation: https://docs.geonode.org/en/master/advanced/components/index.html#geoserver-2-12-x-and-above <https://docs.geonode.org/en/master/advanced/components/index.html#geoserver-2-12-x-and-above>
> Should be everything ok, but not sure, because for instance I cannot access geoserver directly from geonode (from the user menu).
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the geonode-users