<div dir="ltr">Hi Scott,<div><br></div><div>DATABASE_URL and GEODATABASE_URL in your latest .env file (the one with your pre-existing credentials) miss the user:password values. </div><div>Is it just a typo in this email or did you really forget them? They're required for the connection to PG.<br></div><div><br></div><div>Giovanni</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 2, 2023 at 6:04 PM McIntosh, Scott via geonode-users <<a href="mailto:geonode-users@lists.osgeo.org">geonode-users@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
<div>Simone Giannecchini asked me to post the details of my issue trying to set up GeoNode 4 to this list.</div>
<div><br>
</div>
<div>I am trying to use the simplest approach with the Docker installation.  I am following the instructions here:</div>
<div>
<div style="display:block">
<div style="display:inline-block" role="link">
<a style="border-radius:10px;font-family:-apple-system,Helvetica,Arial,sans-serif;display:block;width:300px;overflow:hidden;text-decoration:none" rel="nofollow" href="https://github.com/GeoNode/geonode-project#start-your-server-using-docker" dir="ltr" role="button" width="300" target="_blank">
<table style="table-layout:fixed;border-collapse:collapse;width:300px;background-color:rgb(229,230,233);font-family:-apple-system,Helvetica,Arial,sans-serif" cellpadding="0" cellspacing="0" border="0" width="300">
<tbody>
<tr>
<td>
<table bgcolor="#E5E6E9" cellpadding="0" cellspacing="0" width="300" style="font-family:-apple-system,Helvetica,Arial,sans-serif;table-layout:fixed;background-color:rgb(229,230,233)">
<tbody>
<tr>
<td style="padding:8px 0px">
<div style="max-width:100%;margin:0px 16px;overflow:hidden">
<div style="font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left">
<a rel="nofollow" href="https://github.com/GeoNode/geonode-project#start-your-server-using-docker" style="text-decoration:none" target="_blank"><font color="#272727" style="color:rgba(0,0,0,0.847)">GeoNode/geonode-project: A django template project
 for creating custom GeoNode projects.</font></a></div>
<div style="font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left">
<a rel="nofollow" href="https://github.com/GeoNode/geonode-project#start-your-server-using-docker" style="text-decoration:none" target="_blank"><font color="#808080" style="color:rgba(0,0,0,0.498)">github.com</font></a></div>
</div>
</td>
<td style="padding:6px 12px 6px 0px" width="36">
<a rel="nofollow" href="https://github.com/GeoNode/geonode-project#start-your-server-using-docker" target="_blank"><img style="display: inline-block; width: 36px; height: 36px; border-radius: 3px;" width="36" height="36" alt="apple-touch-icon-180x180-a80b8e11abe2.png" src="cid:ii_18bfb6387c9875c3e51"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</a></div>
</div>
</div>
<div style="display:block">
<div style="display:inline-block" role="link">
<a style="border-radius:10px;font-family:-apple-system,Helvetica,Arial,sans-serif;display:block;width:300px;overflow:hidden;text-decoration:none" rel="nofollow" href="https://training.geonode.geosolutionsgroup.com/master/GN3/docker/index.html" dir="ltr" role="button" width="300" target="_blank">
<table style="table-layout:fixed;border-collapse:collapse;width:300px;background-color:rgb(229,230,233);font-family:-apple-system,Helvetica,Arial,sans-serif" cellpadding="0" cellspacing="0" border="0" width="300">
<tbody>
<tr>
<td>
<table bgcolor="#E5E6E9" cellpadding="0" cellspacing="0" width="300" style="font-family:-apple-system,Helvetica,Arial,sans-serif;table-layout:fixed;background-color:rgb(229,230,233)">
<tbody>
<tr>
<td style="padding:8px 0px">
<div style="max-width:100%;margin:0px 16px;overflow:hidden">
<div style="font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left">
<a rel="nofollow" href="https://training.geonode.geosolutionsgroup.com/master/GN3/docker/index.html" style="text-decoration:none" target="_blank"><font color="#272727" style="color:rgba(0,0,0,0.847)">GeoNode Docker Installation — GeoNode Training</font></a></div>
<div style="font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left">
<a rel="nofollow" href="https://training.geonode.geosolutionsgroup.com/master/GN3/docker/index.html" style="text-decoration:none" target="_blank"><font color="#808080" style="color:rgba(0,0,0,0.498)">geonode.geosolutionsgroup.com</font></a></div>
</div>
</td>
<td style="padding:0px 12px 0px 0px" width="36">
<a rel="nofollow" href="https://training.geonode.geosolutionsgroup.com/master/GN3/docker/index.html" target="_blank"><img style="display: inline-block; width: 36px; height: 36px;" width="36" height="36"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</a></div>
</div>
<div> </div>
<div>My environment is:</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>
<div>Ubuntu 22.04.3 LTS</div>
</div>
<div>
<div>Python 3.10.12</div>
</div>
<div>
<div>pip 22.0.2</div>
</div>
<div>
<div>Docker 24.0.7</div>
</div>
<div>Django 3.2.18</div>
</blockquote>
<div><br>
</div>
<div>The basic steps I performed, which are right from the documentation, are:</div>
<div>
<ol>
<li>Set up Python virtual environment</li><li>Grab the geonode-project code</li><li>Create a new project (which I named geonode_4) using the django-admin startproject command</li><li>Create the .env file using the python create-envfile.py script</li><li>Build and launch the containers with docker compose</li></ol>
</div>
<div><br>
</div>
<div>When everything is up trying to access local host gives a 502 error from the proxy.</div>
<div><br>
</div>
<div>Looking at the logs I see that the Django instance isn’t able to authenticate with the database.  The exact error is:</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>psql: error: connection to server at "db" (172.25.0.7), port 5432 failed: FATAL:  password authentication failed for user "postgres"</div>
</blockquote>
<div> </div>
<div>The database section of the generated .env file is:</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>
<div>POSTGRES_USER=postgres</div>
</div>
<div>
<div>POSTGRES_PASSWORD=imyqqbUhAaKistN</div>
</div>
<div>
<div>GEONODE_DATABASE=geonode_4</div>
</div>
<div>
<div>GEONODE_DATABASE_PASSWORD=IUNooNALdpzTbQA</div>
</div>
<div>
<div>GEONODE_GEODATABASE=geonode_4_data</div>
</div>
<div>
<div>GEONODE_GEODATABASE_PASSWORD=yDpdbmscmgFJRpE</div>
</div>
<div>
<div>GEONODE_DATABASE_SCHEMA=public</div>
</div>
<div>
<div>GEONODE_GEODATABASE_SCHEMA=public</div>
</div>
<div>
<div>DATABASE_HOST=db</div>
</div>
<div>
<div>DATABASE_PORT=5432</div>
</div>
<div>
<div>DATABASE_URL=postgis://geonode_4:IUNooNALdpzTbQA@db:5432/geonode_4</div>
</div>
<div>
<div>GEODATABASE_URL=postgis://geonode_4_data:yDpdbmscmgFJRpE@db:5432/geonode_4_data</div>
</div>
</blockquote>
<br>
<div><br>
</div>
Since I already have a Postgres server with the required databases and credentials, I also tries that.  
<div><br>
</div>
<div>That configuration is:</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>
<div>POSTGRES_USER=postgres</div>
</div>
<div>
<div>POSTGRES_PASSWORD=[secret]</div>
</div>
<div>
<div>GEONODE_DATABASE=geonode</div>
</div>
<div>
<div>GEONODE_DATABASE_PASSWORD=[secret]</div>
</div>
<div>
<div>GEONODE_GEODATABASE=geonode_data</div>
</div>
<div>
<div>GEONODE_GEODATABASE_PASSWORD=[secret]</div>
</div>
<div>
<div>GEONODE_DATABASE_SCHEMA=public</div>
</div>
<div>
<div>GEONODE_GEODATABASE_SCHEMA=public</div>
</div>
<div>
<div>DATABASE_HOST=<a href="http://postgres.511mobility.org" target="_blank">postgres.511mobility.org</a></div>
</div>
<div>
<div>DATABASE_PORT=5432</div>
</div>
<div>
<div>DATABASE_URL=postgis://<a href="http://postgres.511mobility.org:5432/geonode" target="_blank">postgres.511mobility.org:5432/geonode</a></div>
</div>
<div>
<div>GEODATABASE_URL=postgis://<a href="http://postgres.511mobility.org:5432/geonode_data" target="_blank">postgres.511mobility.org:5432/geonode_data</a></div>
</div>
<div><br>
</div>
</blockquote>
With this configuration error I get a trace ending with:
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>
<div>File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 122, in connect</div>
</div>
<div>
<div>django4geonode_4  |     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)</div>
</div>
<div>
<div>django4geonode_4  | django.db.utils.OperationalError: connection to server at "<a href="http://postgres.511mobility.org" target="_blank">postgres.511mobility.org</a>" (172.31.36.200), port 5432 failed: fe_sendauth: no password supplied</div>
</div>
</blockquote>
<div>
<div>
<div><br>
</div>
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.</div>
<div>I hope there is something simple I’m missing.<br>
<div><br>
</div>
<div>Thanks in advance,<br>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div><br>
</div>
</blockquote>
<div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto">
<div dir="auto">
<div style="color:rgb(0,77,128);margin:0px;font-stretch:normal;font-size:11px;line-height:normal">
<span style="font-stretch:normal;font-size:12px;line-height:normal;font-kerning:none"><b>Scott McIntosh</b></span><span style="font-stretch:normal;font-size:12px;line-height:normal;font-kerning:none;color:rgb(0,0,0)"> </span><span style="font-stretch:normal;font-size:12px;line-height:normal;font-kerning:none">| </span><span style="font-kerning:none">Technical
 Director, Engineering & Emerging Technology</span></div>
<div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal">
<span style="font-stretch:normal;font-size:12px;line-height:normal;font-kerning:none"><b>ICF</b> | </span><span style="font-kerning:none"> <a href="http://icf.com" target="_blank"><span style="font-kerning:none;color:rgb(0,0,0)">icf.com</span></a></span><span style="font-stretch:normal;font-size:12px;line-height:normal;font-kerning:none"> | <a href="mailto:scott.mcintosh@icf.com" target="_blank"><span style="font-stretch:normal;font-size:11px;line-height:normal;font-kerning:none;color:rgb(0,0,0)">scott.mcintosh@icf.com</span></a> | </span><span style="font-kerning:none">mobile:
 703.283.3424</span></div>
</div>
</div>
<div dir="auto">
<br>
</div>
</div>
<br>
</div>
<br>
</div>
</div>
</div>
</div>

_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(34,34,34);font-family:Arial;font-size:11pt;white-space:pre-wrap">==</span><br></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap">GeoServer Professional Services from the experts!</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap">Visit </span><a href="http://bit.ly/gs-services-us" target="_blank"><span style="font-size:11pt;font-family:Arial;color:rgb(17,85,204);vertical-align:baseline;white-space:pre-wrap">http://bit.ly/gs-services-us</span></a><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"> for more information.</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap">Dott. Giovanni Allegri</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap">Technical Lead / Project Manager</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap">GeoSolutions Group</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap">phone: +39 0584 962313</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap">cell:      +39 345 2815774</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><span><span style="font-size:11pt;vertical-align:baseline">fax:      +39 0584 1660272</span></span><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><br></span><a href="https://www.geosolutionsgroup.com/" target="_blank"><span style="font-size:11pt;font-family:Arial;color:rgb(17,85,204);vertical-align:baseline;white-space:pre-wrap">https://www.geosolutionsgroup.com/</span></a><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><br></span><a href="http://twitter.com/geosolutions_it" target="_blank"><span style="font-size:11pt;font-family:Arial;color:rgb(17,85,204);vertical-align:baseline;white-space:pre-wrap">http://twitter.com/geosolutions_it</span></a><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap">-------------------------------------------------------</span></p><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">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.</span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">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.</span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap"><br></span></span></div></div>