<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">---------- Forwarded message ---------<br>From: <b class="gmail_sendername" dir="auto">Julierme Pinheiro</b> <span dir="ltr"><<a href="mailto:juliermeopensourcedeveloper@gmail.com">juliermeopensourcedeveloper@gmail.com</a>></span><br>Date: Tue, Sep 4, 2018 at 11:01 AM<br>Subject: GeoNode@2.8.0 Ubuntu Installation Final Settings<br>To: Toni Schönbuchner <<a href="mailto:toni.schoenbuchner@csgis.de">toni.schoenbuchner@csgis.de</a>><br></div><br><br><div dir="ltr"><div dir="ltr"><div>Dear all,</div><div><br></div><div> I have spent some weeks trying to figure out an issue related to GeoNode configuration. I almost through the whole installation  of GeoNode following the guide available in [1]. However, after tweaking through settings.py and local_settings.py, I could not get it solved, and I wonder if someone has faced something similar and could give me a hint. Here we go:<br></div><div><br></div><div>1 - Issues regarding GeoNode@2.8.0 in a Ubuntu@16.04LTS VM</div><div><br></div><div>1.1 - Blank/pink Tiles<br></div><div><br></div><div>If I keep the settings.py config bellow, I can upload data to GeoNode site. But I will get blank tiles for the layers. And the reason I get them it is because the tiles make reference to localhost.<br></div><div><br></div><div>GEOSERVER_LOCATION = os.getenv(<br>    'GEOSERVER_LOCATION', '{}/geoserver/'.format(SITEURL)<br>#    'GEOSERVER_LOCATION', '<a href="http://172.21.14.45/geoserver/" target="_blank">http://172.21.14.45/geoserver/</a>'<br>)<br><br>GEOSERVER_PUBLIC_LOCATION = os.getenv(<br>    'GEOSERVER_PUBLIC_LOCATION', '{}/geoserver/'.format(SITEURL)<br>#    'GEOSERVER_PUBLIC_LOCATION', '<a href="http://172.21.14.45/geoserver/" target="_blank">http://172.21.14.45/geoserver/</a>'<br>)<br><br>OGC_SERVER_DEFAULT_USER = os.getenv(<br>    'GEOSERVER_ADMIN_USER', 'admin'<br>)<br><br>OGC_SERVER_DEFAULT_PASSWORD = os.getenv(<br>    'GEOSERVER_ADMIN_PASSWORD', 'geoserver'<br>)<br><br>## OGC (WMS/WFS/WCS) Server Settings<br>OGC_SERVER = {<br>    'default': {<br>        'BACKEND': 'geonode.geoserver',<br>        'LOCATION': GEOSERVER_LOCATION,<br>        'LOGIN_ENDPOINT': 'j_spring_oauth2_geonode_login',<br>        'LOGOUT_ENDPOINT': 'j_spring_oauth2_geonode_logout',<br>        'PUBLIC_LOCATION': GEOSERVER_PUBLIC_LOCATION,<br>        'USER': OGC_SERVER_DEFAULT_USER,<br>        'PASSWORD': OGC_SERVER_DEFAULT_PASSWORD,<br>        'MAPFISH_PRINT_ENABLED': True,<br>        'PRINT_NG_ENABLED': True,<br>        'GEONODE_SECURITY_ENABLED': True,<br>        'GEOFENCE_SECURITY_ENABLED': True,<br>        'GEOGIG_ENABLED': False,<br>        'WMST_ENABLED': False,<br>        'BACKEND_WRITE_ENABLED': True,<br>        'WPS_ENABLED': False,<br>        'LOG_FILE': '%s/geoserver/data/logs/geoserver.log' % os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)),<br>        # Set to dictionary identifier of database containing spatial data in<br>        # DATABASES dictionary to enable<br>        'DATASTORE': 'datastore',<br>        'PG_GEOGIG': False,<br>        'TIMEOUT': 30  # number of seconds to allow for HTTP requests<br>    }<br>}<br></div><div><br></div><div>If I make a copy of this config above to local_settings.py, the blank/pink tiles are gone and everything works, except, I won't be able to upload any data again. And the reason the blank/pink tiles are gone is because GeoNode retrieves the SITEURL: <a href="http://172.21.14.45" target="_blank">http://172.21.14.45</a>. But there is an issue here keeping GeoServer Location, GeoServer Public Location and OGC_SERVER config in both settings.py and local_settings.py, I won't get to upload data anymore. If I try to upload data, the response is: NAME <br></div><div><br></div><div>Note: 172.21.14.45 is in ALLOWED and PROXY Hosts<br></div><div><br></div><div>1.2 - Regarding egarding wsgi.py</div><div><br></div><div>I see that it is ok to use local_settings.py in the wsgi.py file, but I wonder why my GeoNode won't start up when I change from: <br></div><div>os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.settings")</div><div>to:</div><div>os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.local_settings")</div><div><br></div><div>Note: This is just a question, not an issue.</div><div><br></div><div><br></div><div>[1] <a href="http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/" target="_blank">http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/</a><br></div><div><br></div><div><br></div><div>Any hint on that will be very appreciated <br></div><div><br></div><div>Kind regards</div><div><br></div><div>Julierme<br></div><div><br></div><br></div></div>
</div></div>