Hello everybody,

I had to commit a few crimes to set up clustering on geoserver:

  *   Geoserver 2.21.1
  *   JDK 17 LTS
  *   Clustering plugin  a snapshot from the build server


I get a ton of exceptions comparable to this:

   Caused by: com.thoughtworks.xstream.security.ForbiddenClassException: 
org.geoserver.cluster.impl.events.configuration.JMSGlobalModifyEvent

As it happens xstream 1.4.16 + fixed some security vulnerabilities so you can't 
randomly deserialize any class anymore: they must be added to a whitelist.  The 
clustering plugin seems not to be doing that.  I don't see a way to add a 
whitelist in a config file or something.

I worked around that by downgrading xstream to 1.4.15, and ran in a new list of 
errors:

   Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make 
field protected java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.h 
accessible: module java.base does not "opens java.lang.reflect" to unnamed 
module @3e17a0a1

This seems to be caused by this issue: 
https://github.com/x-stream/xstream/issues/101 which basically tell me xstream 
needs hacks on JDK 12+ with no real plan to fix it.  I worked around that by 
adding an extra bunch of opens to the systemd unit file:
   --add-opens java.base/java.util=ALL-UNNAMED --add-opens 
java.base/java.lang.reflect=ALL-UNNAMED --add-opens 
java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED 
--add-opens java.base/java.util.concurrent=ALL-UNNAMED

At this point it works, mostly.  Renaming an environment still crashes, but 
I'll learn to live with it ( e.g. AAA -> AAAB gives  Caused by: 
org.geoserver.catalog.CatalogException: Unable to locate 
WorkspaceInfoImpl[AAAB] named: AAAB locally. )   I also had some other fun with 
deadlocks while setting up, but it got fixed.

While this works, the fact that this is needed at all starts to scare me.  I 
can't see how clustering works out of the box, even on JDK8.  Is anybody using 
clustering on the current stable?


Hans Yperman
IT staff
Department IT
[cid:image001.png@01D8CE73.7E0A8850]
Vlaams Instituut voor de Zee vzw
InnovOcean Campus, Jacobsenstraat 1
8400 Oostende, Belgiƫ

T +32 (0) / M +32 (0)
www.vliz.be<http://www.vliz.be>


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to