<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hey Julierme,<div class=""><br class=""></div><div class="">first of all the same to you. All the best for 2019.</div><div class=""><br class=""></div><div class="">Docker sets some env vars where I do not have a complete</div><div class="">overview. Other might guide you better here.</div><div class=""><br class=""></div><div class="">But look at settings.py:</div><div class=""><a href="https://github.com/GeoNode/geonode-project/blob/master/project_name/settings.py#L27" class="">https://github.com/GeoNode/geonode-project/blob/master/project_name/settings.py#L27</a></div><div class="">it includes local_settings ...</div><div class=""><br class=""></div><div class="">So, what happens if you leave wsgi.py untouched (pointing to settings.py), rename</div><div class="">local_settings.py.sample to local_settings.py (already happend) and make your changes</div><div class="">there (local_settings). F.e. setup your smtp account or base layers etc.</div><div class=""><br class=""></div><div class="">Does this help?</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Toni</div><div class=""><br class=""></div><div class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="">-----------------------------------------------</div><div class="">CSGIS</div><div class=""><br class=""></div><div class="">-----------------------------------------------</div><div class=""><div class="" style="orphans: 2; widows: 2;">Kolonnadenstraße 1</div><div class="" style="orphans: 2; widows: 2;">04109 Leipzig</div></div><div class="">-----------------------------------------------</div><div class="">Mobil<span class="Apple-tab-span" style="white-space: pre;"> </span>+49/ (0) 176 6680 3198</div><div class="">Tel <span class="Apple-tab-span" style="white-space: pre;"> </span>+49/ (0) 341 24 04 738</div><div class="">Fax <span class="Apple-tab-span" style="white-space: pre;"> </span>+49/ (0) 341 24 04 73</div><div class="">Web<span class="Apple-tab-span" style="white-space: pre;"> </span><a href="http://csgis.de" class="">http://csgis.de</a></div><div class="">-----------------------------------------------</div><div class=""><br class=""></div><div class="">Hinweis gemäß § 33 BDSG</div><div class="">Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den </div><div class="">Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich </div><div class="">erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht </div><div class="">von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung, </div><div class="">Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.</div></div></div></div></div></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">Am 10.01.2019 um 13:33 schrieb Julierme Pinheiro <<a href="mailto:juliermeopensourcedeveloper@gmail.com" class="">juliermeopensourcedeveloper@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Hi Toni,</div><div class="">Thank you very much for your reply.</div><div class="">Find bellow the site working with wsgi.py configured to settings</div><div class=""></div><div class=""><a href="http://192.241.135.159/" class="">http://192.241.135.159/</a><br class=""></div><div class=""><br class=""></div><div class="">Now, going back to the issue related to wsgi.py configured to local_settings:<br class=""></div><div class=""><br class=""></div><div class="">Yes, checking the logs, I found out that there is an issue with SITEURL. Please see bellow:<br class=""></div><div class=""><br class=""></div><div class="">celery4my_geonode | SITEURL = os.getenv('SITEURL', "<a href="http://%s:%s/" class="">http://%s:%s/</a>" % (SITE_HOST_NAME, SITE_HOST_PORT))<br class="">celery4my_geonode | NameError: name 'SITE_HOST_NAME' is not defined<br class=""><br class="">django4my_geonode | SITEURL = os.getenv('SITEURL', "<a href="http://%s:%s/" class="">http://%s:%s/</a>" % (SITE_HOST_NAME, SITE_HOST_PORT))<br class="">django4my_geonode | NameError: name 'SITE_HOST_NAME' is not defined</div><div class=""><br class=""></div><div class="">SITE_HOST_NAME is defined after SITEURL. <b class="">I changed from</b>:</div><div class=""><br class=""></div><div class="">SITEURL = os.getenv('SITEURL', "<a href="http://%s:%s/" class="">http://%s:%s/</a>" % (SITE_HOST_NAME, SITE_HOST_PORT))<br class=""><br class=""># we need hostname for deployed<br class="">_surl = urlparse(SITEURL)<br class="">HOSTNAME = _surl.hostname<br class=""><br class=""># per-deployment settings should go here<br class="">SITE_HOST_NAME = os.getenv('SITE_HOST_NAME', HOSTNAME)<br class="">SITE_HOST_PORT = os.getenv('SITE_HOST_PORT', "80")<br class=""></div><div class=""><br class=""></div><div class=""><b class="">To: </b><br class=""></div><div class=""><br class=""></div><div class="">#SITEURL = os.getenv('SITEURL', "<a href="http://%s:%s/" class="">http://%s:%s/</a>" % (SITE_HOST_NAME, SITE_HOST_PORT))<br class=""><br class=""># we need hostname for deployed<br class="">#_surl = urlparse(SITEURL)<br class="">#HOSTNAME = _surl.hostname<br class=""><br class=""># per-deployment settings should go here<br class="">SITE_HOST_NAME = os.getenv('SITE_HOST_NAME', "172.21.5.187")<br class="">SITE_HOST_PORT = os.getenv('SITE_HOST_PORT', "80")<br class=""><br class="">SITEURL = os.getenv('SITEURL', "<a href="http://%s:%s/" class="">http://%s:%s/</a>" % (SITE_HOST_NAME, SITE_HOST_PORT))<br class=""><br class=""># we need hostname for deployed<br class="">_surl = urlparse(SITEURL)<br class="">HOSTNAME = _surl.hostname<br class=""></div><div class=""><br class=""></div><div class="">But the django4my_geonode and celery4my_geonode container error remains the same:<br class=""></div><div class=""><br class=""></div><div class="">celery4my_geonode | SITEURL = os.getenv('SITEURL', "<a href="http://%s:%s/" class="">http://%s:%s/</a>" % (SITE_HOST_NAME, SITE_HOST_PORT))<br class="">celery4my_geonode | NameError: name 'SITE_HOST_NAME' is not defined<br class=""><br class="">django4my_geonode | SITEURL = os.getenv('SITEURL', "<a href="http://%s:%s/" class="">http://%s:%s/</a>" % (SITE_HOST_NAME, SITE_HOST_PORT))<br class="">django4my_geonode | NameError: name 'SITE_HOST_NAME' is not defined</div><div class=""><br class=""></div><div class="">I appreciated your time and by the way, Happy 2019 for you all. I wish you all health and success in all life projects.<br class=""></div><div class=""><br class=""></div><div class="">Kind regards<br class=""></div><div class=""><br class=""></div><div class="">Julierme<br class=""></div><div class=""><br class=""></div></div></div></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Jan 9, 2019 at 6:18 PM Toni Schönbuchner <<a href="mailto:toni.schoenbuchner@csgis.de" class="">toni.schoenbuchner@csgis.de</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey Julierme,<br class="">
<br class="">
have you checked the output of logs?<br class="">
<br class="">
$ docker-compose logs -f<br class="">
or<br class="">
$ docker-compose logs -f django<br class="">
or<br class="">
$ docker-compose logs -f celery<br class="">
<br class="">
Cheers,<br class="">
<br class="">
Toni<br class="">
<br class="">
> ----------------------------------------------------------------------<br class="">
> <br class="">
> Message: 1<br class="">
> Date: Wed, 9 Jan 2019 11:27:59 -0200<br class="">
> From: Julierme Pinheiro <<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank" class="">juliermeopensourcedeveloper@gmail.com</a>><br class="">
> To: geonode-users <<a href="mailto:geonode-users@lists.osgeo.org" target="_blank" class="">geonode-users@lists.osgeo.org</a>><br class="">
> Subject: [GeoNode-users] GeoNode-Project local_settings<br class="">
> Message-ID:<br class="">
> <CAKTKyJJ_6KV9d=<a href="mailto:zikW9SAj6bybDCD%2Bp8-XT7OuDZL7QxGxVVzw@mail.gmail.com" target="_blank" class="">zikW9SAj6bybDCD+p8-XT7OuDZL7QxGxVVzw@mail.gmail.com</a>><br class="">
> Content-Type: text/plain; charset="utf-8"<br class="">
> <br class="">
> Dear all,<br class="">
> <br class="">
> I am running an Ubuntu 18.04 LTS VM. I am trying to install<br class="">
> GeoNode-Project@2.8 via Docker following the instructions in here.<br class="">
> <<a href="https://github.com/GeoNode/geonode-project/tree/2.8" rel="noreferrer" target="_blank" class="">https://github.com/GeoNode/geonode-project/tree/2.8</a>><br class="">
> By changing wsgi.py to local_settings, celery4my_geonode and<br class="">
> django4my_geonode won't start and I am always getting the *502 Bad Gateway*<br class="">
> response in the browser.<br class="">
> <br class="">
> Has anyone faced the same issue and could guide me on how to solve it?<br class="">
> <br class="">
> Thank you for your time in advance<br class="">
> <br class="">
> Regards<br class="">
<br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>