I want to run GeoServer 2.14 with Jetty on a Ubuntu 18.04.
I copied the war-file in the
webapps folder and GeoServer is responding.
Unfortunately I can not set the data directory location as described in the GeoServer docs.
I appended the following line to
After logging in to the system the variable is set as expected:
#echo $GEOSERVER_DATA_DIR /opt/geoserver_data
I also created the folder
#ls -la /opt/geoserver_data total 8 drwxr-xr-x 2 root root 4096 Nov 12 15:20 . drwxr-xr-x 5 root root 4096 Nov 12 15:20 ..
When I restart Jetty, the first two GeoServer log lines are:
INFO [geoserver.platform] - Falling back to embedded data directory: /tmp/jetty-0.0.0.0-8080-geoserver.war-_geoserver-any-6077051313967886521.dir/webapp/data INFO [geoserver.platform] - Falling back to embedded data directory: /tmp/jetty-0.0.0.0-8080-geoserver.war-_geoserver-any-6077051313967886521.dir/webapp/data
This is strange because according to the GeoServer source code, there should be a warning that the given folder does not exist or is not writable.
Obviously I am doing something wrong, but I have no idea what?
Based on Ian Turton's answer, I ensured that
jetty is not run as
Furthermore I start jetty now with
-DGEOSERVER_DATA_DIR=/opt/geoserver_data, which is easier to handle than a system variable.
At the moment I still get the following warning messages:
WARN [geoserver.platform] - Found Java environment variable GEOSERVER_DATA_DIR set to /opt/geoserver_data , which is not writeable INFO [geoserver.platform] - Falling back to embedded data directory: /tmp/jetty-0.0.0.0-8080-geoserver.war-_geoserver-any-1540535100624462590.dir/webapp/data
But at least the expected warning is shown. Although the fallback data directory still looks odd.