<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear Paolo Corti,</div><div><br></div><div>Thank you very much for your reply. <br></div><div><br></div><div>Yes I can connect to database:</div><div>psql -h 172.21.14.45 -U geonode -d geonode</div><div>psql (10.6 (Ubuntu 10.6-0ubuntu0.18.04.1), server 9.5.14)<br>Type "help" for help.<br><br>geonode=> \q<br></div><div><br></div><div>Now. I want to skip the remote database connection for GeoNode-Project installed via Docker as I am using the os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.settings") in wsgi.py file. By just using db4my_geonode and os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.settings"), GeoNode-Project@2.8 installation goes fine until the end. Now, here is the issue: if I make local_settings.py available in my_geonode/my_geonode/ and set wsgi.py as os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.local_settings"), I get the forever response:</div><div></div><div><h1>502 Bad Gateway</h1><div>I appreciated your time</div><div><br></div><div>Julierme<br></div></div><div><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Nov 21, 2018 at 2:20 PM Paolo Corti <<a href="mailto:pcorti@gmail.com">pcorti@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
first thing to test: can you connect from the server with psql to the database?<br>
best<br>
Paolo<br>
On Wed, Nov 21, 2018 at 11:16 AM Julierme Pinheiro<br>
<<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank">juliermeopensourcedeveloper@gmail.com</a>> wrote:<br>
><br>
> ...and yes, in the case of using os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.local_settings"), I have local_settings.py in my /my_geonode/my_geonode/ path.<br>
><br>
> Thank you for your time in advance.<br>
><br>
> Julierme<br>
><br>
> On Wed, Nov 21, 2018 at 1:55 PM Julierme Pinheiro <<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank">juliermeopensourcedeveloper@gmail.com</a>> wrote:<br>
>><br>
>> Hi all,<br>
>><br>
>> Regarding the previous e-mail, I made a test here. Following the guide to install GeoNode-Project@2.8, everything works fine if I set the settings in my_geonode/wsgi.py as os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.settings"). However, if I change to <local_settings> in my_geonode/wsgi.py to os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.local_settings"), I have the issues showed in the previous e-mail. Is there anything else that I must pay attention or may be missing configuration?<br>
>><br>
>> Any help on that would be appreciated.<br>
>><br>
>> Kind regards<br>
>><br>
>> Julierme<br>
>><br>
>> On Tue, Nov 20, 2018 at 1:18 PM Julierme Pinheiro <<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank">juliermeopensourcedeveloper@gmail.com</a>> wrote:<br>
>>><br>
>>> Hi GeoNode users,<br>
>>><br>
>>> I have Geonode-Project installed via Docker in Centos7 Vm and all works fine after following the guide in here.<br>
>>><br>
>>> Now, I am trying to repeat the task installing GeoNode-Project in a server in our network, and I am facing the issue bellow. It seems database connection issue:<br>
>>><br>
>>> celery4my_geonode | django.db.utils.OperationalError: could not connect to server: Connection refused<br>
>>> celery4my_geonode | Is the server running on host "localhost" (127.0.0.1) and accepting<br>
>>> celery4my_geonode | TCP/IP connections on port 5432?<br>
>>> celery4my_geonode | could not connect to server: Cannot assign requested address<br>
>>> celery4my_geonode | Is the server running on host "localhost" (::1) and accepting<br>
>>> celery4my_geonode | TCP/IP connections on port 5432?<br>
>>><br>
>>> I tried setting postgres/postgis database from a different server (host = 172.21.14.45) as shown bellow, but the problem remains<br>
>>><br>
>>> DATABASES = {<br>
>>> 'default': {<br>
>>> 'ENGINE': 'django.db.backends.postgresql_psycopg2',<br>
>>> 'NAME': 'geonode',<br>
>>> 'USER': 'geonode',<br>
>>> 'PASSWORD': 'geonode',<br>
>>> 'HOST': 'localhost', --> 172.21.14.45<br>
>>> 'PORT': '5432',<br>
>>> 'CONN_TOUT': 900,<br>
>>> },<br>
>>> # vector datastore for uploads<br>
>>> 'datastore': {<br>
>>> 'ENGINE': 'django.contrib.gis.db.backends.postgis',<br>
>>> # 'ENGINE': '', # Empty ENGINE name disables<br>
>>> 'NAME': 'geonode_data',<br>
>>> 'USER': 'geonode',<br>
>>> 'PASSWORD': 'geonode',<br>
>>> 'HOST': 'localhost', --> 172.21.14.45<br>
>>> 'PORT': '5432',<br>
>>> 'CONN_TOUT': 900,<br>
>>> }<br>
>>> }<br>
>>> Geoserver is running smoothly, but Django and Celery are up, giving always a response of<br>
>>><br>
>>> 502 Bad Gateway<br>
>>><br>
>>> ________________________________<br>
>>> nginx/1.15.0<br>
>>><br>
>>> Any comment on that will be very appreciated.<br>
>>><br>
>>> Thank you very much for your time in advance.<br>
>>><br>
>>> Julierme<br>
><br>
> _______________________________________________<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>
<br>
<br>
<br>
-- <br>
Paolo Corti<br>
Geospatial software developer<br>
web: <a href="http://www.paolocorti.net" rel="noreferrer" target="_blank">http://www.paolocorti.net</a><br>
twitter: @capooti<br>
skype: capooti<br>
</blockquote></div>