Verifying data in Hazelcast

64 views
Skip to first unread message

Jono Jono

unread,
Feb 27, 2018, 5:44:44 PM2/27/18
to CAS Community

I'm using CAS 4.2 with Hazelcast, but I'm unable to verify that CAS is writting to Hazelcast. Can you point me to how I would determine the data that CAS is writing to the cache?

Here is the hazelcast part of my properties file:

hz.mapname=tickets
hz
.cluster.logging.type=slf4j
hz
.cluster.members=cas1,hazelcastmaster


I am able to authenticate to CAS, but I cant see where this data is stored. I have tried using the hazelcast management center as well as the console app (see below), but all the datasets look empty.


$ cd webapps
/cas/WEB-INF/lib && java -cp hazelcast-3.7.1.jar com.hazelcast.console.ConsoleApp
Feb 27, 2018 7:27:54 PM com.hazelcast.config.FileSystemXmlConfig
INFO
: Configuring Hazelcast from '/usr/local/tomcat/webapps/cas/WEB-INF/lib/hazelcast.xml'.
Feb 27, 2018 7:27:54 PM com.hazelcast.instance.DefaultAddressPicker
INFO
: [LOCAL] [dev] [3.7.1] Prefer IPv4 stack is true.
Feb 27, 2018 7:27:54 PM com.hazelcast.instance.DefaultAddressPicker
INFO
: [LOCAL] [dev] [3.7.1] Picked [172.20.0.6]:5702, using socket ServerSocket[addr=/0.0.0.0,localport=5702], bind any local is true
Feb 27, 2018 7:27:54 PM com.hazelcast.system
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] Hazelcast 3.7.1 (20160905 - 1f47990) starting at [172.20.0.6]:5702
Feb 27, 2018 7:27:54 PM com.hazelcast.system
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
Feb 27, 2018 7:27:54 PM com.hazelcast.system
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] Configured Hazelcast Serialization version : 1
Feb 27, 2018 7:27:54 PM com.hazelcast.spi.impl.operationservice.impl.BackpressureRegulator
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] Backpressure is disabled
Feb 27, 2018 7:27:54 PM com.hazelcast.instance.Node
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] Creating MulticastJoiner
Feb 27, 2018 7:27:54 PM com.hazelcast.core.LifecycleService
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] [172.20.0.6]:5702 is STARTING
Feb 27, 2018 7:27:54 PM com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] Starting 8 partition threads
Feb 27, 2018 7:27:54 PM com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] Starting 5 generic threads (1 dedicated for priority tasks)
Feb 27, 2018 7:27:54 PM com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThreadingModel
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads
Feb 27, 2018 7:27:57 PM com.hazelcast.internal.cluster.impl.MulticastJoiner
INFO
: [172.20.0.6]:5702 [dev] [3.7.1]


Members [1] {
   
Member [172.20.0.6]:5702 - c6927086-98ef-4ac5-b53a-9f465e346318 this
}

Feb 27, 2018 7:27:57 PM com.hazelcast.instance.Node
WARNING
: [172.20.0.6]:5702 [dev] [3.7.1] Config seed port is 5701 and cluster size is 1. Some of the ports seem occupied!
Feb 27, 2018 7:27:57 PM com.hazelcast.core.LifecycleService
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] [172.20.0.6]:5702 is STARTED
Feb 27, 2018 7:27:58 PM com.hazelcast.internal.partition.impl.PartitionStateManager
INFO
: [172.20.0.6]:5702 [dev] [3.7.1] Initializing cluster partition table arrangement...
hazelcast
[default] > m.size
Size = 0
hazelcast
[default] > ns tickets
namespace: tickets
hazelcast
[tickets] > m.size
Size = 0



Ray Bon

unread,
Feb 28, 2018, 12:15:50 PM2/28/18
to cas-...@apereo.org
Jono,

Try setting hazelcast to debug in log4j2.xml.

Ray
-- 
Ray Bon
Programmer analyst
Development Services, University Systems
2507218831 | CLE 019 | rb...@uvic.ca

Jono

unread,
Feb 28, 2018, 12:44:44 PM2/28/18
to cas-...@apereo.org
I have done that. The log shows when I authenticate. And it shows stuff about hazelcast's heartbeat. But it does not say anything about how the key is store or where I can find it.
Should I see something particular?

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/1519838143.1801.32.camel%40uvic.ca.

Ray Bon

unread,
Feb 28, 2018, 2:58:40 PM2/28/18
to cas-...@apereo.org
Jono,

Try this log4j2 item,

        <!-- DEBUG Locating map name [...] for ticket definition
                   Located Hazelcast map instance [...]
                   Added ticket [...] with ttl [time in seconds]
                   Adding ticket [...] with ttl [time in seconds] -->
        <AsyncLogger name="org.apereo.cas.ticket.registry.HazelcastTicketRegistry" level="debug" includeLocation="true"/>

Ray

Jono Jono

unread,
Mar 6, 2018, 4:14:55 PM3/6/18
to CAS Community
Thanks.

I was able to get it to work, though I'm not exactly sure how.

The hazelcast lib I was using was in my Docker image so I thought there may be some issue with my host only networking, but I dont think that was it.

It was either related to using different hazelcast versions (3.7 vs 3.9) together (either in the application or in the hazelcast.xml schema versions. I also found that the '-Djava.net.preferIPv4Stack=true' in hazelcast-3.7.1/bin/demo/console.sh was preventing discovery from happening.

It may have been group related. I was unable to determine what the default group or security-group was for CAS's hazelcast, so I had to use hazelcast.xml to make sure I knew the values in there.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
Reply all
Reply to author
Forward
0 new messages