[Geoserver-users] Can not run GeoServer with Tomcat when specifying the data directory

If I start up Tomcat with geoserver.war copied to
apache-tomcat-7.0.54/webapps, without specifying a data path, I have no
problem to access the geoserver through localhost:8080/geoserver.

But if I specify the data path in setclasspath.sh, such as adding the
following line:
CATALINA_OPTS="-DGEOSERVER_DATA_DIR=/xxx/geoserver-2.1.x/data/release"

After restart tomcat, I can not access localhost:8080/geoserver. I got:

"HTTP Status 404 - /geoserver
type Status report
message /geoserver
description The requested resource is not available.
Apache Tomcat/7.0.54"

Or if I specify on my terminal the following command before starting tomcat:
export GEOSERVER_DATA_DIR=/xxx/geoserver-2.1.x/data/release

I got the same error message.
I double checked the data path, it is valid.

Anyone can help?
Thanks.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Can-not-run-GeoServer-with-Tomcat-when-specifying-the-data-directory-tp5149503.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Xinfan,
is the /xxx/geoserver-2.1.x/data/release path accessible by the tomcat user or group?

Tomcat/Geoserver need permissions to read/write files on that path to work correctly.

Mauro

It should be. I downloaded tomcat, downloaded geoserver code and compiled the
geoservser code under the same user account. I checked that both tomcat and
geoserver have the same user account and group.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Can-not-run-GeoServer-with-Tomcat-when-specifying-the-data-directory-tp5149503p5149510.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I found out that I can specify /xxx/geoserver-2.1.x/data/citewms-1.3, but not
.../release data directory. It used to work. Is it possible that the data
directory corrupted? But how?

Thanks.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Can-not-run-GeoServer-with-Tomcat-when-specifying-the-data-directory-tp5149503p5149516.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

When I set the data path to release directory, I found out from
logs/catalina.out that the tasmania.xml, spearfish.xml and tiger-ny.xml were
Failed to load. Do not know how those were modified (the file date is more
recently). I only used WorldWind from another machine to access the
GeoServer in Tomcat and displayed the tiger_ny layer.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Can-not-run-GeoServer-with-Tomcat-when-specifying-the-data-directory-tp5149503p5149531.html
Sent from the GeoServer - User mailing list archive at Nabble.com.