Hi!
We try to use nexus in k8s on cluster mode. We try to use hazelcast-kuberentes.
But when nexus start it writes to log :
Caused by: com.hazelcast.config.InvalidConfigurationException: cvc-complex-type.2.4.a: Invalid content was found starting with element ‘kubernetes’. One of ‘{“http://www.hazelcast.com/schema/config”:discovery-strategies}’ is expected.
When I set this up I used version 1.2.2 of the hazelcast-kubernetes module. You may need to make some modifications to the pom.xml and build it yourself to get it working though.
hi!
Thank for your answer. I try to use hazelcast-kubernetes-1.2.1.jar. I put this jar file to dir /opt/sonatype/nexus/system/com/hazelcast/hazelcast/3.10.3/.
Can you show your hazelcast-network.xml for nexus?
When i try to use following config:
<join>
<!-- deactivating other discoveries -->
<multicast enabled="false"/>
<tcp-ip enabled="false"/>
<aws enabled="false"/>
<kubernetes enabled="true">
<namespace>test-nexus</namespace>
<service-name>registry</service-name>
</kubernetes>
</join>
I see error in during startup nexus:
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error in custom provider, com.hazelcast.config.InvalidConfigurationException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'kubernetes'. One of '{"http://www.hazelcast.com/schema/config":discovery-strategies}' is expected.
while locating com.sonatype.nexus.hazelcast.internal.HazelcastInstanceProvider
at / (via modules: org.sonatype.nexus.extender.modules.NexusBundleModule -> org.eclipse.sisu.space.SpaceModule)
while locating com.hazelcast.core.HazelcastInstance annotated with @com.google.inject.name.Named(value=nexus)
at org.eclipse.sisu.wire.LocatorWiring
while locating com.hazelcast.core.HazelcastInstance
at com.sonatype.nexus.hazelcast.internal.orient.SharedHazelcastConfig.<init>(SharedHazelcastConfig.java:53)
at / (via modules: org.sonatype.nexus.extender.modules.NexusBundleModule -> org.eclipse.sisu.space.SpaceModule)
while locating com.sonatype.nexus.hazelcast.internal.orient.SharedHazelcastConfig
while locating java.lang.Object annotated with *
There is a miss match of the xml xsd for the version 3.10.3. The xsd did not know the kubernetes node inside the xml configuration.
To use the cluster functions inside a k8s clusters, Sonatype has to implement the hazelcast-plugin 4.x