<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hello list,</p>
<p><br>
</p>
<p>there is one more strange thing: I have another GeoNode installation on Ubuntu, installed via PPA, which is working fine. On CentOS the layer upload is broken.<br>
</p>
<p><br>
</p>
<p>There is a difference on layer upload in the tomcat access logs between Ubuntu and CentOS:
<br>
</p>
<p><br>
</p>
<p>- On *CentOS* there are serveral request to "<span>/geoserver/rest/imports</span>/*". The last one results in a<span><span> 403. As a result the entire upload fails:</span><br>
</span></p>
<p><span>"PUT /geoserver/rest/imports/52/tasks/0/target HTTP/1.1" 403</span></p>
<p><span><br>
</span></p>
<p><span>- On *Ubuntu* the requests to <span>"<span>/geoserver/rest/imports</span>/*"</span> are completely missing in the tomcat access logs. But the upload of the layer works. What I found in the logs instead:
</p>
<div><span>"PUT /geoserver/rest/workspaces/geonode/datastores/gdi/file.shp?charset=UTF-8&target=shp&update=overwrite&filename=lalala.zip HTTP/1.1" 201 -</span><br>
<br>
</div>
So: It seems on Ubuntu a different HTTP-API is used to upload the data, which is working.</span>
<p></p>
<p><span>What may be the reason for this? How can I fix this? Maybe different versions of GeoNode?</span><span></span><span></span><span></span><span></span><span></span><br>
</p>
<p><br>
</p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
Best regards,</div>
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
Andreas<br>
<br>
<p></p>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> geonode-users <geonode-users-bounces@lists.osgeo.org> im Auftrag von Watermeyer, Andreas <Andreas.Watermeyer@its-digital.de><br>
<b>Gesendet:</b> Mittwoch, 23. Mai 2018 18:35:21<br>
<b>An:</b> geonode-users@lists.osgeo.org<br>
<b>Betreff:</b> [GeoNode-users] Error on uploading (GeoServer response with 403)</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
Hi all,<br>
<br>
I am new to GeoNode and I have a problem with uploading shapefiles.<br>
<br>
Environment: CentOS 7, GeoNode 2.8, installation according to "GeoNode (v2.8) installation on CentOS 7", with a couple of tweaks to make it work:<br>
<a href="http://docs.geonode.org/en/master/tutorials/install_and_admin/setup_on_centos/index.html">http://docs.geonode.org/en/master/tutorials/install_and_admin/setup_on_centos/index.html</a><br>
<br>
Initially uploads were possible. But maps where broken, because GeoNode is not running on localhost. Then I adjusted the siteurl and the related parameters. Maps are working now, but the uploads are broken. Apparently I am not able to fully revert the changes
 for testing purposes; the uploads remain broken.<br>
<br>
Problem:<br>
"Unespected error!" when uploading a shapefile using the GeoNode "Upload Layer" wizard.<br>
<br>
Logs files: See below. <br>
<br>
What I found out:<br>
This GeoNode request to GeoServer results in a 403:<br>
10.11.202.130 - - [23/May/2018:18:06:15 +0200] "PUT /geoserver/rest/imports/51/tasks/0/target HTTP/1.1" 403 997 "-" "Python-httplib2/0.10.3 (gzip)"<br>
<br>
According to the GeoNode docs the communication between GeoNode and GeoServer is using Basic Authentication. However this request contains no Basic Auth headers, see attached Apache Forensic Logs.<br>
<br>
GeoNode uses httplib2 to issue the HTTP request and it is configured using the required username and password. But apparently httplib requires an 401 response from the server first, otherwise it will not send the credentials:<br>
<a href="https://github.com/httplib2/httplib2/issues/16">https://github.com/httplib2/httplib2/issues/16</a><br>
<br>
But GeoServer does not send a 401 but 403. If I tweak the GeoNode code and send the Basic Authentication header manually along with the request everything works fine.<br>
<br>
I suppose this is a side effect of a broken configuration but I have no idea where to look. I have double checked many config files in GeoServer and GeoNode and replaced localhost with the real hostname. Also recreated the oauth conf using an adapted version
 of the Ubuntu updateip-script etc.<br>
<br>
Any hints are much appreciated!<br>
     <br>
 <br>
Best regards, <br>
 Andreas<br>
<br>
----- Apache Log Errror Log -------<br>
[Wed May 23 11:06:15.168589 2018] [:error] [pid 12859] Traceback (most recent call last):<br>
[Wed May 23 11:06:15.168604 2018] [:error] [pid 12859]   File "/opt/gdi/geonode/geonode/geonode/upload/views.py", line 643, in view<br>
[Wed May 23 11:06:15.168608 2018] [:error] [pid 12859]     resp = _steps[step](req, upload_session)<br>
[Wed May 23 11:06:15.168611 2018] [:error] [pid 12859]   File "/opt/gdi/geonode/geonode/geonode/upload/views.py", line 417, in check_step_view<br>
[Wed May 23 11:06:15.168614 2018] [:error] [pid 12859]     return next_step_response(request, upload_session)<br>
[Wed May 23 11:06:15.168616 2018] [:error] [pid 12859]   File "/opt/gdi/geonode/geonode/geonode/upload/utils.py", line 377, in next_step_response<br>
[Wed May 23 11:06:15.168619 2018] [:error] [pid 12859]     return run_response(req, upload_session)<br>
[Wed May 23 11:06:15.168622 2018] [:error] [pid 12859]   File "/opt/gdi/geonode/geonode/geonode/upload/utils.py", line 618, in run_response<br>
[Wed May 23 11:06:15.168624 2018] [:error] [pid 12859]     run_import(upload_session)<br>
[Wed May 23 11:06:15.168627 2018] [:error] [pid 12859]   File "/opt/gdi/geonode/geonode/geonode/upload/utils.py", line 590, in run_import<br>
[Wed May 23 11:06:15.168629 2018] [:error] [pid 12859]     task.set_target(target.name, target.workspace.name)<br>
[Wed May 23 11:06:15.168632 2018] [:error] [pid 12859]   File "/opt/gdi/geonode/geonode-virtualenv/lib/python2.7/site-packages/gsimporter/api.py", line 285, in set_target<br>
[Wed May 23 11:06:15.168642 2018] [:error] [pid 12859]     self.target.change_datastore(store_name, workspace)<br>
[Wed May 23 11:06:15.168645 2018] [:error] [pid 12859]   File "/opt/gdi/geonode/geonode-virtualenv/lib/python2.7/site-packages/gsimporter/api.py", line 211, in change_datastore<br>
[Wed May 23 11:06:15.168649 2018] [:error] [pid 12859]     self._client().put_json(self.href,json.dumps(target_rep))<br>
[Wed May 23 11:06:15.168651 2018] [:error] [pid 12859]   File "/opt/gdi/geonode/geonode-virtualenv/lib/python2.7/site-packages/gsimporter/client.py", line 149, in put_json<br>
[Wed May 23 11:06:15.168654 2018] [:error] [pid 12859]     "Content-type" : "application/json",<br>
[Wed May 23 11:06:15.168657 2018] [:error] [pid 12859]   File "/opt/gdi/geonode/geonode-virtualenv/lib/python2.7/site-packages/gsimporter/client.py", line 176, in _request<br>
[Wed May 23 11:06:15.168660 2018] [:error] [pid 12859]     raise RequestFailed(resp.status,content)<br>
[Wed May 23 11:06:15.168664 2018] [:error] [pid 12859] RequestFailed: (403, '<html><head><title>Apache Tomcat/7.0.76 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
 H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
 {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 403 - Zugriff verweigert</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Zugriff verweigert</u></p><p><b>description</b>
 <u>Access to the specified resource has been forbidden.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.76</h3></body></html>')<br>
<br>
 ------------ Apache Access Log ----------<br>
<br>
10.11.202.130 - - [23/May/2018:18:06:13 +0200] "GET /geoserver/rest/imports/50/tasks/0/progress HTTP/1.1" 200 43 "-" "Python-httplib2/0.10.3 (gzip)"<br>
10.11.100.215 - - [23/May/2018:18:06:13 +0200] "GET /upload/progress?id=50 HTTP/1.1" 200 18 "<a href="http://myhost.local/layers/upload">http://myhost.local/layers/upload</a>" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
 Chrome/66.0.3359.181 Safari/537.36"<br>
10.11.202.130 - - [23/May/2018:18:06:13 +0200] "GET /api/users/admin HTTP/1.1" 200 68 "-" "Apache-HttpClient/4.5.1 (Java/1.8.0_171)"<br>
10.11.202.130 - - [23/May/2018:18:06:13 +0200] "GET /api/roles HTTP/1.1" 200 34 "-" "Apache-HttpClient/4.5.1 (Java/1.8.0_171)"<br>
10.11.202.130 - - [23/May/2018:18:06:13 +0200] "GET /api/roles HTTP/1.1" 200 34 "-" "Apache-HttpClient/4.5.1 (Java/1.8.0_171)"<br>
10.11.202.130 - - [23/May/2018:18:06:13 +0200] "GET /api/roles HTTP/1.1" 200 34 "-" "Apache-HttpClient/4.5.1 (Java/1.8.0_171)"<br>
10.11.100.215 - - [23/May/2018:18:06:13 +0200] "POST /upload/ HTTP/1.1" 200 112 "<a href="http://myhost.local/layers/upload">http://myhost.local/layers/upload</a>" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181
 Safari/537.36"<br>
10.11.100.215 - - [23/May/2018:18:06:14 +0200] "GET /upload/srs?id=51&force_ajax=true HTTP/1.1" 200 114 "<a href="http://myhost.local/layers/upload">http://myhost.local/layers/upload</a>" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
 like Gecko) Chrome/66.0.3359.181 Safari/537.36"<br>
10.11.202.130 - - [23/May/2018:18:06:15 +0200] "PUT /geoserver/rest/imports/51/tasks/0/target HTTP/1.1" 403 997 "-" "Python-httplib2/0.10.3 (gzip)"<br>
<br>
------ geoserver Logs -----------<br>
2018-05-23 16:06:15,132 DEBUG [security.IncludeQueryStringAntPathRequestMatcher] - Checking match of request : 'Path: /rest/imports/51/tasks/0/target, QueryString: null'; against '/j_spring_oauth2_geonode_login'<br>
2018-05-23 16:06:15,132 DEBUG [security.IncludeQueryStringAntPathRequestMatcher] - Checking match of request : 'Path: /rest/imports/51/tasks/0/target, QueryString: null'; against '/j_spring_oauth2_geonode_login/'<br>
2018-05-23 16:06:15,132 DEBUG [security.IncludeQueryStringAntPathRequestMatcher] - Checking match of request : 'Path: /rest/imports/51/tasks/0/target, QueryString: null'; against '/j_spring_security_logout'<br>
2018-05-23 16:06:15,132 DEBUG [security.IncludeQueryStringAntPathRequestMatcher] - Checking match of request : 'Path: /rest/imports/51/tasks/0/target, QueryString: null'; against '/j_spring_security_logout/'<br>
2018-05-23 16:06:15,132 DEBUG [security.IncludeQueryStringAntPathRequestMatcher] - Checking match of request : 'Path: /rest/imports/51/tasks/0/target, QueryString: null'; against '/j_spring_oauth2_geonode_logout'<br>
2018-05-23 16:06:15,132 DEBUG [security.IncludeQueryStringAntPathRequestMatcher] - Checking match of request : 'Path: /rest/imports/51/tasks/0/target, QueryString: null'; against '/j_spring_oauth2_geonode_logout/'<br>
2018-05-23 16:06:15,132 DEBUG [security.IncludeQueryStringAntPathRequestMatcher] - Checking match of request : 'Path: /rest/imports/51/tasks/0/target, QueryString: null'; against '/rest/**'<br>
2018-05-23 16:06:15,132 DEBUG [security.IncludeQueryStringAntPathRequestMatcher] - Matched Path: /rest/imports/51/tasks/0/target, QueryString: null with /rest/**<br>
2018-05-23 16:06:15,158 DEBUG [geoserver.security] - Inspecting the http request looking for the GeoNode Session ID.<br>
2018-05-23 16:06:15,158 DEBUG [geoserver.security] - Found no cookies!<br>
2018-05-23 16:06:15,158 DEBUG [geoserver.security] - preAuthenticatedPrincipal = null, trying to authenticate<br>
2018-05-23 16:06:15,159 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Converted URL to lowercase, from: '/rest/imports/51/tasks/0/target'; to: '/rest/imports/51/tasks/0/target'  and httpMethod= PUT<br>
2018-05-23 16:06:15,159 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /rest/process/batchdownload/download/* methodList= [GET]<br>
2018-05-23 16:06:15,159 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/imports/51/tasks/0/target'; antPath is /rest/process/batchdownload/download/*; matchedPath=false; matchedMethods=false<br>
2018-05-23 16:06:15,159 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /rest/printing/* methodList= [GET, POST]<br>
2018-05-23 16:06:15,159 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/imports/51/tasks/0/target'; antPath is /rest/printing/*; matchedPath=false; matchedMethods=false<br>
2018-05-23 16:06:15,159 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /** methodList= [GET]<br>
2018-05-23 16:06:15,159 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/imports/51/tasks/0/target'; antPath is /**; matchedPath=true; matchedMethods=false<br>
2018-05-23 16:06:15,159 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /** methodList= [POST, DELETE, PUT]<br>
2018-05-23 16:06:15,159 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/imports/51/tasks/0/target'; antPath is /**; matchedPath=true; matchedMethods=true<br>
2018-05-23 16:06:15,159 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - returning ROLE_ADMINISTRATOR<br>
2018-05-23 16:06:15,159 DEBUG [filter.GeoServerSecurityContextPersistenceFilter$1] - SecurityContextHolder now cleared, as request processing completed<br>
2018-05-23 16:06:37,890 DEBUG [geoserver.security] - AuthenticationCache Eviction task running<br>
2018-05-23 16:06:37,891 DEBUG [geoserver.security] - Cache entries #: 1<br>
2018-05-23 16:06:37,891 DEBUG [geoserver.security] - AuthenticationCache Eviction task completed<br>
2018-05-23 16:06:37,891 DEBUG [geoserver.security] - Cache entries #: 1<br>
2018-05-23 16:06:46,790 DEBUG [geoserver.wps] - Removing statuses matching [[[ NOT [ completionTime IS NULL ] ] AND org.geotools.filter.temporal.BeforeImpl@3fe5cc15] AND [[ NOT [ lastUpdated IS NULL ] ] AND org.geotools.filter.temporal.BeforeImpl@3ae17701]]<br>
2018-05-23 16:07:46,791 DEBUG [geoserver.wps] - Removing statuses matching [[[ NOT [ completionTime IS NULL ] ] AND org.geotools.filter.temporal.BeforeImpl@440106f5] AND [[ NOT [ lastUpdated IS NULL ] ] AND org.geotools.filter.temporal.BeforeImpl@3efcb1e1]]<br>
<br>
------ Apache Forensic Logs -------------<br>
+WwWRdb9KGjJnr-C8P4dlvQAAAAc|GET /api/users/admin HTTP/1.1|Host:myhost.local|Connection:Keep-Alive|User-Agent:Apache-HttpClient/4.5.1 (Java/1.8.0_171)|Accept-Encoding:gzip,deflate<br>
-WwWRdcvNymUGf1Y2uJyl3gAAAAQ<br>
-WwWRdTtXhtCEmXsif6wu9QAAAAA<br>
-WwWRdb9KGjJnr-C8P4dlvQAAAAc<br>
+WwWRdb9KGjJnr-C8P4dlvgAAAAc|GET /api/roles HTTP/1.1|Host:myhost.local|Connection:Keep-Alive|User-Agent:Apache-HttpClient/4.5.1 (Java/1.8.0_171)|Accept-Encoding:gzip,deflate<br>
-WwWRdb9KGjJnr-C8P4dlvgAAAAc<br>
+WwWRdb9KGjJnr-C8P4dlvwAAAAc|GET /api/roles HTTP/1.1|Host:myhost.local|Connection:Keep-Alive|User-Agent:Apache-HttpClient/4.5.1 (Java/1.8.0_171)|Accept-Encoding:gzip,deflate<br>
-WwWRdb9KGjJnr-C8P4dlvwAAAAc<br>
+WwWRdb9KGjJnr-C8P4dlwAAAAAc|GET /api/roles HTTP/1.1|Host:myhost.local|Connection:Keep-Alive|User-Agent:Apache-HttpClient/4.5.1 (Java/1.8.0_171)|Accept-Encoding:gzip,deflate<br>
-WwWRdb9KGjJnr-C8P4dlwAAAAAc<br>
-WwWRdeA-J21YttgLDfeNPAAAAAI<br>
+WwWRduA-J21YttgLDfeNPQAAAAI|GET /upload/srs?id=51&force_ajax=true HTTP/1.1|Host:myhost.local|Accept:*/*|X-Requested-With:XMLHttpRequest|User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT<br>
ML, like Gecko) Chrome/66.0.3359.181 Safari/537.36|Referer:http%3a//myhost.local/layers/upload|Accept-Encoding:gzip, deflate|Accept-Language:de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7|Cookie:csrftoken=gTCyxBP1jPafdvuoD4y<br>
b7iIixtXdmHNi; sessionid=xqm2ssjmclf7sk8r0la1gi31gps850d6|Connection:keep-alive<br>
-WwWRduA-J21YttgLDfeNPQAAAAI<br>
+WwWRduA-J21YttgLDfeNPgAAAAI|GET /upload/check?id=51&force_ajax=true HTTP/1.1|Host:myhost.local|Accept:*/*|X-Requested-With:XMLHttpRequest|User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (K<br>
HTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36|Referer:http%3a//myhost.local/layers/upload|Accept-Encoding:gzip, deflate|Accept-Language:de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7|Cookie:csrftoken=gTCyxBP1jPafdvuoD<br>
4yb7iIixtXdmHNi; sessionid=xqm2ssjmclf7sk8r0la1gi31gps850d6|Connection:keep-alive<br>
+WwWRd4Jc7dBshm8NrAoivwAAAAE|PUT /geoserver/rest/imports/51/tasks/0/target HTTP/1.1|Host:myhost.local|Content-Length:87|content-type:application/json|accept-encoding:gzip, deflate|user-agent:Python-httplib2/0.10.3 (gzip)<br>
-WwWRd4Jc7dBshm8NrAoivwAAAAE<br>
-WwWRduA-J21YttgLDfeNPgAAAAI<br>
<br>
----------  local_settings.py ----------<br>
<br>
# -*- coding: utf-8 -*-<br>
#########################################################################<br>
#<br>
# Copyright (C) 2018 OSGeo<br>
#<br>
# This program is free software: you can redistribute it and/or modify<br>
# it under the terms of the GNU General Public License as published by<br>
# the Free Software Foundation, either version 3 of the License, or<br>
# (at your option) any later version.<br>
#<br>
# This program is distributed in the hope that it will be useful,<br>
# but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
# GNU General Public License for more details.<br>
#<br>
# You should have received a copy of the GNU General Public License<br>
# along with this program. If not, see <<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>>.<br>
#<br>
#########################################################################<br>
<br>
import os<br>
from geonode.settings import *<br>
<br>
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))<br>
<br>
MEDIA_ROOT = os.getenv('MEDIA_ROOT', os.path.join(PROJECT_ROOT, "uploaded"))<br>
<br>
STATIC_ROOT = os.getenv('STATIC_ROOT',<br>
                        os.path.join(PROJECT_ROOT, "static_root")<br>
                        )<br>
<br>
# SECRET_KEY = '************************'<br>
<br>
SITEURL = "<a href="http://myhost.local/">http://myhost.local/</a>"<br>
#SITEURL = "<a href="http://localhost/">http://localhost/</a>"<br>
<br>
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '::1', 'myhost.local']<br>
PROXY_ALLOWED_HOSTS = ("127.0.0.1", 'localhost', '::1', 'myhost.local' )<br>
POSTGIS_VERSION = (2, 4, 0)<br>
<br>
# TIME_ZONE = 'Europe/Paris'<br>
<br>
DATABASES = {<br>
    'default': {<br>
        'ENGINE': 'django.db.backends.postgresql_psycopg2',<br>
        # "default" and "data" use the same DB but different schemas.<br>
        # each user "gdi" and "geonode" has a corresponding DB "search_path".<br>
        #'OPTIONS': {<br>
        #        'options': '-c search_path=geonode,public'<br>
        # },<br>
        'NAME': 'gdi',<br>
        'USER': 'geonode',<br>
        'PASSWORD': 'geonode',<br>
        'HOST': 'localhost',<br>
        'PORT': '5432',<br>
        'CONN_TOUT': 900,<br>
    },<br>
    # vector datastore for uploads<br>
    'datastore': {<br>
        'ENGINE': 'django.contrib.gis.db.backends.postgis',<br>
        #'OPTIONS': {<br>
        #        'options': '-c search_path=gdi,public'<br>
        #},<br>
        'NAME': 'gdi',<br>
        'USER': 'gdi',<br>
        'PASSWORD': 'gdi',<br>
        'HOST': 'localhost',<br>
        'PORT': '5432',<br>
        'CONN_TOUT': 900,<br>
    }<br>
}<br>
<br>
GEOSERVER_LOCATION = os.getenv(<br>
    'GEOSERVER_LOCATION', '<a href="http://localhost:8080/geoserver/">http://localhost:8080/geoserver/</a>'<br>
)<br>
<br>
GEOSERVER_PUBLIC_LOCATION = os.getenv(<br>
    #    'GEOSERVER_PUBLIC_LOCATION', '{}/geoserver/'.format(SITEURL)<br>
    'GEOSERVER_PUBLIC_LOCATION', '<a href="http://myhost.local/geoserver/">http://myhost.local/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 needs to be kept like this because in dev mode<br>
        # the proxy won't work and the integration tests will fail<br>
        # the entire block has to be overridden in the local_settings<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 DATABASES dictionary to enable<br>
        'DATASTORE': 'datastore',<br>
        'PG_GEOGIG': False,<br>
        'TIMEOUT': 10  # number of seconds to allow for HTTP requests<br>
    }<br>
}<br>
<br>
# WARNING: Map Editing is affected by this. GeoExt Configuration is cached for 5 minutes<br>
# CACHES = {<br>
#     'default': {<br>
#         'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',<br>
#         'LOCATION': '/var/tmp/django_cache',<br>
#     }<br>
# }<br>
<br>
# If you want to enable Mosaics use the following configuration<br>
UPLOADER = {<br>
    # 'BACKEND': 'geonode.rest',<br>
    'BACKEND': 'geonode.importer',<br>
    'OPTIONS': {<br>
        'TIME_ENABLED': True,<br>
        'MOSAIC_ENABLED': False,<br>
        'GEOGIG_ENABLED': False,<br>
    },<br>
    'SUPPORTED_CRS': [<br>
        'EPSG:4326',<br>
        'EPSG:3785',<br>
        'EPSG:3857',<br>
        'EPSG:900913',<br>
        'EPSG:32647',<br>
        'EPSG:32736'<br>
    ],<br>
    'SUPPORTED_EXT': [<br>
        '.shp',<br>
        '.csv',<br>
        '.kml',<br>
        '.kmz',<br>
        '.json',<br>
        '.geojson',<br>
        '.tif',<br>
        '.tiff',<br>
        '.geotiff',<br>
        '.gml',<br>
        '.xml'<br>
    ]<br>
}<br>
<br>
CATALOGUE = {<br>
    'default': {<br>
        # The underlying CSW implementation<br>
        # default is pycsw in local mode (tied directly to GeoNode Django DB)<br>
        'ENGINE': 'geonode.catalogue.backends.pycsw_local',<br>
        # pycsw in non-local mode<br>
        # 'ENGINE': 'geonode.catalogue.backends.pycsw_http',<br>
        # GeoNetwork opensource<br>
        # 'ENGINE': 'geonode.catalogue.backends.geonetwork',<br>
        # deegree and others<br>
        # 'ENGINE': 'geonode.catalogue.backends.generic',<br>
<br>
        # The FULLY QUALIFIED base url to the CSW instance for this GeoNode<br>
        'URL': '%s/catalogue/csw' % SITEURL,<br>
        # 'URL': '<a href="http://localhost:8080/geonetwork/srv/en/csw">http://localhost:8080/geonetwork/srv/en/csw</a>',<br>
        # 'URL': '<a href="http://localhost:8080/deegree-csw-demo-3.0.4/services">http://localhost:8080/deegree-csw-demo-3.0.4/services</a>',<br>
<br>
        # login credentials (for GeoNetwork)<br>
        'USER': 'admin',<br>
        'PASSWORD': 'admin',<br>
        'ALTERNATES_ONLY': True,<br>
    }<br>
}<br>
<br>
# pycsw settings<br>
PYCSW = {<br>
    # pycsw configuration<br>
    'CONFIGURATION': {<br>
        # uncomment / adjust to override server config system defaults<br>
        # 'server': {<br>
        #    'maxrecords': '10',<br>
        #    'pretty_print': 'true',<br>
        #    'federatedcatalogues': '<a href="http://catalog.data.gov/csw">http://catalog.data.gov/csw</a>'<br>
        # },<br>
        'metadata:main': {<br>
            'identification_title': 'GeoNode Catalogue',<br>
            'identification_abstract': 'GeoNode is an open source platform' \<br>
            ' that facilitates the creation, sharing, and collaborative use' \<br>
            ' of geospatial data',<br>
            'identification_keywords': 'sdi, catalogue, discovery, metadata,' \<br>
            ' GeoNode',<br>
            'identification_keywords_type': 'theme',<br>
            'identification_fees': 'None',<br>
            'identification_accessconstraints': 'None',<br>
            'provider_name': 'Organization Name',<br>
            'provider_url': SITEURL,<br>
            'contact_name': 'Lastname, Firstname',<br>
            'contact_position': 'Position Title',<br>
            'contact_address': 'Mailing Address',<br>
            'contact_city': 'City',<br>
            'contact_stateorprovince': 'Administrative Area',<br>
            'contact_postalcode': 'Zip or Postal Code',<br>
            'contact_country': 'Country',<br>
            'contact_phone': '+xx-xxx-xxx-xxxx',<br>
            'contact_fax': '+xx-xxx-xxx-xxxx',<br>
            'contact_email': 'Email Address',<br>
            'contact_url': 'Contact URL',<br>
            'contact_hours': 'Hours of Service',<br>
            'contact_instructions': 'During hours of service. Off on ' \<br>
            'weekends.',<br>
            'contact_role': 'pointOfContact',<br>
        },<br>
        'metadata:inspire': {<br>
            'enabled': 'true',<br>
            'languages_supported': 'eng,gre',<br>
            'default_language': 'eng',<br>
            'date': 'YYYY-MM-DD',<br>
            'gemet_keywords': 'Utility and governmental services',<br>
            'conformity_service': 'notEvaluated',<br>
            'contact_name': 'Organization Name',<br>
            'contact_email': 'Email Address',<br>
            'temp_extent': 'YYYY-MM-DD/YYYY-MM-DD',<br>
        }<br>
    }<br>
}<br>
<br>
# GeoNode javascript client configuration<br>
<br>
# default map projection<br>
# Note: If set to EPSG:4326, then only EPSG:4326 basemaps will work.<br>
DEFAULT_MAP_CRS = "EPSG:3857"<br>
<br>
# Where should newly created maps be focused?<br>
DEFAULT_MAP_CENTER = (0, 0)<br>
<br>
# How tightly zoomed should newly created maps be?<br>
# 0 = entire world;<br>
# maximum zoom is between 12 and 15 (for Google Maps, coverage varies by area)<br>
DEFAULT_MAP_ZOOM = 0<br>
<br>
# Default preview library<br>
# GEONODE_CLIENT_LAYER_PREVIEW_LIBRARY = 'geoext'  # DEPRECATED use HOOKSET instead<br>
GEONODE_CLIENT_HOOKSET = "geonode.client.hooksets.GeoExtHookSet"<br>
<br>
# To enable the REACT based Client enable those<br>
# INSTALLED_APPS += ('geonode-client', )<br>
# GEONODE_CLIENT_LAYER_PREVIEW_LIBRARY = 'react'  # DEPRECATED use HOOKSET instead<br>
# GEONODE_CLIENT_HOOKSET = "geonode.client.hooksets.ReactHookSet"<br>
<br>
# To enable the Leaflet based Client enable those<br>
# GEONODE_CLIENT_LAYER_PREVIEW_LIBRARY = 'leaflet'  # DEPRECATED use HOOKSET instead<br>
# GEONODE_CLIENT_HOOKSET = "geonode.client.hooksets.LeafletHookSet"<br>
<br>
# To enable the MapStore2 based Client enable those<br>
# INSTALLED_APPS += ('geonode_mapstore_client', )<br>
# GEONODE_CLIENT_LAYER_PREVIEW_LIBRARY = 'mapstore'  # DEPRECATED use HOOKSET instead<br>
# GEONODE_CLIENT_HOOKSET = "geonode_mapstore_client.hooksets.MapStoreHookSet"<br>
<br>
# LEAFLET_CONFIG = {<br>
#    'TILES': [<br>
#        # Find tiles at:<br>
#        # <a href="http://leaflet-extras.github.io/leaflet-providers/preview/">http://leaflet-extras.github.io/leaflet-providers/preview/</a><br>
#<br>
#        # Map Quest<br>
#        ('Map Quest',<br>
#         '<a href="http://otile4.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png">http://otile4.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png</a>',<br>
#         'Tiles Courtesy of <a href="<a href="http://www.mapquest.com/">MapQuest</a">http://www.mapquest.com/">MapQuest</a</a>> '<br>
#         '&mdash; Map data &copy; '<br>
#         '<a href="<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a">http://www.openstreetmap.org/copyright">OpenStreetMap</a</a>>'),<br>
#        # Stamen toner lite.<br>
#        # ('Watercolor',<br>
#        #  '<a href="http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.png">http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.png</a>',<br>
#        #  'Map tiles by <a href="<a href="http://stamen.com">http://stamen.com</a>">Stamen Design</a>, \<br>
#        #  <a href="<a href="http://creativecommons.org/licenses/by/3.0">http://creativecommons.org/licenses/by/3.0</a>">CC BY 3.0</a> &mdash; Map data &copy; \<br>
#        #  <a href="<a href="http://openstreetmap.org">OpenStreetMap</a">http://openstreetmap.org">OpenStreetMap</a</a>> contributors, \<br>
#        #  <a href="<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a">http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a</a>>'),<br>
#        # ('Toner Lite',<br>
#        #  '<a href="http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png">http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png</a>',<br>
#        #  'Map tiles by <a href="<a href="http://stamen.com">http://stamen.com</a>">Stamen Design</a>, \<br>
#        #  <a href="<a href="http://creativecommons.org/licenses/by/3.0">http://creativecommons.org/licenses/by/3.0</a>">CC BY 3.0</a> &mdash; Map data &copy; \<br>
#        #  <a href="<a href="http://openstreetmap.org">OpenStreetMap</a">http://openstreetmap.org">OpenStreetMap</a</a>> contributors, \<br>
#        #  <a href="<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a">http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a</a>>'),<br>
#    ],<br>
#    'PLUGINS': {<br>
#        'esri-leaflet': {<br>
#            'js': 'lib/js/esri-leaflet.js',<br>
#            'auto-include': True,<br>
#        },<br>
#        'leaflet-fullscreen': {<br>
#            'css': 'lib/css/leaflet.fullscreen.css',<br>
#            'js': 'lib/js/Leaflet.fullscreen.min.js',<br>
#            'auto-include': True,<br>
#        },<br>
#    },<br>
#    'SRID': 3857,<br>
#    'RESET_VIEW': False<br>
#}<br>
<br>
ALT_OSM_BASEMAPS = os.environ.get('ALT_OSM_BASEMAPS', False)<br>
CARTODB_BASEMAPS = os.environ.get('CARTODB_BASEMAPS', False)<br>
STAMEN_BASEMAPS = os.environ.get('STAMEN_BASEMAPS', False)<br>
THUNDERFOREST_BASEMAPS = os.environ.get('THUNDERFOREST_BASEMAPS', False)<br>
MAPBOX_ACCESS_TOKEN = os.environ.get('MAPBOX_ACCESS_TOKEN', None)<br>
BING_API_KEY = os.environ.get('BING_API_KEY', None)<br>
GOOGLE_API_KEY = os.environ.get('GOOGLE_API_KEY', None)<br>
<br>
MAP_BASELAYERS = [{<br>
    "source": {"ptype": "gxp_olsource"},<br>
    "type": "OpenLayers.Layer",<br>
    "args": ["No background"],<br>
    "name": "background",<br>
    "visibility": False,<br>
    "fixed": True,<br>
    "group":"background"<br>
},<br>
    # {<br>
    #     "source": {"ptype": "gxp_olsource"},<br>
    #     "type": "OpenLayers.Layer.XYZ",<br>
    #     "title": "TEST TILE",<br>
    #     "args": ["TEST_TILE", "<a href="http://test_tiles/tiles/${z}/${x}/${y}.png">http://test_tiles/tiles/${z}/${x}/${y}.png</a>"],<br>
    #     "name": "background",<br>
    #     "attribution": "&copy; TEST TILE",<br>
    #     "visibility": False,<br>
    #     "fixed": True,<br>
    #     "group":"background"<br>
    # },<br>
    {<br>
    "source": {"ptype": "gxp_osmsource"},<br>
    "type": "OpenLayers.Layer.OSM",<br>
    "name": "mapnik",<br>
    "visibility": True,<br>
    "fixed": True,<br>
    "group": "background"<br>
}]<br>
<br>
if 'geonode.geoserver' in INSTALLED_APPS:<br>
    LOCAL_GEOSERVER = {<br>
        "source": {<br>
            "ptype": "gxp_wmscsource",<br>
            "url": OGC_SERVER['default']['PUBLIC_LOCATION'] + "wms",<br>
            "restUrl": "/gs/rest"<br>
        }<br>
    }<br>
    baselayers = MAP_BASELAYERS<br>
    MAP_BASELAYERS = [LOCAL_GEOSERVER]<br>
    MAP_BASELAYERS.extend(baselayers)<br>
<br>
# Use kombu broker by default<br>
# REDIS_URL = 'redis://localhost:6379/1'<br>
# BROKER_URL = REDIS_URL<br>
# CELERY_RESULT_BACKEND = REDIS_URL<br>
CELERYD_HIJACK_ROOT_LOGGER = True<br>
CELERYD_CONCURENCY = 1<br>
# Set this to False to run real async tasks<br>
CELERY_ALWAYS_EAGER = True<br>
CELERYD_LOG_FILE = None<br>
CELERY_REDIRECT_STDOUTS = True<br>
CELERYD_LOG_LEVEL = 1<br>
<br>
# Haystack Search Backend Configuration. To enable,<br>
# first install the following:<br>
# - pip install django-haystack<br>
# - pip install elasticsearch==2.4.0<br>
# - pip install woosh<br>
# - pip install pyelasticsearch<br>
# Set HAYSTACK_SEARCH to True<br>
# Run "python manage.py rebuild_index"<br>
# HAYSTACK_SEARCH = False<br>
# Avoid permissions prefiltering<br>
SKIP_PERMS_FILTER = False<br>
# Update facet counts from Haystack<br>
HAYSTACK_FACET_COUNTS = True<br>
HAYSTACK_CONNECTIONS = {<br>
    'default': {<br>
        'ENGINE': 'haystack.backends.elasticsearch2_backend.Elasticsearch2SearchEngine',<br>
        'URL': '<a href="http://127.0.0.1:9200/">http://127.0.0.1:9200/</a>',<br>
        'INDEX_NAME': 'haystack',<br>
    },<br>
    #    'db': {<br>
    #        'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',<br>
    #        'EXCLUDED_INDEXES': ['thirdpartyapp.search_indexes.BarIndex'],<br>
    #        }<br>
}<br>
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'<br>
# HAYSTACK_SEARCH_RESULTS_PER_PAGE = 20<br>
<br>
LOGGING = {<br>
    'version': 1,<br>
    'disable_existing_loggers': True,<br>
    'formatters': {<br>
        'verbose': {<br>
            'format': '%(levelname)s %(asctime)s %(module)s %(process)d '<br>
                      '%(thread)d %(message)s'<br>
        },<br>
        'simple': {<br>
            'format': '%(message)s',<br>
        },<br>
    },<br>
    'filters': {<br>
        'require_debug_false': {<br>
            '()': 'django.utils.log.RequireDebugFalse'<br>
        }<br>
    },<br>
    'handlers': {<br>
        'console': {<br>
            'level': 'DEBUG',<br>
            'class': 'logging.StreamHandler',<br>
            'formatter': 'simple'<br>
        },<br>
        'mail_admins': {<br>
            'level': 'ERROR', 'filters': ['require_debug_false'],<br>
            'class': 'django.utils.log.AdminEmailHandler',<br>
        }<br>
    },<br>
    "loggers": {<br>
        "django": {<br>
            "handlers": ["console"], "level": "ERROR", },<br>
        "geonode": {<br>
            "handlers": ["console"], "level": "DEBUG", },<br>
        "gsconfig.catalog": {<br>
            "handlers": ["console"], "level": "DEBUG", },<br>
        "owslib": {<br>
            "handlers": ["console"], "level": "DEBUG", },<br>
        "pycsw": {<br>
            "handlers": ["console"], "level": "ERROR", },<br>
        "Client": {<br>
            "handlers": ["console"], "level": "DEBUG", },<br>
    },<br>
}<br>
<br>
# Additional settings<br>
CORS_ORIGIN_ALLOW_ALL = True<br>
<br>
GEOIP_PATH = "/usr/local/share/GeoIP"<br>
<br>
# add following lines to your local settings to enable monitoring<br>
MONITORING_ENABLED = True<br>
<br>
if MONITORING_ENABLED:<br>
    if 'geonode.contrib.monitoring' not in INSTALLED_APPS:<br>
        INSTALLED_APPS += ('geonode.contrib.monitoring',)<br>
    if 'geonode.contrib.monitoring.middleware.MonitoringMiddleware' not in MIDDLEWARE_CLASSES:<br>
        MIDDLEWARE_CLASSES += \<br>
            ('geonode.contrib.monitoring.middleware.MonitoringMiddleware',)<br>
    MONITORING_CONFIG = None<br>
    MONITORING_SERVICE_NAME = 'local-geonode'<br>
<br>
#Define email service on GeoNode<br>
EMAIL_ENABLE = True<br>
<br>
if EMAIL_ENABLE:<br>
    EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'<br>
    EMAIL_HOST = 'localhost'<br>
    EMAIL_PORT = 25<br>
    EMAIL_HOST_USER = ''<br>
    EMAIL_HOST_PASSWORD = ''<br>
    EMAIL_USE_TLS = False<br>
    DEFAULT_FROM_EMAIL = 'Example.com <no-reply@localhost>'<br>
<br>
# Documents Thumbnails<br>
UNOCONV_ENABLE = True<br>
<br>
if UNOCONV_ENABLE:<br>
    UNOCONV_EXECUTABLE = os.getenv('UNOCONV_EXECUTABLE', '/usr/bin/unoconv')<br>
    UNOCONV_TIMEOUT = os.getenv('UNOCONV_TIMEOUT', 30)  # seconds<br>
<br>
# Advanced Security Workflow Settings<br>
CLIENT_RESULTS_LIMIT = 20<br>
API_LIMIT_PER_PAGE = 1000<br>
FREETEXT_KEYWORDS_READONLY = False<br>
RESOURCE_PUBLISHING = False<br>
ADMIN_MODERATE_UPLOADS = False<br>
GROUP_PRIVATE_RESOURCES = False<br>
GROUP_MANDATORY_RESOURCES = False<br>
MODIFY_TOPICCATEGORY = True<br>
USER_MESSAGES_ALLOW_MULTIPLE_RECIPIENTS = True<br>
DISPLAY_WMS_LINKS = True<br>
<br>
# For more information on available settings please consult the Django docs at<br>
# <a href="https://docs.djangoproject.com/en/dev/ref/settings">https://docs.djangoproject.com/en/dev/ref/settings</a><br>
<br>
<br>
<br>
     <br>
<br>
     <br>
 <br>
Best regards, <br>
 Andreas<br>
 <br>
  <br>
 <br>
     <br>
_______________________________________________<br>
geonode-users mailing list<br>
geonode-users@lists.osgeo.org<br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</div>
</span></font>
</body>
</html>