Help starting CAS 5.0.5 Maven Overlay

807 views
Skip to first unread message

Marco Osorio

unread,
May 18, 2017, 7:05:39 AM5/18/17
to CAS Community
Hi,
First of all, excuse me, this is a traslation by Google, my English is poor.

I'm new with CAS. I have read the CAS Overlay documentation with Maven to deploy local version 5.0.5 and configure it with LDAP Active Directory. Version 4.2.7 I configured it by making changes directly in the war, I know that is not the best way to do it, but it worked.

Now I have problems with version 5 and I do not know the operation with spring boot.
According to the tutorials https://apereo.github.io/2017/03/28/cas5-gettingstarted-overlay/ should run without problems with the default values, but I have not been lucky since it generates a mistake to me that it has I specify the uri of the Giro reposirotio and I do not understand it, I think the information is not very clear what should be done. I recognize that I have no experience with the CAS, but there are some things that are taken for granted.
I would appreciate if someone indicated to me what is the minimum that must be had to configure in local (windows) and to make the tests with this version.

I have uploaded the code to a local git and the settings are in the directories that are indicated /etc/cas/config, but apparently it passes from them and does not load them.

When modifying the boostrap.properties file, I modified spring.cloud.config.server.bootstrap = false and at least try to boot, but then it gives the same error requesting to configure the property "environmentRepository". If I leave the value of the property to true which is the default value, the error is immediate.

Thanks in advance for the help, I've been trying to start the CAS for two days and then configure it with LDAP AD.
Thanks in advance.

Annex file with log traces in both cases of property modification
CAS_5.0.5_Build_Overlay_Template

sesharaju sv

unread,
May 18, 2017, 9:20:12 AM5/18/17
to cas-...@apereo.org
Hello Marco,

I see your requirement i m sharing you the my development
configurations with you please go through and change it according to
your requriements & Environments.

In bootstrap.properties you should have to configure


spring.profiles.active=standalone
cas.standalone.config=file:///C:/Users/IBM_ADMIN/Documents/GitHub/cas-config/cas-config


Under the folder which is above mentioned properties you should be
having the below files.

cas.properties
cas.yml

In cas.properties you have to configure the LDAP informations
according to your AD information.

Thanks
Seshu
> --
> - CAS gitter chatroom: https://gitter.im/apereo/cas
> - CAS mailing list guidelines:
> https://apereo.github.io/cas/Mailing-Lists.html
> - CAS documentation website: https://apereo.github.io/cas
> - CAS project website: https://github.com/apereo/cas
> ---
> 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/5eb47454-c897-48b2-8430-dcf91df6bc11%40apereo.org.



--
Venkata S Sadhu (Seshu)
India (Mobile) : +91 7032638062 (WhatsApp)
INDIA
bootstrap.properties
cas.yml
cas.properties

Marco Osorio

unread,
May 18, 2017, 10:08:43 AM5/18/17
to CAS Community
Hi Seshu,
Thanks for the help.
I have modified the bootstrap.properties with the file that you have passed me, I just changed the property cas.standalone.config=file:///C:/opt/applications/cas/conf with this value. I have copied the other files in this same route and still I still generate the same error.
Having the same configuration that you have passed me should throw other errors such as in this property cas.authn.file.filename=file:c:/sravani/tomcat/config/people.txt but it is not.

The value of this property cas.standalone.config should have GitHub or some other repository?

Thanks again


2017-05-18 15:58:30,039 WARN [org.apereo.cas.config.CasSecurityContextConfiguration] - <

 ____   _____   ___   ____   _ 
/ ___| |_   _| / _ \ |  _ \ | |
\___ \   | |  | | | || |_) || |
 ___) |  | |  | |_| ||  __/ |_|
|____/   |_|   \___/ |_|    (_)
                               

CAS is configured to accept a static list of credentials for authentication.
While this is generally useful for demo purposes, it is STRONGLY recommended
that you DISABLE this authentication method (by SETTING 'cas.authn.accept.users'
to a blank value) and switch to a mode that is more suitable for production. 
>
2017-05-18 15:58:30,040 WARN [org.apereo.cas.config.CasSecurityContextConfiguration] - <>
2017-05-18 15:58:30,507 DEBUG [org.apereo.cas.services.ServiceRegistryInitializer] - <Service registry database will be auto-initialized from default JSON services>
2017-05-18 15:58:30,725 DEBUG [org.apereo.cas.services.ServiceRegistryInitializer] - <Initializing service registry database with the id=10000001,name=HTTPS and IMAPS,description=This service
definition authorizes all application urls that support HTTPS and IMAPS protocols.,serviceId=^(https|imaps)://.*,usernameAttributeProvider=org.apereo.cas.services.DefaultRegisteredServiceUsern
ameProvider@d,theme=<null>,evaluationOrder=10000,logoutType=BACK_CHANNEL,attributeReleasePolicy=org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy@4b885323[attributeFilter=<null>,prin
cipalAttributesRepository=org.apereo.cas.authentication.principal.DefaultPrincipalAttributesRepository@4fb7ce8a[],authorizedToReleaseCredentialPassword=false,authorizedToReleaseProxyGrantingTi
cket=false,allowedAttributes=[]],accessStrategy=org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy@ab55918[enabled=true,ssoEnabled=true,requireAllAttributes=true,requiredAttributes
={},unauthorizedRedirectUrl=<null>,caseInsensitive=false,rejectedAttributes={}],publicKey=<null>,proxyPolicy=org.apereo.cas.services.RefuseRegisteredServiceProxyPolicy@32ed6482,logo=<null>,log
outUrl=<null>,requiredHandlers=[],properties={},multifactorPolicy=org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy@4ac74b8e[multifactorAuthenticationProviders=[],failureMode=C
LOSED,principalAttributeNameTrigger=<null>,principalAttributeValueToMatch=<null>],<null> JSON service definition...>
2017-05-18 15:58:30,730 DEBUG [org.apereo.cas.services.ServiceRegistryInitializer] - <Initializing service registry database with the id=10000002,name=Apereo,description=Apereo foundation samp
le service,serviceId=^https://www.apereo.org,usernameAttributeProvider=org.apereo.cas.services.DefaultRegisteredServiceUsernameProvider@d,theme=apereo,evaluationOrder=1,logoutType=BACK_CHANNEL
,attributeReleasePolicy=org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy@6a9aa657[attributeFilter=<null>,principalAttributesRepository=org.apereo.cas.authentication.principal.Defaul
tPrincipalAttributesRepository@3241fd90[],authorizedToReleaseCredentialPassword=false,authorizedToReleaseProxyGrantingTicket=false,allowedAttributes=[]],accessStrategy=org.apereo.cas.services.
DefaultRegisteredServiceAccessStrategy@2128a09d[enabled=true,ssoEnabled=true,requireAllAttributes=true,requiredAttributes={},unauthorizedRedirectUrl=<null>,caseInsensitive=false,rejectedAttrib
utes={}],publicKey=<null>,proxyPolicy=org.apereo.cas.services.RefuseRegisteredServiceProxyPolicy@51c30ace,logo=<null>,logoutUrl=<null>,requiredHandlers=[],properties={},multifactorPolicy=org.a
pereo.cas.services.DefaultRegisteredServiceMultifactorPolicy@6ed4b87c[multifactorAuthenticationProviders=[],failureMode=CLOSED,principalAttributeNameTrigger=<null>,principalAttributeValueToMat
ch=<null>],<null> JSON service definition...>
2017-05-18 15:58:30,740 DEBUG [org.apereo.cas.services.DefaultServicesManagerImpl] - <Loading services from InMemoryServiceRegistryDaoImpl>
2017-05-18 15:58:30,740 DEBUG [org.apereo.cas.services.DefaultServicesManagerImpl] - <Adding registered service ^(https|imaps)://.*>
2017-05-18 15:58:30,740 DEBUG [org.apereo.cas.services.DefaultServicesManagerImpl] - <Adding registered service ^https://www.apereo.org>
2017-05-18 15:58:30,740 INFO [org.apereo.cas.services.DefaultServicesManagerImpl] - <Loaded 2 services from InMemoryServiceRegistryDaoImpl.>
2017-05-18 15:58:37,860 WARN [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] - <Exception encountered during context initialization - cancelling refre
sh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration': Bean instantiatio
n via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.EndpointAutoConfigurat
ion$$EnhancerBySpringCGLIB$$6cc89e6b]: Constructor threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configS
erverHealthIndicator' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration.class]: Unsatisfied dependency expressed through method
'configServerHealthIndicator' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'environmentRepository' defined in class p
ath resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration$GitRepositoryConfiguration.class]: Invocation of init method failed; nested exception is java.la
ng.IllegalStateException: You need to configure a uri for the git repository>
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration': Bean instantiation
 via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.EndpointAutoConfigurati
on$$EnhancerBySpringCGLIB$$6cc89e6b]: Constructor threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configSe
rverHealthIndicator' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration.class]: Unsatisfied dependency expressed through method '
configServerHealthIndicator' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'environmentRepository' defined in class pa
th resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration$GitRepositoryConfiguration.class]: Invocation of init method failed; nested exception is java.lan
g.IllegalStateException: You need to configure a uri for the git repository
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:279)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1148)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
        at org.apereo.cas.web.CasWebApplication.main(CasWebApplication.java:61)
        ... 8 more


Marco Osorio

unread,
May 19, 2017, 4:58:23 AM5/19/17
to CAS Community
Hello Seshu,
I do not understand why this error. I have looked at the tutorials regarding spring-boot applications and according to this tutorial https://spring.io/guides/gs/centralized-configuration/ you should create a directory and initialize it with "git init", etc. And indicate this same path in the property cas.standalone.config but the initialization goes from those values.
Any idea how to fix it?
Thanks again

Marco Osorio

unread,
May 19, 2017, 5:23:56 AM5/19/17
to CAS Community
Hello,

I found the problem. The property to indicate the configuration is not correct, it should be spring.cloud.config.server.git.uri = file://C:/opt/applications/cas/conf and no cas.standalone.config = file:///C:/opt/applications/cas/conf.

Now the error is another, but this is already my account, is the certificate.
Thank you
Reply all
Reply to author
Forward
0 new messages