how to configure cas to load cas.properties from dynamo db

87 views
Skip to first unread message

Raheem Shaik

unread,
Nov 7, 2019, 2:34:53 PM11/7/19
to CAS Community, col...@caveo.ca
Any idea how we can configure cas to load cas.properties (hazelcast) from dynamodb 

Ray Bon

unread,
Nov 14, 2019, 6:23:13 PM11/14/19
to cas-...@apereo.org, col...@caveo.ca

On Thu, 2019-11-07 at 11:34 -0800, Raheem Shaik wrote:
Any idea how we can configure cas to load cas.properties (hazelcast) from dynamodb 

********************************************

 

Inmar Confidentiality Note:  This e-mail and any attachments are confidential and intended to be viewed and used solely by the intended recipient.  If you are not the intended recipient, be aware that any disclosure, dissemination, distribution, copying or use of this e-mail or any attachment is prohibited.  If you received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy and all attachments from your system and destroy any printed copies.  Thank you for your cooperation.

 

Notice of Protected Rights:  The removal of any copyright, trademark, or proprietary legend contained in this e-mail or any attachment is prohibited without the express, written permission of Inmar, Inc.  Furthermore, the intended recipient must maintain all copyright notices, trademarks, and proprietary legends within this e-mail and any attachments in their original form and location if the e-mail or any attachments are reproduced, printed or distributed.

 

********************************************

-- 
Ray Bon
Programmer Analyst
Development Services, University Systems

I respectfully acknowledge that my place of work is located within the ancestral, traditional and unceded territory of the Songhees, Esquimalt and WSÁNEĆ Nations.

Raheem Shaik

unread,
Nov 17, 2019, 11:06:15 PM11/17/19
to cas-...@apereo.org, col...@caveo.ca
Hi Ray,

We  are using CAS version 5.3.10 and followed the steps which you are provided but i am getting below error

2019-11-18 03:54:31,865 INFO [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] - <Configuration files found at [/etc/cas/config] are [[/etc/cas/config/cas.properties]] under profile(s) [[standalone]]>
2019-11-18 03:54:31,929 INFO [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] - <Located property source: CompositePropertySource [name='casCompositePropertySource', propertySources=[PropertiesPropertySource {name='applicationProfilesProperties'}, PropertiesPropertySource {name='embeddedYamlOverriddenProperties'}]]>
2019-11-18 03:54:33,442 ERROR [org.apereo.cas.config.DynamoDbCloudConfigBootstrapConfiguration] - <null>
java.lang.NullPointerException: null
        at org.apereo.cas.config.DynamoDbCloudConfigBootstrapConfiguration.locate(DynamoDbCloudConfigBootstrapConfiguration.java:68) ~[cas-server-support-configuration-cloud-dynamodb-5.3.10.jar!/:5.3.10]
        at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:93) ~[spring-cloud-context-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
        at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:567) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:338) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:301) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.apereo.cas.web.CasWebApplication.main(CasWebApplication.java:71) ~[cas-server-webapp-init-5.3.10.jar!/:5.3.10]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) ~[cas.war:5.3.10]
2019-11-18 03:54:33,447 INFO [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] - <Located property source: PropertiesPropertySource {name='DynamoDbCloudConfigBootstrapConfiguration$$EnhancerBySpringCGLIB$$d6f1e7c3'}>
2019-11-18 03:54:33,613 INFO [org.apereo.cas.web.CasWebApplication] - <The following profiles are active: standalone>
2019-11-18 03:54:33,702 INFO [org.apereo.cas.web.CasWebApplicationContext] - <Refreshing CasWebApplicationContext()>
2019-11-18 03:54:33,712 DEBUG [org.apereo.cas.web.CasWebApplicationContext] - <Bean factory for org.apereo.cas.web.CasWebApplicationContext@f5958c9: org.springframework.beans.factory.support.DefaultListableBeanFactory@55b53d44: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,casWebApplication]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@78ac1102>
2019-11-18 03:54:35,307 DEBUG [com.amazonaws.http.IdleConnectionReaper] - <Reaper thread: >
java.lang.InterruptedException: sleep interrupted
        at java.lang.Thread.sleep(Native Method) [?:1.8.0_131]
        at com.amazonaws.http.IdleConnectionReaper.run(IdleConnectionReaper.java:181) ~[aws-java-sdk-core-1.11.332.jar!/:?]
2019-11-18 03:54:35,307 DEBUG [com.amazonaws.http.IdleConnectionReaper] - <Shutting down reaper thread.>

Cas.properties:
cas.server.name: https://test.<domain>
cas.server.prefix: https://test.<domain>/cas


logging.config: file:/etc/cas/config/log4j2.xml

cas.authn.accept.users=casuser::Mellon


cas.spring.cloud.dynamodb.credentialAccessKey= xxxxxx
cas.spring.cloud.dynamodb.credentialSecretKey= xxxxxx
cas.spring.cloud.dynamodb.endpoint=http://localhost:8000
#cas.spring.cloud.dynamodb.localAddress=
cas.spring.cloud.dynamodb.region=US_EAST_1
#cas.spring.cloud.dynamodb.regionOverride=

cas.spring.cloud.dynamoDb.readCapacity=10
cas.spring.cloud.dynamoDb.writeCapacity=10
cas.spring.cloud.dynamoDb.connectionTimeout=5000
cas.spring.cloud.dynamoDb.requestTimeout=5000
cas.spring.cloud.dynamoDb.socketTimeout=5000
cas.spring.cloud.dynamoDb.useGzip=false
cas.spring.cloud.dynamoDb.useReaper=false
cas.spring.cloud.dynamoDb.useThrottleRetries=false
cas.spring.cloud.dynamoDb.useTcpKeepAlive=false
cas.spring.cloud.dynamoDb.protocol=HTTPS
cas.spring.cloud.dynamoDb.clientExecutionTimeout=10000
cas.spring.cloud.dynamoDb.cacheResponseMetadata=false
cas.spring.cloud.dynamoDb.maxConnections=10

cas.serviceRegistry.json.location=file:///etc/cas/services

I have added dependency in POM.XML

<dependency>
     <groupId>org.apereo.cas</groupId>
     <artifactId>cas-server-support-configuration-cloud-dynamodb</artifactId>
     <version>${cas.version}</version>
</dependency>

Let me know if i need to add any other settings on cas.properties from my end.

Regards,
Raheem Shaik 

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

Andy Ng

unread,
Nov 17, 2019, 11:19:25 PM11/17/19
to CAS Community, col...@caveo.ca
Hi Raheem,


Which seems to be preventTableCreationOnStartup property not being initialzied by default


cas.spring.cloud.dynamoDb.preventTableCreationOnStartup=false

See if this will fix the problem... If it does fix it, then maybe a fix should be made to address this issue.

Cheers!
- Andy


Raheem Shaik

unread,
Nov 18, 2019, 1:28:55 AM11/18/19
to cas-...@apereo.org, col...@caveo.ca
Hi Andy,

I have added  'cas.spring.cloud.dynamoDb.preventTableCreationOnStartup=false' to my cas.properties but still getting error

2019-11-18 06:26:51,472 INFO [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] - <Configuration files found at [/etc/cas/config] are [[/etc/cas/config/cas.properties]] under profile(s) [[standalone]]>
2019-11-18 06:26:51,534 INFO [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] - <Located property source: CompositePropertySource [name='casCompositePropertySource', propertySources=[PropertiesPropertySource {name='applicationProfilesProperties'}, PropertiesPropertySource {name='embeddedYamlOverriddenProperties'}]]>
2019-11-18 06:26:52,964 ERROR [org.apereo.cas.config.DynamoDbCloudConfigBootstrapConfiguration] - <null>

java.lang.NullPointerException: null
        at org.apereo.cas.config.DynamoDbCloudConfigBootstrapConfiguration.locate(DynamoDbCloudConfigBootstrapConfiguration.java:68) ~[cas-server-support-configuration-cloud-dynamodb-5.3.10.jar!/:5.3.10]
        at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:93) ~[spring-cloud-context-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
        at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:567) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:338) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:301) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.apereo.cas.web.CasWebApplication.main(CasWebApplication.java:71) ~[cas-server-webapp-init-5.3.10.jar!/:5.3.10]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) ~[cas.war:5.3.10]
2019-11-18 06:26:52,971 INFO [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] - <Located property source: PropertiesPropertySource {name='DynamoDbCloudConfigBootstrapConfiguration$$EnhancerBySpringCGLIB$$d6f1e7c3'}>
2019-11-18 06:26:53,137 INFO [org.apereo.cas.web.CasWebApplication] - <The following profiles are active: standalone>
2019-11-18 06:26:53,237 INFO [org.apereo.cas.web.CasWebApplicationContext] - <Refreshing CasWebApplicationContext()>
2019-11-18 06:26:53,248 DEBUG [org.apereo.cas.web.CasWebApplicationContext] - <Bean factory for org.apereo.cas.web.CasWebApplicationContext@f5958c9: org.springframework.beans.factory.support.DefaultListableBeanFactory@55b53d44: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,casWebApplication]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@78ac1102>
2019-11-18 06:26:54,764 DEBUG [com.amazonaws.http.IdleConnectionReaper] - <Reaper thread: >

java.lang.InterruptedException: sleep interrupted
        at java.lang.Thread.sleep(Native Method) [?:1.8.0_131]
        at com.amazonaws.http.IdleConnectionReaper.run(IdleConnectionReaper.java:181) ~[aws-java-sdk-core-1.11.332.jar!/:?]

2019-11-18 06:26:54,764 DEBUG [com.amazonaws.http.IdleConnectionReaper] - <Shutting down reaper thread.>
2019-11-18 06:27:01,203 WARN [org.apereo.cas.web.CasWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casBeanValidationPostProcessor' defined in class path resource [org/apereo/cas/config/CasCoreUtilConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casCoreTicketsConfiguration': Unsatisfied dependency expressed through field 'casProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cas-org.apereo.cas.configuration.CasConfigurationProperties': Could not bind properties to CasConfigurationProperties (prefix=cas, ignoreInvalidFields=false, ignoreUnknownFields=false, ignoreNestedProperties=false); nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'spring[cloud][dynamoDb][dynamoDb][preventTableCreationOnStartup]' of bean class [org.apereo.cas.configuration.CasConfigurationProperties]: Cannot access indexed value in property referenced in indexed property path 'spring[cloud][dynamoDb][dynamoDb][preventTableCreationOnStartup]'; nested exception is org.springframework.beans.NotReadablePropertyException: Invalid property 'spring[cloud][dynamoDb][dynamoDb][preventTableCreationOnStartup]' of bean class [org.apereo.cas.configuration.CasConfigurationProperties]: Bean property 'spring[cloud][dynamoDb][dynamoDb][preventTableCreationOnStartup]' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?>


Regards,
Raheem Shaik

--
- 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+u...@apereo.org.

Andy Ng

unread,
Nov 18, 2019, 1:45:31 AM11/18/19
to CAS Community, col...@caveo.ca
Hi Raheem,

Something seems weird about this line:

 Invalid property 'spring[cloud][dynamoDb][dynamoDb][preventTableCreationOnStartup]' 

I think there should be only one [dynamoDB], and not two.

Can you show us your newly updated cas.properties? See it is configured correctly.

- Andy

Raheem Shaik

unread,
Nov 18, 2019, 1:58:49 AM11/18/19
to cas-...@apereo.org, col...@caveo.ca
Hi Andy,

Sorry, now i have corrected 'cas.spring.cloud.dynamoDb.preventTableCreationOnStartup' 

cas.server.name: https://test.<domain>
cas.server.prefix: https://test.<domain>/cas


logging.config: file:/etc/cas/config/log4j2.xml

cas.authn.accept.users=casuser::Mellon

cas.spring.cloud.dynamodb.credentialAccessKey=xxxxxx
cas.spring.cloud.dynamodb.credentialSecretKey=xxxxxxx
cas.spring.cloud.dynamodb.endpoint=http://localhost:8000
cas.spring.cloud.dynamodb.region=US_EAST_1

cas.spring.cloud.dynamoDb.preventTableCreationOnStartup=false


cas.spring.cloud.dynamoDb.readCapacity=10
cas.spring.cloud.dynamoDb.writeCapacity=10
cas.spring.cloud.dynamoDb.connectionTimeout=5000
cas.spring.cloud.dynamoDb.requestTimeout=5000
cas.spring.cloud.dynamoDb.socketTimeout=5000
cas.spring.cloud.dynamoDb.useGzip=false
cas.spring.cloud.dynamoDb.useReaper=false
cas.spring.cloud.dynamoDb.useThrottleRetries=false
cas.spring.cloud.dynamoDb.useTcpKeepAlive=false
cas.spring.cloud.dynamoDb.protocol=HTTPS
cas.spring.cloud.dynamoDb.clientExecutionTimeout=10000
cas.spring.cloud.dynamoDb.cacheResponseMetadata=false
cas.spring.cloud.dynamoDb.maxConnections=10


2019-11-18 06:49:39,100 INFO [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] - <Configuration files found at [/etc/cas/config] are [[/etc/cas/config/cas.properties]] under profile(s) [[standalone]]>
2019-11-18 06:49:39,174 INFO [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] - <Located property source: CompositePropertySource [name='casCompositePropertySource', propertySources=[PropertiesPropertySource {name='applicationProfilesProperties'}, PropertiesPropertySource {name='embeddedYamlOverriddenProperties'}]]>
2019-11-18 06:49:40,610 ERROR [org.apereo.cas.config.DynamoDbCloudConfigBootstrapConfiguration] - <null>

java.lang.NullPointerException: null
        at org.apereo.cas.config.DynamoDbCloudConfigBootstrapConfiguration.locate(DynamoDbCloudConfigBootstrapConfiguration.java:68) ~[cas-server-support-configuration-cloud-dynamodb-5.3.10.jar!/:5.3.10]
        at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:93) ~[spring-cloud-context-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
        at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:567) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:338) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:301) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.apereo.cas.web.CasWebApplication.main(CasWebApplication.java:71) ~[cas-server-webapp-init-5.3.10.jar!/:5.3.10]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) ~[cas.war:5.3.10]
2019-11-18 06:49:40,615 INFO [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] - <Located property source: PropertiesPropertySource {name='DynamoDbCloudConfigBootstrapConfiguration$$EnhancerBySpringCGLIB$$d6f1e7c3'}>
2019-11-18 06:49:40,758 INFO [org.apereo.cas.web.CasWebApplication] - <The following profiles are active: standalone>
2019-11-18 06:49:40,871 INFO [org.apereo.cas.web.CasWebApplicationContext] - <Refreshing CasWebApplicationContext()>
2019-11-18 06:49:40,881 DEBUG [org.apereo.cas.web.CasWebApplicationContext] - <Bean factory for org.apereo.cas.web.CasWebApplicationContext@f5958c9: org.springframework.beans.factory.support.DefaultListableBeanFactory@55b53d44: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,casWebApplication]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@78ac1102>
2019-11-18 06:49:42,359 DEBUG [com.amazonaws.http.IdleConnectionReaper] - <Reaper thread: >

java.lang.InterruptedException: sleep interrupted
        at java.lang.Thread.sleep(Native Method) [?:1.8.0_131]
        at com.amazonaws.http.IdleConnectionReaper.run(IdleConnectionReaper.java:181) ~[aws-java-sdk-core-1.11.332.jar!/:?]
2019-11-18 06:49:42,359 DEBUG [com.amazonaws.http.IdleConnectionReaper] - <Shutting down reaper thread.>
2019-11-18 06:49:48,850 WARN [org.apereo.cas.web.CasWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casBeanValidationPostProcessor' defined in class path resource [org/apereo/cas/config/CasCoreUtilConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casCoreTicketsConfiguration': Unsatisfied dependency expressed through field 'casProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cas-org.apereo.cas.configuration.CasConfigurationProperties': Could not bind properties to CasConfigurationProperties (prefix=cas, ignoreInvalidFields=false, ignoreUnknownFields=false, ignoreNestedProperties=false); nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'spring[cloud][dynamoDb][protocol]' of bean class [org.apereo.cas.configuration.CasConfigurationProperties]: Cannot access indexed value in property referenced in indexed property path 'spring[cloud][dynamoDb][protocol]'; nested exception is org.springframework.beans.NotReadablePropertyException: Invalid property 'spring[cloud][dynamoDb][protocol]' of bean class [org.apereo.cas.configuration.CasConfigurationProperties]: Bean property 'spring[cloud][dynamoDb][protocol]' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?>

Regards,
Raheem Shaik

--
- 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+u...@apereo.org.

Andy Ng

unread,
Nov 18, 2019, 2:11:24 AM11/18/19
to CAS Community, col...@caveo.ca
Hi Raheem,

No need to be sorry, we are learning together :)

It is very hard for me to help debug your problem, due to the fact that I don't have AWS account and I am out of credit card for AWS free tier :(

Can you help try something, instead of:
============================
cas.server.namehttps://test.<domain>
cas.server.prefix: https://test.<domain>/cas


logging.config: file:/etc/cas/config/log4j2.xml

cas.authn.accept.users=casuser::Mellon

cas.spring.cloud.dynamodb.credentialAccessKey=xxxxxx
cas.spring.cloud.dynamodb.credentialSecretKey=xxxxxxx
cas.spring.cloud.dynamodb.endpoint=http://localhost:8000
cas.spring.cloud.dynamodb.region=US_EAST_1

cas.spring.cloud.dynamoDb.preventTableCreationOnStartup=false


cas.spring.cloud.dynamoDb.readCapacity=10
cas.spring.cloud.dynamoDb.writeCapacity=10
cas.spring.cloud.dynamoDb.connectionTimeout=5000
cas.spring.cloud.dynamoDb.requestTimeout=5000
cas.spring.cloud.dynamoDb.socketTimeout=5000
cas.spring.cloud.dynamoDb.useGzip=false
cas.spring.cloud.dynamoDb.useReaper=false
cas.spring.cloud.dynamoDb.useThrottleRetries=false
cas.spring.cloud.dynamoDb.useTcpKeepAlive=false
cas.spring.cloud.dynamoDb.protocol=HTTPS
cas.spring.cloud.dynamoDb.clientExecutionTimeout=10000
cas.spring.cloud.dynamoDb.cacheResponseMetadata=false
cas.spring.cloud.dynamoDb.maxConnections=10
============================

Can you help reduce the unnecessary properties, so it is more clear like this:
============================
cas.server.prefix: https://test.<domain>/cas


logging.config: file:/etc/cas/config/log4j2.xml

cas.authn.accept.users=casuser::Mellon

cas.spring.cloud.dynamoDb.credentialAccessKey=xxxxxx
cas.spring.cloud.dynamoDb.credentialSecretKey=xxxxxxx
cas.spring.cloud.dynamoDb.endpoint=http://localhost:8000
cas.spring.cloud.dynamoDb.region=US_EAST_1
cas.spring.cloud.dynamoDb.preventTableCreationOnStartup=false
============================

Also, making very sure that it is dynamoDb instead of dynamodb, the upper letter might matter.

Let see if the error still occurs if you configured it like this....

Cheers!
- Andy



Raheem Shaik

unread,
Nov 18, 2019, 2:49:30 AM11/18/19
to cas-...@apereo.org, col...@caveo.ca
Hi Andy,

Thanks for helping me out on this issue.

I tried the steps which provided by you but still i am getting error 

2019-11-18 07:42:31,665 INFO [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] - <Configuration files found at [/etc/cas/config] are [[/etc/cas/config/cas.properties]] under profile(s) [[standalone]]>
2019-11-18 07:42:31,735 INFO [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] - <Located property source: CompositePropertySource [name='casCompositePropertySource', propertySources=[PropertiesPropertySource {name='applicationProfilesProperties'}, PropertiesPropertySource {name='embeddedYamlOverriddenProperties'}]]>
2019-11-18 07:42:33,084 ERROR [org.apereo.cas.config.DynamoDbCloudConfigBootstrapConfiguration] - <null>

java.lang.NullPointerException: null
        at org.apereo.cas.config.DynamoDbCloudConfigBootstrapConfiguration.locate(DynamoDbCloudConfigBootstrapConfiguration.java:68) ~[cas-server-support-configuration-cloud-dynamodb-5.3.10.jar!/:5.3.10]
        at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:93) ~[spring-cloud-context-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
        at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:567) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:338) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:301) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) ~[spring-boot-1.5.18.RELEASE.jar!/:1.5.18.RELEASE]
        at org.apereo.cas.web.CasWebApplication.main(CasWebApplication.java:71) ~[cas-server-webapp-init-5.3.10.jar!/:5.3.10]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[cas.war:5.3.10]
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) ~[cas.war:5.3.10]
2019-11-18 07:42:33,090 INFO [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration] - <Located property source: PropertiesPropertySource {name='DynamoDbCloudConfigBootstrapConfiguration$$EnhancerBySpringCGLIB$$d6f1e7c3'}>
2019-11-18 07:42:33,329 DEBUG [com.amazonaws.http.IdleConnectionReaper] - <Reaper thread: >

java.lang.InterruptedException: sleep interrupted
        at java.lang.Thread.sleep(Native Method) [?:1.8.0_131]
        at com.amazonaws.http.IdleConnectionReaper.run(IdleConnectionReaper.java:181) ~[aws-java-sdk-core-1.11.332.jar!/:?]
2019-11-18 07:42:33,329 DEBUG [com.amazonaws.http.IdleConnectionReaper] - <Shutting down reaper thread.>
2019-11-18 07:42:33,364 INFO [org.apereo.cas.web.CasWebApplication] - <The following profiles are active: standalone>
2019-11-18 07:42:33,478 INFO [org.apereo.cas.web.CasWebApplicationContext] - <Refreshing CasWebApplicationContext()>
2019-11-18 07:42:33,487 DEBUG [org.apereo.cas.web.CasWebApplicationContext] - <Bean factory for org.apereo.cas.web.CasWebApplicationContext@f5958c9: org.springframework.beans.factory.support.DefaultListableBeanFactory@55b53d44: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,casWebApplication]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@78ac1102>
2019-11-18 07:42:41,104 WARN [org.apereo.cas.web.CasWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casBeanValidationPostProcessor' defined in class path resource [org/apereo/cas/config/CasCoreUtilConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casCoreTicketsConfiguration': Unsatisfied dependency expressed through field 'casProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cas-org.apereo.cas.configuration.CasConfigurationProperties': Could not bind properties to CasConfigurationProperties (prefix=cas, ignoreInvalidFields=false, ignoreUnknownFields=false, ignoreNestedProperties=false); nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'spring[cloud][dynamoDb][preventTableCreationOnStartup]' of bean class [org.apereo.cas.configuration.CasConfigurationProperties]: Cannot access indexed value in property referenced in indexed property path 'spring[cloud][dynamoDb][preventTableCreationOnStartup]'; nested exception is org.springframework.beans.NotReadablePropertyException: Invalid property 'spring[cloud][dynamoDb][preventTableCreationOnStartup]' of bean class [org.apereo.cas.configuration.CasConfigurationProperties]: Bean property 'spring[cloud][dynamoDb][preventTableCreationOnStartup]' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ubuntu@ip-x-x-x-x:~/dynamodb/ebt_platform_cas/src$ cat cas.properties
cas.server.name: https://test.<domain>/

cas.server.prefix: https://test.<domain>/cas


logging.config: file:/etc/cas/config/log4j2.xml

cas.authn.accept.users=casuser::Mellon

cas.spring.cloud.dynamoDb.credentialAccessKey=xxxxxx
cas.spring.cloud.dynamoDb.credentialSecretKey=xxxxxx
cas.spring.cloud.dynamoDb.endpoint=http://localhost:8000
cas.spring.cloud.dynamoDb.region=US_EAST_1
cas.spring.cloud.dynamoDb.preventTableCreationOnStartup=false


Regards,
Raheem Shaik

--
- 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+u...@apereo.org.

Andy Ng

unread,
Nov 18, 2019, 3:18:36 AM11/18/19
to CAS Community, col...@caveo.ca
Hi Raheem,

Ok, let try something else.

Where are you putting your configuration? inside cas.properties?

Can you try putting it inside boostrap.properties?
1. Create a file in src/main/resources/bootstrap.properties
2. Add your dynamo db config inside it:
cas.spring.cloud.dynamodb.credentialAccessKey=xxx
cas.spring.cloud.dynamodb.credentialSecretKey=xxx

cas.spring.cloud.dynamodb.endpoint=http://localhost:8000
cas.spring.cloud.dynamodb.region=US_EAST_1

3. Restart your CAS
4. And if failed, try adding back preventTableCreationOnStartup=false
5. I think dynamodb should be lowercase for it to work... Please try both lower case dynamodb and dynamoDb and see if which one would work...

I am out of idea after this, if this doesn't work then maybe other more people with experience on DynamoDb can help you out...

- Andy


Reply all
Reply to author
Forward
0 new messages