Dave,

We experienced a similar issue. Hazelcast attempts to add tickets from the 
other servers but the timeouts differ. We use one config with 4 cas servers.
Opted to take the hit and brought all 4 down. Outage was only a few minutes.
I do like the idea of editing the hazelcast ips.

Ray

On Tue, 2022-11-08 at 11:59 -0800, Dave Steiner wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

So I was just doing the same thing... hopefully you've already figured this out 
but....

Hazelcast doesn't seem to like it when you change certain values while it's 
running.  So you can handle this two ways:

1. Bring down all servers using Hazelcast, make the changes and bring them back 
up, or to keep things running a bit better in Prod,
2. This is assuming two CAS servers running Hazelcast and Hazelcast is 
configured via hard-coded IPs... so you're mileage may vary
- edit Server1 cas.properties to make the change you want *and* remove the IP 
addess of the other Hazelcast server.  Restart tomcat
- edit Server2 cas.properties to make the change you want and restart.  Note 
that it will connect to the Server1 Hazelcast but you've already made the 
change there
- edit Server1 cas.properties to add back the IP address of Server2 Hazelcast 
and restart

That second method has worked for me.  Anyone have a better way to deal with 
this?

-ds
Rutgers University, IdM Architect


On Thursday, September 22, 2022 at 4:31:45 PM UTC-4 dah...@gmail.com wrote:
Hi all, I've had searched around here for a similar problem but couldn't find 
it so I am posting in hope somebody can help me find and answer, or show me 
where I am doing things wrong.

I need to modify some cas ticket registry, expiration policy, configurations, I 
want to change the Time To Kill of ST tickets, but when I use the Configuration 
written on the DOC:
cas.ticket.st.time-to-kill-in-seconds=60

I can't get to start CAS, and I find an error of Hazelcast. I use Hazelcast for 
ticket share on my cluster environment, so I guess that I can't use default 
ticket configuration properties when I use hazelcast because it would be 
delegated to it.

The problem is that I can't find the equivalent configuration to use for my 
hazelcast configuration (if there is one...). Do somebody knows about the 
correct property? Is there something I can do to get my desired result?

Thanks for your time.

The error I get on catalina.out:

     Caused by: org.springframework.beans.factory.BeanCreationException:
        Error creating bean with name 'casTicketRegistryHazelcastInstance'
        defined in class path resource 
[org/apereo/cas/config/HazelcastTicketRegistryConfiguration.class]:
        Bean instantiation via factory method failed; nested exception is
        org.springframework.beans.BeanInstantiationException: Failed to 
instantiate
        [com.hazelcast.core.HazelcastInstance]: Factory method 
'casTicketRegistryHazelcastInstance'
        threw exception; nested exception is 
com.hazelcast.config.InvalidConfigurationException:
        Cannot add a dynamic configuration 
'MapConfig{name='serviceTicketsCache', inMemoryFormat=BINARY',
        metadataPolicy=CREATE_ON_UPDATE, backupCount=1, asyncBackupCount=0, 
timeToLiveSeconds=0, maxIdleSeconds=90,
        readBackupData=false, evictionConfig=EvictionConfig{size=85, 
maxSizePolicy=USED_HEAP_PERCENTAGE,
        evictionPolicy=LRU, comparatorClassName=null, comparator=null},
        merkleTree=MerkleTreeConfig{enabled=false, depth=10}, 
eventJournal=EventJournalConfig{enabled=false,
        capacity=10000, timeToLiveSeconds=0}, 
hotRestart=HotRestartConfig{enabled=false, fsync=false},
        nearCacheConfig=null, mapStoreConfig=MapStoreConfig{enabled=false, 
className='null', factoryClassName='null',
        writeDelaySeconds=0, writeBatchSize=1, implementation=null, 
factoryImplementation=null, properties={},
        initialLoadMode=LAZY, writeCoalescing=true}, 
mergePolicyConfig=MergePolicyConfig
        {policy='com.hazelcast.spi.merge.PutIfAbsentMergePolicy', 
batchSize=100}, wanReplicationRef=null,
        entryListenerConfigs=null, indexConfigs=null, attributeConfigs=null, 
splitBrainProtectionName=null,
        queryCacheConfigs=null, cacheDeserializedValues=INDEX_ONLY}' as there 
is already a conflicting configuration
        'MapConfig{name='serviceTicketsCache', inMemoryFormat=BINARY', 
metadataPolicy=CREATE_ON_UPDATE, backupCount=1,
        asyncBackupCount=0, timeToLiveSeconds=0, maxIdleSeconds=10, 
readBackupData=false,
        evictionConfig=EvictionConfig{size=85, 
maxSizePolicy=USED_HEAP_PERCENTAGE, evictionPolicy=LRU,
        comparatorClassName=null, comparator=null}, 
merkleTree=MerkleTreeConfig{enabled=false, depth=10},
        eventJournal=EventJournalConfig{enabled=false, capacity=10000, 
timeToLiveSeconds=0},
        hotRestart=HotRestartConfig{enabled=false, fsync=false}, 
nearCacheConfig=null,
        mapStoreConfig=MapStoreConfig{enabled=false, className='null', 
factoryClassName='null',
        writeDelaySeconds=0, writeBatchSize=1, implementation=null, 
factoryImplementation=null,
        properties={}, initialLoadMode=LAZY, writeCoalescing=true},
        
mergePolicyConfig=MergePolicyConfig{policy='com.hazelcast.spi.merge.PutIfAbsentMergePolicy',
        batchSize=100}, wanReplicationRef=null, entryListenerConfigs=[], 
indexConfigs=[],
        attributeConfigs=[], splitBrainProtectionName=null, 
queryCacheConfigs=[], cacheDeserializedValues=INDEX_ONLY}

        SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error 
deploying web application archive [/path/to/cas.war]
        java.lang.IllegalStateException: Error starting child


-- 
- 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+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/f6fb0857d8ba97c866d07b96ad519d966a3eed3b.camel%40uvic.ca.

Reply via email to