[cas-dev] CAS 5 RC 2

27 views
Skip to first unread message

David Rodriguez Gonzalez

unread,
Oct 3, 2016, 5:22:22 AM10/3/16
to CAS Developer
Hi guys,

Apologies if this question has been asked and resolved previously, but I can't find it in the forum.

I just cloned the gradle-overlay-template for CAS 5 RC 2, but I'm getting an error:

***************************
APPLICATION FAILED TO START
***************************

Description:

Embedded servlet container failed to start. Port 8443 was already in use.

Action:

Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.


I didn't introduced anything new, just the keystore.

Is it a known issue? Do you know how could I fix it?

Thanks a lot




LOG:

2016-10-03 11:13:17,368 INFO [org.apereo.cas.web.CasWebApplication] - <The following profiles are active: native>
2016-10-03 11:13:32,176 WARN [org.apereo.cas.services.InMemoryServiceRegistryDaoImpl] - <Runtime memory is used as the persistence storage for retrieving and persisting service definitions. Changes that are made to service definitions during runtime WILL be LOST upon container restarts.>
2016-10-03 11:13:32,210 INFO [org.apereo.cas.services.DefaultServicesManagerImpl] - <Loaded 0 services from InMemoryServiceRegistryDaoImpl.>
2016-10-03 11:13:37,542 WARN [org.apereo.cas.config.CasSecurityContextConfiguration] - < [36m>
2016-10-03 11:13:37,546 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.
>
2016-10-03 11:13:37,546 WARN [org.apereo.cas.config.CasSecurityContextConfiguration] - < [0m>
2016-10-03 11:13:38,460 INFO [org.apereo.cas.services.DefaultServicesManagerImpl] - <Loaded 2 services from InMemoryServiceRegistryDaoImpl.>
2016-10-03 11:13:48,443 INFO [org.apereo.cas.configuration.CasConfigurationRebinder] - <Reloaded CAS configuration cas-org.apereo.cas.configuration.CasConfigurationProperties>
2016-10-03 11:13:49,077 INFO [org.apereo.cas.configuration.support.Beans] - <Ticket registry encryption/signing is turned off. This may NOT be safe in a clustered production environment. Consider using other choices to handle encryption, signing and verification of ticket registry tickets.>
2016-10-03 11:13:49,082 WARN [org.apereo.cas.ticket.registry.DefaultTicketRegistry] - <Runtime memory is used as the persistence storage for retrieving and managing tickets. Tickets that are issued during runtime will be LOST upon container restarts. This MAY impact SSO functionality.>
2016-10-03 11:13:49,157 WARN [org.apereo.cas.util.cipher.TicketGrantingCookieCipherExecutor] - <Secret key for encryption is not defined. CAS will attempt to auto-generate the encryption key>
2016-10-03 11:13:49,172 WARN [org.apereo.cas.util.cipher.TicketGrantingCookieCipherExecutor] - <Generated encryption key cokb9YdEAiuzMPi6RxafGPbY3f8ng54rE5XJPylj9DU of size 256. The generated key MUST be added to CAS settings.>
2016-10-03 11:13:49,172 WARN [org.apereo.cas.util.cipher.TicketGrantingCookieCipherExecutor] - <Secret key for signing is not defined. CAS will attempt to auto-generate the signing key>
2016-10-03 11:13:49,172 WARN [org.apereo.cas.util.cipher.TicketGrantingCookieCipherExecutor] - <Generated signing key kLFkL9Ijo8dl0UuRtjsi3M8gH3woP1NmOB89DDIrXEmpTxqrowXEkOm2SWye1ni6Oy-XuEF_jqbewhyNoHTlvg of size 512. The generated key MUST be added to CAS settings.>
2016-10-03 11:13:49,660 WARN [org.apereo.cas.util.cipher.WebflowConversationStateCipherExecutor] - <Secret key for signing is not defined. CAS will attempt to auto-generate the signing key>
2016-10-03 11:13:49,661 WARN [org.apereo.cas.util.cipher.WebflowConversationStateCipherExecutor] - <Generated signing key jUAZNAG7jhIboIxDQ-7RaJUuK2CfrWv9Ee4n0vJ4el-negOjIJUqVwUGI-4i_h2_i28jEfPPGgEaS5XaKxTtYQ of size 512. The generated key MUST be added to CAS settings.>
2016-10-03 11:13:49,661 WARN [org.apereo.cas.util.cipher.WebflowConversationStateCipherExecutor] - <No encryption key is defined. CAS will attempt to auto-generate keys>
2016-10-03 11:13:49,661 WARN [org.apereo.cas.util.cipher.WebflowConversationStateCipherExecutor] - <Generated encryption key CGePfVABJFaMKNsa of size 16. The generated key MUST be added to CAS settings.>
2016-10-03 11:13:52,412 INFO [org.apache.catalina.util.LifecycleBase] - <The stop() method was called on component [StandardServer[-1]] after stop() had already been called. The second call will be ignored.>
2016-10-03 11:13:52,417 WARN [org.apache.catalina.util.LifecycleMBeanBase] - <Failed to unregister MBean with name [Tomcat:type=Connector,port=8080] during component destruction>
javax.management.InstanceNotFoundException: Tomcat:type=Connector,port=8080
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) ~[?:1.8.0_101]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427) ~[?:1.8.0_101]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415) ~[?:1.8.0_101]
at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:546) ~[?:1.8.0_101]
at org.apache.catalina.util.LifecycleMBeanBase.unregister(LifecycleMBeanBase.java:197) ~[tomcat-embed-core-8.5.4.jar!/:8.5.4]
at org.apache.catalina.util.LifecycleMBeanBase.destroyInternal(LifecycleMBeanBase.java:73) ~[tomcat-embed-core-8.5.4.jar!/:8.5.4]
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1083) ~[tomcat-embed-core-8.5.4.jar!/:8.5.4]
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:302) ~[tomcat-embed-core-8.5.4.jar!/:8.5.4]
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:571) ~[tomcat-embed-core-8.5.4.jar!/:8.5.4]
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:302) ~[tomcat-embed-core-8.5.4.jar!/:8.5.4]
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:881) ~[tomcat-embed-core-8.5.4.jar!/:8.5.4]
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:302) ~[tomcat-embed-core-8.5.4.jar!/:8.5.4]
at org.apache.catalina.startup.Tomcat.destroy(Tomcat.java:378) ~[tomcat-embed-core-8.5.4.jar!/:8.5.4]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.stop(TomcatEmbeddedServletContainer.java:278) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.stopAndReleaseEmbeddedServletContainer(EmbeddedWebApplicationContext.java:306) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:125) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) ~[spring-boot-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at org.apereo.cas.web.CasWebApplication.main(CasWebApplication.java:61) ~[cas-server-webapp-init-5.0.0.RC2.jar!/:5.0.0.RC2]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[cas-server-webapp-5.0.0.RC2.war:5.0.0.RC2]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[cas-server-webapp-5.0.0.RC2.war:5.0.0.RC2]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[cas-server-webapp-5.0.0.RC2.war:5.0.0.RC2]
at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) ~[cas-server-webapp-5.0.0.RC2.war:5.0.0.RC2]
2016-10-03 11:13:52,443 ERROR [org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter] - <

***************************
APPLICATION FAILED TO START
***************************

Description:

Embedded servlet container failed to start. Port 8080 was already in use.

Action:

Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
>

--
You received this message because you are subscribed to the Google Groups "CAS Developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-dev+u...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/cas-dev/.

David Rodriguez Gonzalez

unread,
Oct 3, 2016, 6:39:02 AM10/3/16
to CAS Developer
I just try RC3-SNAPSHOT and same problem, but a slightly different error message:

Description:

The Tomcat connector configured to listen on port 8443 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 8443, or configure this application to listen on another port.

David Rodriguez Gonzalez

unread,
Oct 3, 2016, 8:06:55 AM10/3/16
to CAS Developer
Found the issue:
As per documentation "Create a keystore file thekeystore under /etc/cas" the copyConfig task wasn't copying the keystore... Just modified the task to copy all the /etc/cas config

task copyConfig(type: Copy) {
println "Copying configuration to /etc/cas/config"
from "${project.rootDir}/etc/cas"
into '/etc/cas'
}


On Monday, 3 October 2016 11:22:17 UTC+2, David Rodriguez Gonzalez wrote:

David Rodriguez Gonzalez

unread,
Oct 3, 2016, 9:16:02 AM10/3/16
to CAS Developer
Hi everyone,

Having another issue with the overlay. 
I need rest and webflow modules working, but when I add the CAS rest module dependency I get: 
Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter

Do I need to specify any Spring version or another CAS module?

Apologies for this stupid questions...

Chris Thain

unread,
Apr 12, 2017, 12:52:11 PM4/12/17
to CAS Developer
I don't think these are stupid questions. I have the same ones. I get the exact same error when trying to enable the REST protocol in the Maven WAR Overlay so it is either a problem with the CAS build configuration or the CAS documentation. As per the docs I added to my POM:
        <dependency>
          <groupId>org.apereo.cas</groupId>
          <artifactId>cas-server-support-rest</artifactId>
          <version>${cas.version}</version>
          <scope>runtime</scope>
        </dependency>
and did a `mvn clean package spring-boot:run` and the application fails to start with:
java.lang.ClassNotFoundException: org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter

If I remove the cas-server-support-rest dependency from the POM then the CAS server starts and works fine.

Using master branch of Maven WAR Overlay and CAS server 5.0.4
Reply all
Reply to author
Forward
0 new messages