Install Cas 5.2.1 Support SAMLv2 Hostname cannot be null or empty

58 views
Skip to first unread message

jabang konate

unread,
Jan 27, 2018, 5:03:57 AM1/27/18
to CAS Community
hi all.

im trying to configure cas 5.2.1 to act as ane identity provider. i have follow this site to configure samlv2.
https://dacurry-tns.github.io/deploying-apereo-cas/building_server_saml_overview.html, .

but im having troubles when i deploy cas, heres the following error.

27-Jan-2018 16:44:22.760 INFO [localahost-startStop-1] org.apache.catalina.core.ApplicationContext.log 2 Spring WebApplicationInitializers detected on classpath
27-Jan-2018 16:44:44.508 SEVERE [localahost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localahost].StandardContext[/cas]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1141)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'samlIdPConfiguration': Unsatisfied dependency expressed through field 'casSamlIdPMetadataResolver'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibbolethIdpMetadataAndCertificatesGenerationService': Invocation of init method failed; nested exception is java.lang.RuntimeException: Hostname cannot be null or empty
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
        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:761)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
        at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:154)
        at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:134)
        at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:87)
        at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 10 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibbolethIdpMetadataAndCertificatesGenerationService': Invocation of init method failed; nested exception is java.lang.RuntimeException: Hostname cannot be null or empty

the log file said "java.lang.RuntimeException: Hostname cannot be null or empty", i already define my hostname for configuration idp in cas.properties.
my configuration:

cas.properties.
cas.authn.samlIdp.entityId=             ${cas.server.prefix}/idp
cas.authn.samlIdp.hostName=             dev-login
cas.authn.samlIdp.scope=                myuniversity.com

is it hostname for samlIdp or something else.?
Can anyone suggest me where the problem is?



jabang konate

unread,
Jan 31, 2018, 1:44:39 AM1/31/18
to cas-...@apereo.org
hi. any advice for this problem?

--
- 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/f68bf643-a2e4-4c41-b193-b5bcf6e9007d%40apereo.org.

Bergner, Arnold

unread,
Jan 31, 2018, 1:52:32 AM1/31/18
to cas-...@apereo.org

--

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

 

--

- 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/CAOy9JZPy-0enEY-%3Dvgs%3DfEuiudrZzKcijhD5X38%2BixMHAjY8dA%40mail.gmail.com.

jabang konate

unread,
Jan 31, 2018, 4:09:34 AM1/31/18
to cas-...@apereo.org
thanks for your fast response barner,
now cas success deploy, that was my bad im forgot one "/" at cas.server.prefix.
but the problem occurs cas web page is blank,
here my cas.properties


cas.properties

Bergner, Arnold

unread,
Jan 31, 2018, 4:39:44 AM1/31/18
to cas-...@apereo.org

If there’s no more Exception in the logs I guess you should check that your servlet container (e.g. tomcat) is doing what you expect.

 

Von: cas-...@apereo.org [mailto:cas-...@apereo.org] Im Auftrag von jabang konate
Gesendet: Mittwoch, 31.
Januar 2018 10:09
An: cas-...@apereo.org
Betreff: Re: [cas-user] Install Cas 5.2.1 Support SAMLv2 Hostname cannot be null or empty

 

thanks for your fast response barner,

here my cas.properties

 

--
- 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

Reply all
Reply to author
Forward
0 new messages