Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Hazelcast Vertx Kubernetes cluster issue #435

Open
k0ezeN opened this issue Feb 23, 2024 · 0 comments
Open

Hazelcast Vertx Kubernetes cluster issue #435

k0ezeN opened this issue Feb 23, 2024 · 0 comments

Comments

@k0ezeN
Copy link

k0ezeN commented Feb 23, 2024

Hey all
Im migrating Vertx 3x to Vertx 4x services on kubenetes cluster using hazelcast
Old version was :
-io.vertx:vertx-hazelcast:3.6.0
-group= "com.hazelcast", name= "hazelcast-kubernetes", version= 1.3

And now im trying with :
-io.vertx:vertx-hazelcast:4.5.3
-group= "com.hazelcast", name= "hazelcast-kubernetes", version= "2.2.3"

And i also use a Hazelcast config created from a k8s.xml file :

<?xml version="1.0" encoding="UTF-8"?>
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.hazelcast.com/schema/config http://hazelcast.com/schema/config/hazelcast-config-4.2.xsd">
    <properties>
        <property name="hazelcast.logging.type">jdk</property>
        <property name="hazelcast.mancenter.enabled">false</property>
        <property name="hazelcast.memcache.enabled">false</property>
        <property name="hazelcast.rest.enabled">false</property>
        <property name="hazelcast.wait.seconds.before.join">0</property>
        <property name="hazelcast.discovery.enabled">true</property>
        <property name="hazelcast.logging.level">debug</property>
    </properties>
    <network>
        <join>
            <multicast enabled="false"/>
            <tcp-ip enabled="false"/>
            <discovery-strategies>
                <discovery-strategy class="com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy" enabled="true">
                    <properties>
                        <property name="namespace">blablabla</property>
                        <property name="service-name">blablabla</property>
                    </properties>
                </discovery-strategy>
            </discovery-strategies>
        </join>
    </network>
    <map name="subs">
        <backup-count>1</backup-count>
        <time-to-live-seconds>0</time-to-live-seconds>
        <max-idle-seconds>0</max-idle-seconds>
        <eviction eviction-policy="NONE" max-size-policy="PER_NODE" size="0"/>
        <merge-policy>com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
    </map>
    <cp-subsystem>
        <cp-member-count>10</cp-member-count> 
        <semaphores>
            <semaphore>
                <name>"__vertx.*"</name>
                <jdk-compatible>true</jdk-compatible>
                <initial-permits>1</initial-permits>
            </semaphore>
        </semaphores>
    </cp-subsystem>
</hazelcast>

When deploying my verticle to kube, i go this error :
Caused by: com.hazelcast.config.properties.ValidationException: There is no discovery strategy factory to create 'DiscoveryStrategyConfig{properties={namespace=blablabla, service-name=blablabla}, className='com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy', discoveryStrategyFactory=null}' Is it a typo in a strategy classname? Perhaps you forgot to include implementation on a classpath?

So 1st thing i did is ckecking my Jar if i foud
Hazelcast kubernetes and especially this class : HazelcastKubernetesDiscoveryStrategyFactor
And yep shes is the the Jar so i don't really know where this error could came from ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant