<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear Toni,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
thanks for these further hints.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I comment and put the testing results among your lines:</div>
<div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class="">
<div>
<blockquote type="cite" class=""></blockquote>
<div><br class="">
</div>
<div>Check which connection is used by Django shell:</div>
<div><br class="">
</div>
<div># enable your venv</div>
<div># set your correct settings with DJANGO_SETTINGS_MODULE</div>
<div><br class="">
</div>
<div>DJANGO_SETTINGS_MODULE=my_geonode.local_settings python manage.py shell </div>
from django import db</div>
<div>db.utils.settings.DATABASES['default']['NAME']</div>
<div><br class="">
</div>
<div>... '/Users/ts/git/gitlabtest/env/src/geonode/geonode/development.db'</div>
<div><span class="x_Apple-tab-span" style="white-space:pre"></span>^ this shows I'm using sqlite. Namely development.db. I would expect something with postgres here in your case.</div>
<div><br class="">
</div>
<div><span style="color: rgb(23, 78, 134);">If I did correctly I got, I gave: <span style="color: rgb(23, 78, 134); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important;">db.utils.settings.DATABASES['default']</span></span></div>
<div><span style="color: rgb(23, 78, 134);"><span style="color: rgb(23, 78, 134); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important;"><br>
</span></span></div>
<div><span style="color: rgb(23, 78, 134);"><span style="color: rgb(23, 78, 134); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important;">I
got
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures">{'NAME': 'geonode',</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'USER': 'geonode',</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'PASSWORD': 'geonode',</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'HOST': 'localhost',</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'PORT': 5432,</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'CONN_MAX_AGE': 5,</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'ENGINE': 'django.db.backends.postgresql_psycopg2',</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'OPTIONS': {'connect_timeout': 5},</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'ATOMIC_REQUESTS': False,</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'AUTOCOMMIT': True,</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'TIME_ZONE': None,</span></p>
<p style="margin: 0px; font: 10px Monaco; color: rgb(242, 242, 242); background-color: rgba(0, 0, 0, 0.85); margin: 0px; background-color: rgba(0, 0, 0, 0.85)">
<span style="font-variant-ligatures: no-common-ligatures; font-variant-ligatures: no-common-ligatures"><span> </span>'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}</span></p>
</span></span></div>
<div><br>
</div>
<div><span style="color: rgb(23, 78, 134);">which is the geonode db, and not the one with the data.</span></div>
<div><span style="color: rgb(23, 78, 134);"></span></div>
<div><span style="color: rgb(23, 78, 134);"><br>
</span></div>
<div><span style="color: rgb(23, 78, 134);">I presume this is not correct, I would expect the connection string to the geonode_data database.</span></div>
<div><span style="color: rgb(23, 78, 134);"><br>
</span></div>
<div><span style="color: rgb(23, 78, 134);">I pastebin some my settings.py lines related to the DATABASES: <a href="https://pastebin.com/nyiV23gm" id="LPlnk618813">https://pastebin.com/nyiV23gm</a></span></div>
<div>
<div><br class="">
</div>
<div>If above gives you something with postgres still in terminal let's check which layers your database</div>
<div>holds.</div>
<div><br class="">
</div>
<div><span style="color: rgb(23, 78, 134);">yes, if the simple geonode (and not geonode_data) is correct</span></div>
<div><br>
</div>
<div>from geonode.layers.models import Layer</div>
<div>l = Layer.objects.all()</div>
for i in l: print (i.title)</div>
<div><br>
</div>
<div>This should give you a listing of all your layer titles. </div>
<div>If not either your layers are not in geonode database found</div>
<div>or your local_setting is using a wrong database connection (which ends f.e in sqlite)</div>
<div><br>
</div>
<div><span style="color: rgb(23, 78, 134); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important">This returns me
a lot of layers, all I have actually</span></div>
<div><br class="">
</div>
<div>I can offer to have a look at your settings but would need:</div>
<div>- screenshot of your <u class="">oauth2 and rest</u> setting on side of geoserver</div>
<div>- screenshot of your oauth2 settings on side of geonode</div>
<div>- the part from your local_settings for Geoserver endpoints.</div>
<div><br class="">
</div>
<div><span class="x_Apple-tab-span" style="white-space:pre"></span>* of course as p.m.</div>
<div><br class="">
</div>
<div>Somewhere here I would expect something wrong.</div>
<div><br class="">
</div>
<div>Well, apart last point, I think the problem is still the connection to the geonode_data db.</div>
<div><br>
</div>
<div>Thanks for now,</div>
<div>other suggestions?</div>
<div><br>
</div>
<div>Eugenio</div>
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>