I installed geonode following this instructions: http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/ In the end it say that if you log-in in geonode then geoserver is also authenticated, but in my case that did not happend. So I follow this instructions to configure the OAuth2 http://docs.geonode.org/en/master/tutorials/admin/geoserver_geonode_security/index.html and the test conection worked well. The thing is that when I try to update the style of a layer I get the error: "There was an error saving the style back to the server".

Apache logs says:

[wsgi:error] [pid 6886:tid 140619259516672] Internal Server Error: /gs/rest/styles/line.xml


[wsgi:error] [pid 6886:tid 140619259516672] File "/home/geonode/geonode/geonode/geoserver/signals.py", line 133, in geoserver_pre_save [wsgi:error] [pid 6886:tid 140619259516672]
'type': None} [wsgi:error] [pid 6886:tid 140619259516672] AttributeError: 'NoneType' object has no attribute 'attribution'

Geoserver logs says:

(When sudo service tomcat8 restart)

INFO [geoserver.global] - Falling back to embedded data directory: /var/lib/tomcat8/webapps/geoserver/data

WARN [geoserver.config] - Error reading resource URL [jar:file:/var/lib/tomcat8/webapps/geoserver/WEB-INF/lib/gs-geofence-server-2.9-SNAPSHOT.jar!/geofence-default-override.properties] java.io.FileNotFoundException: URL [jar:file:/var/lib/tomcat8/webapps/geoserver/WEB-INF/lib/gs-geofence-server-2.9-SNAPSHOT.jar!/geofence-default-override.properties] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/var/lib/tomcat8/webapps/geoserver/WEB-INF/lib/gs-geofence-server-2.9-SNAPSHOT.jar!/geofence-default-override.properties


(When update the style)

ERROR [geoserver.security] - Could not Authorize OAuth2 Resource due to the following exception: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://localhost:8000/api/o/v4/tokeninfo/?access_token=gFq6vD2g21eNMAQ9HILSsNEwqXo8Gb": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)


Could you give some recommendations, what things should I check?


Make sure tomcat has write access to geoserver_data directory.

chown -R tomcat:tomcat /var/lib/tomcat8/webapps/geoserver/data
chmod -R 777 /var/lib/tomcat8/webapps/geoserver/data

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.