[Geoserver-users] [Geoserver-devel] changing data directory using geoserver.war with jetty

Hi,

I made a very quick test and the result looks promising:

1) Install Geoserver 2.8 on Windows with the binary-zip alternative
2) Test that Geoserver is running and then stop the server
3) Download Jetty from http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.3.3.v20150827.zip&r=1
4) Unzip Jetty
5) Copy directory "geoserver" from the webapps of default 2.8 installation into webapps of Jetty 9.3.3
6) Start Jetty 9.3.3 from the installation directory with "java -jar start.jar"
7) Check that Geoserver is available at localhost:8080/geoserver
8) Check from server status that data_dir is at jetty933\webapps\geoserver\data and stop the server
9) From command window do "SET GEOSERVER_DATA_DIR=c:\data\test_data_dir"
10) Start Jetty 9.3.3 from the installation directory with "java -jar start.jar"
11) Check from server status that data_dir is at c:\data\test_data_dir"

Now Geoserver 2.8 is running on Jetty 9.3.3 and it is using the data_dir that I pointed it to use. Everything seems to work in the user interface and for the services but I have not tested very much yet because I reacted to your mail that you sent 50 minutes ago.

-Jukka Rahkonen-

walter.nordmann wrote:

geowolf wrote

Ah, did not notice this was the devel list. Yeah, wrong list for such
kind of question, a lot smaller audience, and here the discussion
topic is only one, how to improve GeoServer own code/functionality,
it's a list by developers for developers. You should ask on the users
list instead.

did it two days ago.
http://osgeo-org.1560.x6.nabble.com/setting-Servlet-context-parameter-in-jetty-tp5229293.html
- no response :frowning:

Nobody told me is the preferred way. I've been a core developer of
GeoServer for 9 years now, and that's how I always did it.

That's of course the easy way - develop a program and than you don't need a documentation :wink:

Regards
walter

Btw: the User-Documentation of Geoserver is very, very good and helped me a lot. There is just a gap in the installation/getting to work area.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/changing-data-directory-using-geoserver-war-with-jetty-tp5229890p5230031.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Rahkonen Jukka (MML) wrote

Hi,

I made a very quick test and the result looks promising:

1) Install Geoserver 2.8 on Windows with the binary-zip alternative
2) Test that Geoserver is running and then stop the server
3) Download Jetty from
http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.3.3.v20150827.zip&r=1
4) Unzip Jetty
5) Copy directory "geoserver" from the webapps of default 2.8 installation
into webapps of Jetty 9.3.3
6) Start Jetty 9.3.3 from the installation directory with "java -jar
start.jar"
7) Check that Geoserver is available at localhost:8080/geoserver
8) Check from server status that data_dir is at
jetty933\webapps\geoserver\data and stop the server
9) From command window do "SET GEOSERVER_DATA_DIR=c:\data\test_data_dir"
10) Start Jetty 9.3.3 from the installation directory with "java -jar
start.jar"
11) Check from server status that data_dir is at c:\data\test_data_dir"

Now Geoserver 2.8 is running on Jetty 9.3.3 and it is using the data_dir
that I pointed it to use. Everything seems to work in the user interface
and for the services but I have not tested very much yet because I reacted
to your mail that you sent 50 minutes ago.

-Jukka Rahkonen-

Thank's Jukka for your work.

BUT: I'm running jetty9 in a working environment on Ubuntu - not Windows.

step5 is interesting: Copy directory "geoserver" from the webapps of default
2.8 installation into webapps of Jetty 9.3.3

i only copied geoserver.war as written in the geoserver documentation.

Now i did was you told me and got

java.lang.RuntimeException: java.io.FileNotFoundException:
/opt/jetty/jetty9/webapps/geoserver/data/logs/geoserver.log (Datei oder
Verzeichnis nicht gefunden) at
org.geoserver.web.admin.LogPage$2$1.respond(LogPage.java:130) at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at
org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484) at
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at
org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at
org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
at
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
at
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.geoserver.security.filter.GeoServerUserNamePasswordAuthenticationFilter.doFilter(GeoServerUserNamePasswordAuthenticationFilter.java:116)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at
org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:87) at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42) at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at
org.eclipse.jetty.server.handler.IPAccessHandler.handle(IPAccessHandler.java:220)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499) at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745) Caused by:
java.io.FileNotFoundException:
/opt/jetty/jetty9/webapps/geoserver/data/logs/geoserver.log (Datei oder
Verzeichnis nicht gefunden) at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146) at
org.geoserver.web.admin.LogPage$2$1.respond(LogPage.java:123) ... 96 more

but the log directory exists:

cd /opt/jetty/jetty9/webapps/geoserver/data
jetty@anonymised.com:~/jetty9/webapps/geoserver/data$ ls -la
total 28
drwxrwxr-x 6 jetty jetty 4096 Oct 14 16:15 .
drwxrwxrwx 4 jetty wambacher 4096 Oct 14 16:06 ..
-rw-rw-r-- 1 jetty jetty 1577 Oct 14 16:06 gwc-gs.xml
drwxrwxr-x 2 jetty jetty 4096 Oct 14 16:06 gwc-layers
drwxrwxr-x 2 jetty jetty 4096 Oct 14 16:15 logs
drwxrwxr-x 8 jetty jetty 4096 Oct 14 16:15 security
drwxrwxr-x 2 jetty jetty 4096 Oct 14 16:06 styles

Then i created an empty log-file but nothing is written there.

Good news: the data-dir is now at /opt/jetty/jetty9/webapps/geoserver/data,
which is much much better than before.

Bad: After changing the environment var GEOSERVER_DATA_DIR to
/opt/geoserver/geoserver_data nothings changed. No Log, no errors, old data
dir (/opt/jetty/jetty9/webapps/geoserver/data), but geoserver is running.

Question: Have i to copy /opt/jetty/jetty9/webapps/geoserver/data to my
target /opt/geoserver/geoserver_data or not? tried both: empty
geoserver_data and copied one. No different.

I think, i can live with the current situation. data is on a well defined
place. before that it was in temp-dirs changing with every restart of jetty.

Regards
walter

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-changing-data-directory-using-geoserver-war-with-jetty-tp5230038p5230151.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Preferred way is often defined by the app server admin ( that is you! )

So you can see why we do not want to answer, each organization works differently and geoserver tries to be flexible enough to work with each.

On Wed, Oct 14, 2015 at 8:10 AM walter.nordmann <walter.nordmann@anonymised.com> wrote:

Rahkonen Jukka (MML) wrote

Hi,

I made a very quick test and the result looks promising:

  1. Install Geoserver 2.8 on Windows with the binary-zip alternative
  2. Test that Geoserver is running and then stop the server
  3. Download Jetty from
    http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.3.3.v20150827.zip&r=1
  4. Unzip Jetty
  5. Copy directory “geoserver” from the webapps of default 2.8 installation
    into webapps of Jetty 9.3.3
  6. Start Jetty 9.3.3 from the installation directory with “java -jar
    start.jar”
  7. Check that Geoserver is available at localhost:8080/geoserver
  8. Check from server status that data_dir is at
    jetty933\webapps\geoserver\data and stop the server
  9. From command window do “SET GEOSERVER_DATA_DIR=c:\data\test_data_dir”
  10. Start Jetty 9.3.3 from the installation directory with “java -jar
    start.jar”
  11. Check from server status that data_dir is at c:\data\test_data_dir"

Now Geoserver 2.8 is running on Jetty 9.3.3 and it is using the data_dir
that I pointed it to use. Everything seems to work in the user interface
and for the services but I have not tested very much yet because I reacted
to your mail that you sent 50 minutes ago.

-Jukka Rahkonen-

Thank’s Jukka for your work.

BUT: I’m running jetty9 in a working environment on Ubuntu - not Windows.

step5 is interesting: Copy directory “geoserver” from the webapps of default
2.8 installation into webapps of Jetty 9.3.3

i only copied geoserver.war as written in the geoserver documentation.

Now i did was you told me and got

java.lang.RuntimeException: java.io.FileNotFoundException:
/opt/jetty/jetty9/webapps/geoserver/data/logs/geoserver.log (Datei oder
Verzeichnis nicht gefunden) at
org.geoserver.web.admin.LogPage$2$1.respond(LogPage.java:130) at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at
org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484) at
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at
org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at
org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
at
org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
at
org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.geoserver.security.filter.GeoServerUserNamePasswordAuthenticationFilter.doFilter(GeoServerUserNamePasswordAuthenticationFilter.java:116)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at
org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
at
org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
at
org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at
org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:87) at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42) at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at
org.eclipse.jetty.server.handler.IPAccessHandler.handle(IPAccessHandler.java:220)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499) at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745) Caused by:
java.io.FileNotFoundException:
/opt/jetty/jetty9/webapps/geoserver/data/logs/geoserver.log (Datei oder
Verzeichnis nicht gefunden) at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:146) at
org.geoserver.web.admin.LogPage$2$1.respond(LogPage.java:123) … 96 more

but the log directory exists:

cd /opt/jetty/jetty9/webapps/geoserver/data
jetty@anonymised.com:~/jetty9/webapps/geoserver/data$ ls -la
total 28
drwxrwxr-x 6 jetty jetty 4096 Oct 14 16:15 .
drwxrwxrwx 4 jetty wambacher 4096 Oct 14 16:06 …
-rw-rw-r-- 1 jetty jetty 1577 Oct 14 16:06 gwc-gs.xml
drwxrwxr-x 2 jetty jetty 4096 Oct 14 16:06 gwc-layers
drwxrwxr-x 2 jetty jetty 4096 Oct 14 16:15 logs
drwxrwxr-x 8 jetty jetty 4096 Oct 14 16:15 security
drwxrwxr-x 2 jetty jetty 4096 Oct 14 16:06 styles

Then i created an empty log-file but nothing is written there.

Good news: the data-dir is now at /opt/jetty/jetty9/webapps/geoserver/data,
which is much much better than before.

Bad: After changing the environment var GEOSERVER_DATA_DIR to
/opt/geoserver/geoserver_data nothings changed. No Log, no errors, old data
dir (/opt/jetty/jetty9/webapps/geoserver/data), but geoserver is running.

Question: Have i to copy /opt/jetty/jetty9/webapps/geoserver/data to my
target /opt/geoserver/geoserver_data or not? tried both: empty
geoserver_data and copied one. No different.

I think, i can live with the current situation. data is on a well defined
place. before that it was in temp-dirs changing with every restart of jetty.

Regards
walter


View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-changing-data-directory-using-geoserver-war-with-jetty-tp5230038p5230151.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.



Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Jody Garnett