<div dir="ltr"><div>Dear Toni,</div><div><br></div><div>I have good news. The issues are over!!!! :-)</div><div><br></div><div>I went home thinking about what you said: "I would strongly recommend that you remove the development environment machine to<div>avoid further confusion". Before dumping GeoNode Development (GD), I changed geonode.conf in one way that GeoNode Production (GP) will get blind to GD. <br></div><div><br></div><div>I, then, realized that the same issue was happening while working only with GP. And I started tweaking through the settings.py and the local_settings.py and I solved the issues in two steps:</div><div><br></div><div>Step 1) in my case, SITEURL must be declared in my settings.py <br></div><div><br></div><div>Note: 1.1 I was declaring it in local_settings.py only (Not enough)<br></div><div> 1.2 If I change my_geonode/wsgi.py to point to local_settings.py instead of settings.py, Apache2 won't start.</div><div><br></div><div>Step2) I did just the same. Instead of declaring the code bellow in local_settings.py, I did in the settings.py</div><div><br></div><div><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px">REGISTRATION_OPEN = True<br></blockquote><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px">EMAIL_ENABLE = True</blockquote><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px">if EMAIL_ENABLE:<br> EMAIL_BACKEND = 'django.core.mail.backends.<wbr>smtp.EmailBackend'<br> EMAIL_HOST = '<a href="http://smtp.sipam.gov.br" target="_blank">smtp.sipam.gov.br</a>'<br> EMAIL_PORT = 587<br> EMAIL_HOST_USER ='uap.ccg.geonode'<br> EMAIL_HOST_PASSWORD = 'passwd'<br> EMAIL_USE_TLS = True<br> DEFAULT_FROM_EMAIL = '<a href="mailto:uap.ccg.geonode@sipam.gov.br" target="_blank">uap.ccg.geonode@sipam.gov.br</a>‘</blockquote><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px">THEME_ACCOUNT_CONTACT_EMAIL = DEFAULT_FROM_EMAIL </blockquote><br></div><div><div>Note: 2.1 I was declaring it in local_settings.py only (Not enough)<br></div><div> 2.2 If I change my_geonode/wsgi.py to point to local_settings.py instead of settings.py, Apache2 won't start.</div><br></div>That was it. Thumbnails are working like a charm and I am sending e-mails.</div><div><br></div><div>Thank you very much for your time and help.</div><div><br></div><div>I appreciated it.</div><div><br></div><div>Kind regards,</div><div><br></div><div>Julierme<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 11, 2018 at 7:25 AM, Toni Schönbuchner <span dir="ltr"><<a href="mailto:toni.schoenbuchner@csgis.de" target="_blank">toni.schoenbuchner@csgis.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Dear Julierme,<div><br></div><div>thanks for providing me your VM. I´ve examined it more closely</div><div>and will set geonode-users as CC.</div><div><br></div><div></div><blockquote type="cite"><div><span style="color:rgb(38,38,38);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I am facing a problem with thumbnails url related to port 8000. As you can see through the /home/geonode/my_geonode/my_<wbr>geonode/local_settings.py, the </span></div></blockquote><div><br></div><div>It seems like you caused a bit confusion with your mix of dev and production setups.</div><div><br></div><div>DEVELOPMENT – This is what I did:</div><div><br></div><div>$ sudo service tomcat8 stop</div><div>$ sudo service postgresql stop</div><div>$ sudo service apache2 stop</div><div><br></div><div>This was needed as I´ve recognized that tomcat8 ist already running on port 8080!</div><div>– but we´d like to use jetty in dev mode</div><div><br></div><div># Activate the virtualenv</div><div>$ source /home/geo/Envs/my_geonode/bin/<wbr>activate</div><div><br></div><div># change to the project root and run paver tasks</div><div>$ cd /home/my_geonode/my_geonode </div><div>$ paver setup && paver sync && paver start</div><div><br></div><div>The dev server started and I could upload a demo shape file with working thumbnail</div><div>as proven by this snapshot :<a href="https://www.dropbox.com/s/bedw4oxgf2j67ck/dev.png?dl=0" target="_blank">https://www.dropbox.com/s/<wbr>bedw4oxgf2j67ck/dev.png?dl=0</a></div><div><br></div><div>PRODUCTION:</div><div><br></div><div># Stop dev server, deactivate dev-virtualenv, activate prod-virtualenv, change to production dir</div><div>$ paver stop</div><div>$ deactivate</div><div>$ source /home/geo/Envs/geonode/bin/<wbr>activate</div><div>$ cd /home/geonode/my_geonode</div><div><br></div><div>NOW! have a look at my_geonode/wsgi.py it´s pointing to settings.py but we want to use local_settings which </div><div>then includes settings.py. Within the file change DJANGO_SETTINGS_MODULE to my_geonode.local_settings </div><div>save and close</div><div><br></div><div><div># remove unneeded vhost, start production server, sync database</div><div>$ sudo a2dissite 000-default.conf</div><div>$ sudo service tomcat8 start</div><div>$ sudo service postgresql start</div><div>$ sudo service apache2 start</div><div># wait a bit – tomcat needs some time to start deploy and geoserver</div><div>$ paver sync</div></div><div><br></div><div>After that we can see that a test upload works with thumbnail in „production“ </div><div>geoserver is running and used for the layer upload:</div><div><br></div><div><a href="https://www.dropbox.com/s/v254zzg8jpq5fxg/prod.png?dl=0" target="_blank">https://www.dropbox.com/s/<wbr>v254zzg8jpq5fxg/prod.png?dl=0</a></div><div><a href="https://www.dropbox.com/s/y0sfmke8naia9pv/prod2.png?dl=0" target="_blank">https://www.dropbox.com/s/<wbr>y0sfmke8naia9pv/prod2.png?dl=0</a></div><div><a href="https://www.dropbox.com/s/1io3z7xeokun5xy/geoserver.png?dl=0" target="_blank">https://www.dropbox.com/s/<wbr>1io3z7xeokun5xy/geoserver.png?<wbr>dl=0</a></div><div><br></div><div>Note: When uploading the layer the target dir for uploaded files was pointing to your dev environment </div><div>I couldn´t figured out why but just allowed the user to write to the dir I leave this problem for you</div><div>;) </div><div><br></div><div>EMAIL:</div><div><br></div><div><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px">I am sorry to insist on this topic, I wonder if another GeoNode@2.8.0<br>user has faced the same problem while configuring users email account. I am<br>using GeoNode Production (/home/geonode/...) and GeoNode DevMode</blockquote><br></div><div>I´ve tested your postfix with telnet. Looks all good. I would ask you to try the following.</div><div>In production environment edit your E-mail settings in local_settings.py like</div><div><br></div><div><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px">REGISTRATION_OPEN = True<br></blockquote><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px">EMAIL_ENABLE = True</blockquote><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px">if EMAIL_ENABLE:<br> EMAIL_BACKEND = 'django.core.mail.backends.<wbr>smtp.EmailBackend'<br> EMAIL_HOST = '<a href="http://smtp.sipam.gov.br" target="_blank">smtp.sipam.gov.br</a>'<br> EMAIL_PORT = 587<br> EMAIL_HOST_USER ='uap.ccg.geonode' </blockquote><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px"> EMAIL_HOST_PASSWORD = 'passwd'<br> EMAIL_USE_TLS = True<br> DEFAULT_FROM_EMAIL = '<a href="mailto:uap.ccg.geonode@sipam.gov.br" target="_blank">uap.ccg.geonode@sipam.gov.br</a>‘</blockquote><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px"><br></blockquote><blockquote type="cite" style="font-family:Menlo-Regular;font-size:11px">THEME_ACCOUNT_CONTACT_EMAIL = DEFAULT_FROM_EMAIL </blockquote><br></div><div>Please double check that you provide correct credentials. </div><div>Then It should work that you send a testmail by use of django shell:</div><div><a href="https://docs.djangoproject.com/en/2.0/topics/email/#quick-example" target="_blank">https://docs.djangoproject.<wbr>com/en/2.0/topics/email/#<wbr>quick-example</a></div><div><br></div><div>Further if no mails arrive at all visit your mail server admin and make sure the listening</div><div>server accepts your sending (spam settings).</div><div><br></div><div>So far, sorry for the lengthy email.</div><div><br></div><div>All the best to Brasilia,</div><div><br></div><div>Toni</div><div><br></div><div><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div><div style="word-wrap:break-word"><div><div>------------------------------<wbr>-----------------</div><div>CSGIS</div><div><br></div><div>------------------------------<wbr>-----------------</div><div><div><a href="https://maps.google.com/?q=Kolonnadenstra%C3%9Fe+1+04109+Leipzig&entry=gmail&source=g">Kolonnadenstraße 1</a></div><div><a href="https://maps.google.com/?q=Kolonnadenstra%C3%9Fe+1+04109+Leipzig&entry=gmail&source=g">04109 Leipzig</a></div></div><div>------------------------------<wbr>-----------------</div><div>Mobil<span style="white-space:pre-wrap"> </span>+49/ (0) 176 6680 3198</div><div>Tel <span style="white-space:pre-wrap"> </span>+49/ (0) 341 24 04 738</div><div>Fax <span style="white-space:pre-wrap"> </span>+49/ (0) 341 24 04 73</div><div>Web<span style="white-space:pre-wrap"> </span><a href="http://csgis.de" target="_blank">http://csgis.de</a></div><div>------------------------------<wbr>-----------------</div><div><br></div><div>Hinweis gemäß § 33 BDSG</div><div>Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den </div><div>Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich </div><div>erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht </div><div>von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung, </div><div>Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.</div></div></div></div></div></div></div></div>
</div>
<div><br></div></div></div></blockquote></div><br></div>