Open blacar opened 3 years ago
There shouldn't be a problem with running on JDK11.
Can you share your (obfuscated) configuration file (etc/init.properties
)? From the stacktrace it seems that you have some error in your configuration (around repo-auto-remove-obsolete-items
option). It should has following format:
cl-comp/repo-auto-remove-obsolete-items[B]=true
Thanks indeed for your prompt response.
Here is the cluster related section:
# Cluster properties
--cluster-mode = true
--s2s-secret = [xxxOBFUSCATEDxxx]
cl-comp/cluster-connections-per-node[I]=2
cl-comp/repo-remove-outdated-items[B]=true
cl-comp/repo-remove-outdated-items=true
cl-comp/repo-autoreload-interval[L]=15
cl-comp/repo-autoreload-interval=15
cl-comp/repo-auto-remove-obsolete-items[B]=true
cl-comp/repo-auto-remove-obsolete-items=true
Here is most of the file
How do you understand that this is related the repo-auto-remove-obsolete-items
option from the stacktrace?
UPDATE
Having
cl-comp/repo-auto-remove-obsolete-items[B]=true
cl-comp/repo-auto-remove-obsolete-items=true
didnt worked then we removed
cl-comp/repo-auto-remove-obsolete-items=true
and now seems working (?!)
... so maybe we should sanitize our config as:
cl-comp/cluster-connections-per-node[I]=2
cl-comp/repo-remove-outdated-items[B]=true
cl-comp/repo-autoreload-interval[L]=15
cl-comp/repo-auto-remove-obsolete-items[B]=true
???
UPDATE
Using config above the Tigase was able to join the cluster :+1:
However I see other weird thing on logs
Apr 16 16:18:47 tigase-xxx-stg-us-central1-qw0l java[26114]: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: 'sun.misc.Cleaner sun.nio.ch.DirectBuffer.cleaner()'
Apr 16 16:18:47 tigase-xxx-stg-us-central1-qw0l java[26114]: #011at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
Apr 16 16:18:47 tigase-xxx-stg-us-central1-qw0l java[26114]: #011at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
Apr 16 16:18:47 tigase-xxx-stg-us-central1-qw0l java[26114]: #011at tigase.net.SocketThread$ResultsListener.run(SocketThread.java:568)
Apr 16 16:18:47 tigase-xxx-stg-us-central1-qw0l java[26114]: Caused by: java.lang.NoSuchMethodError: 'sun.misc.Cleaner sun.nio.ch.DirectBuffer.cleaner()'
This might actually be a JDK11 compatibility issue (??) ...
Java 9 and later:
// sun.nio.ch.DirectBuffer methods are not accessible,
// so the new sun.misc.Unsafe.theUnsafe.invokeCleaner(ByteBuffer) is used.
// See https://bugs.openjdk.java.net/browse/JDK-8171377
I can see at tigase.net.IOUtil.java
there is this inner class BufferCache
it calling
private void freeBuffer(ByteBuffer buf) {
java.lang.ref.Cleaner
((DirectBuffer) buf).cleaner().clean();
}
... and this API no longer accessible on JDK9
However I can see that on Tigase 8.0.0 the update of that section of code is just remove it.
Anyway since that exception is not catched within the method, and the method is public I cant foresee which possible effects can produce.
Also it might me think that other possible JDK > 8 problems might be awaiting.
Do you still think we can say Tigase 7.1.6 is JDK11 ready?
It seems to me Tigase 7.1.6 is just fitted for JDK8
wdyt?
Just to clarify:
cl-comp/repo-auto-remove-obsolete-items[B]=true
cl-comp/repo-auto-remove-obsolete-items=true
is INCORRECT - you can't have two lines about same configuration and init.properties requires specifying value type (i.e. [B]
)
As for the issue itself - you could try adding -XaddExports:java.base/jdk.internal.ref=ALL-UNNAMED
to your java
command, which should grant you access to this API.
If not I'd stick with JDK8 or, better yet, update to more recent Tigase version.
Cool, thanks for the clarification. We will try and get back here with the outcome.
I have a Tigase cluster working for some time, now I decided to migrate to 7.1.6 version (I have some extensions that need changes to fit Tigase 8.x)
I would like to use JDK11 as well since the rest of my platform is in that version and Tigase documentation doesn't suggest it's restricted to JDK8
Tigase-server bootstrap correctly and seems to accept connections and delivering messages.
However, I noticed the migrated server didn't join the cluster. Looking at the logs I can see this:
This seems to happens only with Java11 ... the same 7.1.6 version on Java 8 works.
I would appreciate any advice on how to proceed here.
Are you aware of Tigase-server 7.1.6 having problems with OpenJDK11? Should I stick to JDK8?