<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear Toni,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I know the migration is not a walk in the park.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I had two alternatives: start a migration process or insert layer by layer in the new instance (it means 120 layers, 25 maps 4 users).</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I don't know what is the quickest. If you say that migration will keep me more time than the insert I proceed with the insert one by one.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
For now I thought it was better the migration.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regarding Multisites in the past I chose this option because I thought it was the best solution to manage different project that each one needs a different frontpage and provide specific layers and maps.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
What do you could recommend me instead of multi-sites?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
For sure I would have started the configuration of the multi-site after once everything on a single instance would work.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regarding the command 'migrate' I run the command you suggest me, it finished without errors in the command line, but I don't know how and if the table in the db have been affected. Could you give me an example of a possible difference between the 2.4 and the
2.10 schema, so I can check it out?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Eventually I didn't understand what you mean with </div>
<div style=""><font color="#000000" face="Calibri, Helvetica, sans-serif"><span style="font-size: 12pt;">"</span></font>
<div style="color: rgb(50, 49, 48); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; font-size: 12pt; margin: 0px; background-color: rgb(255, 255, 255);">
Further yes, a wrong settings file could lead to a wrong database usage.</div>
<div style="color: rgb(50, 49, 48); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; font-size: 12pt; margin: 0px; background-color: rgb(255, 255, 255);">
(Just rename the old and you will see ;) "</div>
<div style="color: rgb(50, 49, 48); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; font-size: 12pt; margin: 0px; background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="margin: 0px;"><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Actually I copied local_settings.py.geoserver.sample into the same folder with the name local_settings.py and I tried to modify there
ALLOWED_HOSTS without result (I pout it on settings.py to have geonode running without error) and db properties.</span></div>
<div style="margin: 0px;"><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">What I see is that in the old instance I had even local_settins.pyc while in the new it doesn't exist. In the old version local_settings.py
is owned by eugenio:root while in the new by eugenio:eugenio. Moroover in the old local_settings.pyc is owned by eugenio:www-data.</span></div>
<div style="margin: 0px;"><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Could the problem be related to the grants on these files?</span></div>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Eugenio</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Da:</b> Toni Schönbuchner <toni.schoenbuchner@csgis.de><br>
<b>Inviato:</b> sabato 21 marzo 2020 14:30<br>
<b>A:</b> Eugenio Trumpy <frippe12573@hotmail.com><br>
<b>Cc:</b> geonode-users <geonode-users@lists.osgeo.org><br>
<b>Oggetto:</b> Re: migration suggestions</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Dear Eugenio,
<div class=""><br class="">
</div>
<div class="">first of all, please be prepared that a migration is not a walk in the park.</div>
<div class="">You might need some background knowledge about the db scheme and how </div>
<div class="">is everything is wired together. Further I think the whole multisites idea is not</div>
<div class="">maintained since long time and hence I would suggest that you first try to port your</div>
<div class="">data to a single site 2.10.3 instance. </div>
<div class=""><br class="">
</div>
<div class="">You're saying them amount of tables changed after running migrate? That</div>
<div class="">is a good sign. The most interesting here is if the manage command threw errors?</div>
<div class=""><br class="">
</div>
<div class="">Further yes, a wrong settings file could lead to a wrong database usage.</div>
<div class="">(Just rename the old and you will see ;) </div>
<div class=""><br class="">
</div>
<div class="">In case of geonode_project you can try to set local_settings here.</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://github.com/GeoNode/geonode-project/blob/2.10.3/project_name/wsgi.py#L38" class="">https://github.com/GeoNode/geonode-project/blob/2.10.3/project_name/wsgi.py#L38</a></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best regards</div>
<div class=""><br class="">
</div>
<div class="">Toni</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">Am 21.03.2020 um 14:20 schrieb Eugenio Trumpy <<a href="mailto:frippe12573@hotmail.com" class="">frippe12573@hotmail.com</a>>:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Dear Toni,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
thank you to have answered to mail last email.</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
My situation is the following:</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<ul class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<li class="">I have a geonode 2.4 running on a server 'A' configured to run as multi-site which embeds something like 120 layers, 20 maps and 3 users. <span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">In server 'A' is running ubuntu
14.04, which is obsolete.</span></li><li class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">I have also server 'B' where ubuntu is at the version 18.04.</span></li><li class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">I want to migrate my genode 2.4 running instance as multisites from server 'A' to 'B'.</span></li><li class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">I have asked some weeks ago here in the list what would have been the best solution, consider I'm not a developer and I never used the virtualenv. I installed the 2.4
version for production.</span></li><li class="">For the migration I was following some suggestions from Alessio: </li></ul>
<div class="">
<blockquote class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; margin:0px 0px 0px 40px; border:none; padding:0px">
<ol class="">
<li class="">Setup a new GeoServer 2.15.2 ( <a href="https://build.geo-solutions.it/geonode/geoserver/latest/geoserver-2.15.2.war" target="_top" rel="nofollow" class="" style="font-size:1em; color:rgb(85,26,139)">https://build.geo-solutions.it/geonode/geoserver/latest/geoserver-2.15.2.war</a> ) </li><li class="">Transfer the Data Dir from the old GeoServer to the new one (I strongly suggest to backport **only** the workspace, datasets and styles, not the security subsystem)</li><li class="">Setup the new GeoNode instance</li><li class="">Run the "updatelayers" management command (see <a href="http://docs.geonode.org/en/master/admin/mgmt_commands/index.html#management-command-updatelayers" target="_top" rel="nofollow" class="" style="font-size:1em; color:rgb(85,26,139)">http://docs.geonode.org/en/master/admin/mgmt_commands/index.html#management-command-updatelayers</a> )</li><li class="">Update manually the missing permissions and metadata</li></ol>
</blockquote>
</div>
</div>
<blockquote class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; margin:0px 0px 0px 40px; border:none; padding:0px">
<blockquote class="" style="margin:0px 0px 0px 40px; border:none; padding:0px"></blockquote>
</blockquote>
<ul class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<li class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">I completed step 1 with geoserver 2.16.2 - I installed the data_dir outside geoserver - and it runs fine</span></li><li class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">I completed step 2 and I'm able to see all the layers I had in server 'A'</span></li><li class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">I set up a fresh geonode instance, even thanks to you help. I installed geonode from GIT, so I should have the master version (2.10).</span></li><li class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Within the step 2 I restored in server 'A' the two postgresql db I had inserver 'A'</span></li><li class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Since I remembered some steps of the custom configuration I did for version 2.4 (and I never used NGINX) I configured APACHE2.</span></li><li class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Currently in server 'B' I'm able to see the geonode home page, but I cannot see my layers as well as I cannot enter as administrator.</span></li><li class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">I followed you suggestions and I </span></li><li class=""><span class="" style="font-size:12pt">ALTER TABLE public.layers_layer DROP COLUMN service_id</span></li><li class=""><span class="" style="font-size:12pt">successfully</span></li><li class=""><span class="" style="font-size:12pt">and I gave the command </span></li><li class=""><span class="" style="font-size:12pt">django python manage.py migrate --fake-initial</span></li><li class=""><span class="" style="font-size:12pt">but I'm still not able to enter as administrator</span></li><li class=""><span class="" style="font-size:12pt">I realized even that the db schema apparently didn't change (e.g. I had 75 tables in the old version and I still have 75 tables in the newer version, I don't if the fields are modified instead)</span></li><li class=""><span class="" style="font-size:12pt">to have the version 2.10 running I followed your suggestion to insert my domain in the ALLOWED_HOSTS variable inside local_settings.py. I did it but it didn't work as long as I insert the same in settings.py.
For this reason I'm supposing that local_settings.py is not active in some way and for the same reason it doesn't allow to connect to the db. Am I right? <br class="">
</span></li></ul>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
Once the administrator login will be solved: </div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<ul class="">
<li class="">I should configure this new running geonode instance for multisites - Could I restore in someway the look & feels I had in the old instance?</li><li class="">check the authorization between geonode and geoserver<br class="">
</li></ul>
<div class="">I hope this can help you to have a clearer vision of 'whats going on'...</div>
</div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
</div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
Best regards,</div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
</div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
Eugenio</div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div id="x_appendonsend" class=""></div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="">
</div>
<hr tabindex="-1" class="" style="display:inline-block; width:770.265625px">
<div id="x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">Da:</b><span class="x_Apple-converted-space"> </span>Toni Schönbuchner <<a href="mailto:toni.schoenbuchner@csgis.de" class="">toni.schoenbuchner@csgis.de</a>><br class="">
<b class="">Inviato:</b><span class="x_Apple-converted-space"> </span>sabato 21 marzo 2020 13:45<br class="">
<b class="">A:</b><span class="x_Apple-converted-space"> </span>Eugenio Trumpy <<a href="mailto:frippe12573@hotmail.com" class="">frippe12573@hotmail.com</a>><br class="">
<b class="">Cc:</b><span class="x_Apple-converted-space"> </span>geonode-users <<a href="mailto:geonode-users@lists.osgeo.org" class="">geonode-users@lists.osgeo.org</a>><br class="">
<b class="">Oggetto:</b><span class="x_Apple-converted-space"> </span>Re: migration suggestions</font>
<div class=""> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Hi Eugenio,
<div class=""><br class="">
</div>
<div class="">I would need to have a look what is going on. But yes local_settings should override settings.</div>
<div class="">The correct command for migrations is python manage.py migrate ... (instead of syncdb)</div>
<div class=""><br class="">
</div>
<div class="">best regards</div>
<div class=""><br class="">
</div>
<div class="">toni<br class="">
<div class=""><br class="">
<blockquote type="cite" class="" style="margin-top:0px; margin-bottom:0px">
<div class="">Am 20.03.2020 um 19:58 schrieb Eugenio Trumpy <<a href="mailto:frippe12573@hotmail.com" class="">frippe12573@hotmail.com</a>>:</div>
<br class="x_x_Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Dear Toni,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
I followed your hints.</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
I put the domain in the ALLOWED_HOSTS and now I visualise the home page.</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Just a question, I had to put the domain the settings.py file because it didn't work in local_setting.py, why? Don't local_setting override setting.py?</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Then I modify local_setting.py to set credential to access geonode db.</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Then I alter the table you suggested and I run python manage.py --syncdb but the number of tables didn't change, is that correct?</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
The geonode home page is visualised but I'm not able to enter with the old administrator credential.</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
I presume there is no connection with the db. Should I use again setting.py instead of local_setting.py?</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Thanks in advance,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Eugenio</div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div id="x_x_appendonsend" class=""></div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="">
</div>
<hr tabindex="-1" class="" style="display:inline-block; width:770.265625px">
<div id="x_x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">Da:</b><span class="x_x_Apple-converted-space"> </span>Toni Schönbuchner <<a href="mailto:toni.schoenbuchner@csgis.de" class="">toni.schoenbuchner@csgis.de</a>><br class="">
<b class="">Inviato:</b><span class="x_x_Apple-converted-space"> </span>giovedì 19 marzo 2020 20:37<br class="">
<b class="">A:</b><span class="x_x_Apple-converted-space"> </span>Eugenio Trumpy <<a href="mailto:frippe12573@hotmail.com" class="">frippe12573@hotmail.com</a>><br class="">
<b class="">Cc:</b><span class="x_x_Apple-converted-space"> </span>geonode-users <<a href="mailto:geonode-users@lists.osgeo.org" class="">geonode-users@lists.osgeo.org</a>><br class="">
<b class="">Oggetto:</b><span class="x_x_Apple-converted-space"> </span>Re: migration suggestions</font>
<div class=""> </div>
</div>
<div class="x_x_BodyFragment"><font size="2" class=""><span class="" style="font-size:11pt">
<div class="x_x_PlainText">Dear Eugenio,<br class="">
<br class="">
<br class="">
> • I set the wgsi module in apache2. The geonode is served now with the 'allowed_hosts' error. I think the issue could be related to the settings. In the 2.4 version I remember I set SITE_URL, should I set something similar even in this version?<br class="">
<br class="">
Allowed hosts is a security mechanism by Django to define Domains that serve your instance.<br class="">
<a href="https://docs.djangoproject.com/en/3.0/ref/settings/#allowed-hosts" class="">https://docs.djangoproject.com/en/3.0/ref/settings/#allowed-hosts</a><br class="">
<br class="">
To overcome an 504 error you can add something like<br class="">
<br class="">
ALLOWED_HOSTS = ['localhost' '127.0.0.1' 'your<span class="x_Apple-converted-space"> </span><a href="http://domain.com/" class="">domain.com</a>']<br class="">
<br class="">
to your settings.py or local_settings.p However, we all more and more avoid touching the settings file and try to configure everything<br class="">
with environment variables. So with a manual setup you can try to add it to your uwsgi config:<br class="">
<a href="https://docs.geonode.org/en/master/install/core/index.html#serving-geonode-geoserver-via-nginx" class="">https://docs.geonode.org/en/master/install/core/index.html#serving-geonode-geoserver-via-nginx</a><br class="">
<br class="">
> • I created a geonode postgresql empty db, while I restored the backup from that I was using in 2.4 version. How I should populate with the new data-schema the geonode metadata db? I remember there was the command python manage.py --syncdb, does still
exist? I tried but I got error.<br class="">
<br class="">
I'm unsure If I correctly understand. But the rough flow looks like:<br class="">
<br class="">
• Export your geonode 2.4 Database<br class="">
• Import it to a fresh Database<br class="">
• Be sure to correctly set permissions for your User<br class="">
• Change your settings.py for using the new database and in case the correct user<br class="">
• Fix some inconsistency within your new database. Run f.e. with pgadmin or by psql from console<br class="">
• ALTER TABLE public.layers_layer DROP COLUMN service_id<br class="">
• Run the migrations, this should update your database scheme from 2.4 to 2.10<br class="">
• DJANGO_SETTINGS_MODULE=YOURGEONODE.local_settings django python manage.py migrate --fake-initial<br class="">
<br class="">
You will need to change those commands to fit your setup further run into errors here and<br class="">
there but hopefully this steps help you to find out of the forest.<br class="">
<br class="">
Cheers,<br class="">
<br class="">
Toni<br class="">
<br class="">
<br class="">
-----------------------------------------------<br class="">
CSGIS<br class="">
<br class="">
-----------------------------------------------<br class="">
Spinnereistraße 7<br class="">
Halle 18 04179 Leipzig<br class="">
-----------------------------------------------<br class="">
Web <span class="x_x_Apple-converted-space"> </span><a href="https://csgis.de/" class="">https://csgis.de</a><br class="">
-----------------------------------------------<br class="">
<br class="">
Hinweis gemäß § 33 BDSG<br class="">
Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den<span class="x_x_Apple-converted-space"> </span><br class="">
Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich<span class="x_x_Apple-converted-space"> </span><br class="">
erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht<span class="x_x_Apple-converted-space"> </span><br class="">
von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung,<span class="x_x_Apple-converted-space"> </span><br class="">
Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.</div>
</span></font></div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>