[GeoNode-users] Issues trying to stand up GeoNode 4 with the Docker installation

Giovanni Allegri giovanni.allegri at geosolutionsgroup.com
Thu Nov 23 00:56:54 PST 2023


Hi Scott,

DATABASE_URL and GEODATABASE_URL in your latest .env file (the one with
your pre-existing credentials) miss the user:password values.
Is it just a typo in this email or did you really forget them? They're
required for the connection to PG.

Giovanni

On Thu, Nov 2, 2023 at 6:04 PM McIntosh, Scott via geonode-users <
geonode-users at lists.osgeo.org> wrote:

> Simone Giannecchini asked me to post the details of my issue trying to set
> up GeoNode 4 to this list.
>
> I am trying to use the simplest approach with the Docker installation.  I
> am following the instructions here:
> GeoNode/geonode-project: A django template project for creating custom
> GeoNode projects.
> <https://github.com/GeoNode/geonode-project#start-your-server-using-docker>
> github.com
> <https://github.com/GeoNode/geonode-project#start-your-server-using-docker>
> [image: apple-touch-icon-180x180-a80b8e11abe2.png]
> <https://github.com/GeoNode/geonode-project#start-your-server-using-docker>
> <https://github.com/GeoNode/geonode-project#start-your-server-using-docker>
> GeoNode Docker Installation — GeoNode Training
> <https://training.geonode.geosolutionsgroup.com/master/GN3/docker/index.html>
> geonode.geosolutionsgroup.com
> <https://training.geonode.geosolutionsgroup.com/master/GN3/docker/index.html>
>
> <https://training.geonode.geosolutionsgroup.com/master/GN3/docker/index.html>
> <https://training.geonode.geosolutionsgroup.com/master/GN3/docker/index.html>
>
> My environment is:
>
> Ubuntu 22.04.3 LTS
> Python 3.10.12
> pip 22.0.2
> Docker 24.0.7
> Django 3.2.18
>
>
> The basic steps I performed, which are right from the documentation, are:
>
>    1. Set up Python virtual environment
>    2. Grab the geonode-project code
>    3. Create a new project (which I named geonode_4) using
>    the django-admin startproject command
>    4. Create the .env file using the python create-envfile.py script
>    5. Build and launch the containers with docker compose
>
>
> When everything is up trying to access local host gives a 502 error from
> the proxy.
>
> Looking at the logs I see that the Django instance isn’t able to
> authenticate with the database.  The exact error is:
>
> psql: error: connection to server at "db" (172.25.0.7), port 5432 failed:
> FATAL:  password authentication failed for user "postgres"
>
>
> The database section of the generated .env file is:
>
> POSTGRES_USER=postgres
> POSTGRES_PASSWORD=imyqqbUhAaKistN
> GEONODE_DATABASE=geonode_4
> GEONODE_DATABASE_PASSWORD=IUNooNALdpzTbQA
> GEONODE_GEODATABASE=geonode_4_data
> GEONODE_GEODATABASE_PASSWORD=yDpdbmscmgFJRpE
> GEONODE_DATABASE_SCHEMA=public
> GEONODE_GEODATABASE_SCHEMA=public
> DATABASE_HOST=db
> DATABASE_PORT=5432
> DATABASE_URL=postgis://geonode_4:IUNooNALdpzTbQA@db:5432/geonode_4
> GEODATABASE_URL=postgis://geonode_4_data:yDpdbmscmgFJRpE@db
> :5432/geonode_4_data
>
>
>
> Since I already have a Postgres server with the required databases and
> credentials, I also tries that.
>
> That configuration is:
>
> POSTGRES_USER=postgres
> POSTGRES_PASSWORD=[secret]
> GEONODE_DATABASE=geonode
> GEONODE_DATABASE_PASSWORD=[secret]
> GEONODE_GEODATABASE=geonode_data
> GEONODE_GEODATABASE_PASSWORD=[secret]
> GEONODE_DATABASE_SCHEMA=public
> GEONODE_GEODATABASE_SCHEMA=public
> DATABASE_HOST=postgres.511mobility.org
> DATABASE_PORT=5432
> DATABASE_URL=postgis://postgres.511mobility.org:5432/geonode
> GEODATABASE_URL=postgis://postgres.511mobility.org:5432/geonode_data
>
> With this configuration error I get a trace ending with:
>
> File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 122, in
> connect
> django4geonode_4  |     conn = _connect(dsn,
> connection_factory=connection_factory, **kwasync)
> django4geonode_4  | django.db.utils.OperationalError: connection to server
> at "postgres.511mobility.org" (172.31.36.200), port 5432 failed:
> fe_sendauth: no password supplied
>
>
> The out of the box .env settings fail with a db connection error, as does
> a custom configuration to a server whose credentials are know to be valid.
> I hope there is something simple I’m missing.
>
> Thanks in advance,
>
>
> *Scott McIntosh* | Technical Director, Engineering & Emerging Technology
> *ICF* |  icf.com | scott.mcintosh at icf.com | mobile: 703.283.3424
>
>
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users
>


-- 

==

GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==

Dott. Giovanni Allegri

Technical Lead / Project Manager


GeoSolutions Group
phone: +39 0584 962313
cell:     +39 345 2815774

fax:      +39 0584 1660272

https://www.geosolutionsgroup.com/
http://twitter.com/geosolutions_it
-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20231123/d554c297/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: apple-touch-icon-180x180-a80b8e11abe2.png
Type: image/png
Size: 21128 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20231123/d554c297/attachment-0001.png>


More information about the geonode-users mailing list