[GeoNode-users] R: Migrate from Geonode 2.4 to 2.10

Rizky Maulana Nugraha rizky at kartoza.com
Thu Apr 2 11:03:42 PDT 2020


Dear Eugenio,

I believe this is the correct settings. Django will use database named `geonode`, while `geonode_data` is used as postgis datastore by GeoServer.

You already confirm in the previous email that you are able to see the layer from GeoServer’s Layer Preview, so most probably the postgis datastore connections to geonode_data (in GeoServer) is correct.

So the next thing we need to check is the oauth2 settings both in GeoServer and Geonode should use the same Oauth token. You could try giving us both screenshots to check.

In addition to that, I would suggest to screen capture the browser error logs when navigating into the map client to view the layer. Perhaps the javascript logs can tell us something.

Regards,
--
Rizky Maulana Nugraha
Kartoza
rizky at kartoza.com
On 2 Apr 2020 21.15 +0700, Eugenio Trumpy <frippe12573 at hotmail.com>, wrote:
> 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
>
>
>
>
>
> _______________________________________________
> 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/20200403/0a46583a/attachment-0001.html>


More information about the geonode-users mailing list