Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Nabz
    @nabanita18
    executing command specified by MC_INIT_CMD
    Unmatched arguments: cluster, add, --lenient=true, -H, /data, -cc, /config/hazelcast-client.yaml
    Did you mean: create-user or change-user-password or update-ldap-password?
    mancenter version:3.12.8
    Hazelcast
    @hazelcast_twitter
    [Andrey Pechkurov (Andrey)] How do you start Management Center and which image do you use? The command from the error output is inly supported in MC 4.0+
    Ramneek Khurana
    @ranmeekkhsc
    we are getting the same error as well
    using 3.12.8 image
    and same helm chart
    Hasan Çelik
    @hasancelik
    Hi @nabanita18, what is Hazelcast Helm chart version you installed? Probably, you were trying to install latest helm chart with 3.12.8 Management Center image. With 4.0 release, the way Management Center connects to and communicates with Hazelcast clusters has been changed so we have modified related commands and configurations at our Helm chart as well. To start 3.12.8 Management Center, you need to use 2.10.0 as a chart version --> helm install <name> --set <parameters> --version 2.10.0 hazelcast/hazelcast
    Sagar Raut
    @v8sagar
    hi all
    I am using IMDG, bucket4j, and AWS
    I want to set member IP and Port dynamically
    Any idea how I can achieve it?
    Jaromir Hamala
    @jerrinot
    @v8sagar please elaborate what do you mean dynamically. IP addresses are assigned by DHCP server ran by AWS. what are you trying to achieve?
    Sagar Raut
    @v8sagar
    @jerrinot I want to know if I am using hazelcast wiht Spring boot application and its run on two different servers with ELB
    will it work ?
    Do I need to install the hazelcast separately?
    Hazelcast
    @hazelcast_twitter
    [Rafal Leszko (unknown)] @v8sagar You can run it this way. Run Hazelcast embedded in Spring boot on two EC2 machines, use AWS Discovery plugin for discovery and then expose everything with ELB. I don't see any issue with that.
    Sagar Raut
    @v8sagar
    @hazelcast_twitter thanks
    @hazelcast_twitter can you give me an example to refer this will be good for me
    Hazelcast
    @hazelcast_twitter
    [Rafal Leszko (unknown)] I think this documentation is the best source: https://github.com/hazelcast/hazelcast-aws
    Sagar Raut
    @v8sagar
    @hazelcast_twitter thank you again
    Sagar Raut
    @v8sagar

    Hi all
    I am getting
    `[0.0.0.0]:8099 [dev] [4.0.2] While sending op error... op: com.hazelcast.internal.cluster.impl.operations.JoinMastershipClaimOp{serviceName='hz:core:clusterService', identityHash=188472785, partitionId=-1, replicaIndex=0, callId=5, invocationTime=1597066923255 (2020-08-10 19:12:03.255), waitTimeout=-1, callTimeout=60000}, error: java.lang.IllegalArgumentException: Target is this node! -> [0.0.0.0]:8099

    java.lang.IllegalArgumentException: Target is this node! -> [0.0.0.0]:8099, response: ErrorResponse{callId=5, urgent=true, cause=java.lang.IllegalArgumentException: Target is this node! -> [0.0.0.0]:8099}`

    Jaromir Hamala
    @jerrinot
    @v8sagar
    0.0.0.0:8099 is super suspicious. can you share your configuration file?
    Sagar Raut
    @v8sagar
    Config config = new Config();
    config.setLiteMember(false);
    // setting up the local grid server
    config.getNetworkConfig().setPublicAddress("0.0.0.0").setPort(8099).setPortAutoIncrement(true);
        // setting up the cluster
        System.out.println( Arrays.asList(environment).toString());
        JoinConfig join = config.getNetworkConfig().getJoin();
        join.getMulticastConfig().setEnabled(false);
        join.getAwsConfig().setEnabled(false);
        join.getTcpIpConfig().setEnabled(true).setMembers(Arrays.asList(environment));
    
        CacheSimpleConfig cacheConfig = new CacheSimpleConfig();
        cacheConfig.setName("buckets");
        config.addCacheConfig(cacheConfig);```
    Jaromir Hamala
    @jerrinot
    setPublicAddress("0.0.0.0") looks wrong.
    what environment is it? AWS?
    Sagar Raut
    @v8sagar

    My approach I will run the two instance without creating the IP for HAZELCAST on the same server with the port number

    then I will join the cluster with IP and PORT

    Jaromir Hamala
    @jerrinot
    so there won't be anyone connecting from outside? only 2 Hazelcast instances running on the same server talking to each other?
    Sagar Raut
    @v8sagar
    other will be connectin
    Jaromir Hamala
    @jerrinot
    why do you set the public address at all? this usually needed only when you have someone in a different network connecting to the cluster.
    usually the default public address should work fine. unless you are in a complicated environment such as Kuberentes. but for that you should use a Kubernetes plugin.
    Sagar Raut
    @v8sagar
    I need to as I am going to join the cluster from a different server
    Jaromir Hamala
    @jerrinot
    is the different server in the same network?
    Sagar Raut
    @v8sagar
    same netrwok
    Jaromir Hamala
    @jerrinot

    ok. in this case you need to provide details about your environment and topology. clearly setPublicAddress("0.0.0.0") is wrong.
    the question is: what should be there instead? (if anything at all)

    here is what I know so far:

    1. you have 2 Hazelcast instances running on 1 server
    2. there is another instance running on a different service.
    3. all instances are in the same network
    4. all 3 instances are supposed to form a single cluster

    is :point_up: correct?

    Sagar Raut
    @v8sagar
    1> yes
    2>yes
    3>yes
    4>yes
    @jerrinot What I am doing wrong?
    Jaromir Hamala
    @jerrinot
    what if you remove setPublicAddress("0.0.0.0") ?
    Sagar Raut
    @v8sagar
    then I don't know my hazelcast ip as it by default run on
    192.168.122.1:5701
    Jaromir Hamala
    @jerrinot
    setPublicAddress() sets an IP address others should use to talk to this member. this is usually needed when you have multiple networks and what not.
    for some reason you have 0.0.0.0 which CANNOT ever be used to talk to this member. The address 0.0.0.0 has a special meaning in IP networks.
    Sagar Raut
    @v8sagar
    so if i use my actual address will it work?
    setPublicAddress("127.0.0.1")?
    It worked thanks for clarifying it :)
    Jaromir Hamala
    @jerrinot
    you have 3 options:
    1. use multicast discovery. this is the default. it's simple to use and has no external dependency. but it does not work on most cluster providers as clouds do not allow multicast traffic.
    2. use static configuration. then you have to know IP address of all your members. I see you use join.getTcpIpConfig().setEnabled(true).setMembers(Arrays.asList(environment)); for this joiner you have to know all IP addresses anyway.
    3. use a discovery plugin. this is the most popular option when deploying in clouds. we have discovery plugins for AWS, Azure, GCP, Kubernetes, Zookeepr, Eureka, etc..
    setPublicAddress("127.0.0.1") will work only on a single box. again, remove that. most likely you dont need at all.
    Sagar Raut
    @v8sagar
    okay thanks
    Jaromir Hamala
    @jerrinot
    you are very welcome. Happy Hazelcasting!
    Sagar Raut
    @v8sagar
    @jerrinot
    for my case, this will work perfectly fine right?
        Config config = new Config();
        config.setLiteMember(false);
        JoinConfig join = config.getNetworkConfig().getJoin();
        config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
        config.getNetworkConfig().getJoin().getAwsConfig().setEnabled(true)
                .setProperty("tag-key", "my-ec2-instance-tag-key")
                .setProperty("tag-value", "my-ec2-instance-tag-value");
    
        CacheSimpleConfig cacheConfig = new CacheSimpleConfig();
        cacheConfig.setName("buckets");
        config.addCacheConfig(cacheConfig);
    
        HazelcastInstance hazelcastInstance = Hazelcast.newHazelcastInstance(config);
        ICacheManager cacheManager = hazelcastInstance.getCacheManager();
        Cache<String, GridBucketState> cache = cacheManager.getCache("buckets");
    
        return cache;
    1> 2 Hazelcast instances running on 1 server
    2>there is another instance running on a different service.
    3>all instances are in the same network
    4>all 3 instances are supposed to form a single cluster
    Jaromir Hamala
    @jerrinot

    that looks fine to me.
    some notes: config.setLiteMember(false); is redundant as that's the default.

    depending on your deployment scheme you might want to store hazelcastInstance somewhere and shut it down when your application is about to shutdown. this is mostly concern if you deploy to an app server with multiple tenants (applications). If you are using something like Spring Boot (or appserver-less deployment in general) then it's usually not a concern.

    other than that - it looks good to me
    if you are on AWS then using the AWS plugin for discovery is the best option
    Sagar Raut
    @v8sagar
    yes I am on AWS
    and I am using springboot
    Sagar Raut
    @v8sagar
    @jerrinot if this works
    I will be creating Github repo with lots of explanation for someone like me
    Happy Hazelcasting
    Jaromir Hamala
    @jerrinot
    that would be excellent! @mesutcelik would be certainly interested in that!