Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Vishal Patil
    @pa-vishal
    My current server cluster setup is on Eureka
    and client connect to server by discovery
    Jaromir Hamala
    @jerrinot
    The simpler the reproducer the better. It's best to reach out to me here, this way others reading this chat can learn something too. feel free to @tag me.
    Jaromir Hamala
    @jerrinot

    @pa-vishal I guess I know what the problem is. A Queue listener is just a passive observer. It does not consume queue elements. When you have listeners registered on multiple clients then each listeners will be invoke for each item.
    This is probably not what you want. Not only multiple listeners will be invoked for each item, but the items won't ever be consumer and the queue will leak memory.

    You most likely do not want a queue listener, but a queue consumer. Please have a look at the reference manual how to consume queue: https://docs.hazelcast.org/docs/4.0.2/manual/html-single/index.html#taking-items-off-the-queue

    Vishal Patil
    @pa-vishal
    @jerrinot , rather than using a infinite while loop for polling on network , my solution would be to create a keyhash on items in the queue . I have described the solution here- https://groups.google.com/g/hazelcast/c/U_p_j4tOP5Q/m/WMQns18zBgAJ
    Also found an alternative to own keyhash, is to use the partitionId: int itemPartitionId = hz.getPartitionService().getPartition(item.getItem()).getPartitionId();
    Jaromir Hamala
    @jerrinot

    you cannot use use listeners. you need something to consume elements from the queue otherwise it will be leaking memory.

    if you prefer listeners and manual load balancing then you could use ITopic instead. It has listeners, but it does not retain items.

    Vishal Patil
    @pa-vishal
    @jerrinot , yes you are right, that's a great suggestion, ITopic makes more sense in scenarios like this.
    Jaromir Hamala
    @jerrinot
    :+1:
    AdamUlatowski
    @AdamUlatowski
    @puzpuzpuz Thank you very much for final clarification!
    dawidjasiokwork
    @dawidjasiokwork

    @jerrinot
    I checked your advice and it looks that it works. I mean almost because now we are facing with another problem.
    When I set max size policy to PER_NODE and 15000 entries I observe that during requesting to our application:

    • first instance has 15106 entries
    • second instance has 14940 entries
    • third instance has 14940 entries

    and the limit is restricted so each instance never contains more than this.
    For me it looks ok, I see in logs that entires are evicted.
    But when i set USED_HEAP_SIZE on 100MB (does it mean 50MB per entries memory and 50MB per backup right?) I observe that when each instance reachs 50MB then eviction is started (mostly it happens after 10000 entries per instance). But when I request for example for another 1000000 entries and we have 1000000 putAsync operations, memory grows more than 50MB:

    • first instance has 84 MB per memory entries, 16 MB backup memory
    • second instance has 84 MB memory entries, 16 MB backup memory

    summing up the memory on each instance we still have the 100 MB but the distribution is different, only 16 MB for backup. Is this appropriate behavior?

    image.png
    Jaromir Hamala
    @jerrinot

    @dawidjasiokwork
    I'm glad the threshold is being respected when configured properly.

    the primary/backup imbalance looks like a possible bug in eviction. for some reason backups entries are evicted more frequently then primaries.
    please open a new ticket at https://github.com/hazelcast/hazelcast/issues/new and describe your scenario. thanks!

    murali474
    @murali474

    hi ,
    Currently i am using client sever topology model with 5 java clients .All 5 java clients are web applications and am getting below error in logs.

    Failed to execute java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@6bb6a27
    java.lang.NoClassDefFoundError: com/hazelcast/client/impl/protocol/util/BufferBuilder

    could some one guide me to fix this.

    murali474
    @murali474

    and the other error is getting printed in logs continuously is as below.

    Illegal access: this web application instance has been stopped already.
    Could not load [com.hazelcast.client.impl.protocol.ClientMessage]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
    java.lang.IllegalStateException: I
    llegal access: this web application instance has been stopped already.
    Could not load [com.hazelcast.client.impl.protocol.ClientMessage].
    The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

    Hazelcast
    @hazelcast_twitter
    [Peter Veentjer (peter.veentjer)] could it be that you have multiple versions of the same jars on the classpath?
    murali474
    @murali474
    i am deploying my applications in tomcat and i dont find any hazelcast jar in tomcat clas s path.
    Jaromir Hamala
    @jerrinot
    @murali474:
    It looks you had deployed a webapplication with an embedded Hazelcast. Then you undeployed the application from Tomcat, but the application failed to stop Hazelcast instance. You should always stop all Hazelcast instances when an application is being stopped. the simplest thing should be to call HazelcastInstance.shutdown() from a context listener. See an example here: https://www.codejava.net/java-ee/servlet/weblistener-annotation-examples
    Shivam Sharma
    @svmsharma20
    Hi All,
    One of our customers is facing high latency around 4 to 8 mins between publishing a message on an iTopic and receiving the message at subscribers' end. This delay is intermittent and happens around 4-5 times a day. As per the load on the infrastructure and GC utilization is normal. Any suggestions?
    Jaromir Hamala
    @jerrinot
    @svmsharma20:
    just a shot into dark: assuming the cluster is otherwise stable it could be caused by some other tasks occupying event threads. threadumps and java mission control could tell you more.
    4-8 minutes is indeed extreme
    Nabz
    @nabanita18
    Hi , we are trying to set up hazelcast in eks, but we are unable to bring up mancenter in EKS
    getting below error
    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?