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

McIntosh, Scott Scott.McIntosh at icf.com
Thu Nov 2 10:04:23 PDT 2023


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:
<https://github.com/GeoNode/geonode-project#start-your-server-using-docker>
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>
[apple-touch-icon-180x180-a80b8e11abe2.png]<https://github.com/GeoNode/geonode-project#start-your-server-using-docker>
<https://training.geonode.geosolutionsgroup.com/master/GN3/docker/index.html>
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>
[X]<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<http://icf.com> | scott.mcintosh at icf.com<mailto:scott.mcintosh at icf.com> | mobile: 703.283.3424



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20231102/ec1548c9/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: apple-touch-icon-180x180-a80b8e11abe2.png
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20231102/ec1548c9/attachment-0001.png>


More information about the geonode-users mailing list