Hello everyone,
I'm still struggling to make my cas.war deploy correctly on a standalone
tomcat. I've tried several things but cannot manage to make it work ... has
explained on the doc, I just have to put the generated cas.war into a
standalone tomcat ...
Apparently between embedded and standalone, the config files are not read
the same way.
I have and application-prod.properties and
application-standalone.properties (the files are identical, just configure
the cas.authn.jdbc.query[0] properties and setting default theme)
application.properties and bootstrap.properties are defaults ones.
1. When I run java -jar cas.war -> application deploy with no errors
2. If I copy cas.war on a standalone tomcat I get an error : Invalid config
server configuration. You need to configure a uri for the git repository.
As Ray respond it's related to spring cloud. BUT in the
bootstrap.properties by DEFAULT there spring cloud is disabled:
# Configuration server is off by default.
spring.cloud.config.enabled=false
During configuration and test process, I never had that error or something
related to spring cloud, never had to configure it.
IF I try to run CAS.war with 'standalone configuration' (using my
application-standalone.properties)
CAS seems to launch : I get the READY message, and then app is trying to
load a second time and I got an error.
Here is the log:
2019-04-23 15:10:19,330 INFO
[org.apereo.cas.web.CasWebApplicationServletInitializer] - <Started
CasWebApplicationServletInitializer in 19.299 seconds (JVM running for
27.906)>
2019-04-23 15:10:19,341 INFO
[org.apereo.cas.support.events.listener.DefaultCasEventListener] - < [36m>
2019-04-23 15:10:19,343 INFO
[org.apereo.cas.support.events.listener.DefaultCasEventListener] - <
____ _____ _ ____ __ __
| _ \ | ____| / \ | _ \ \ \ / /
| |_) | | _| / _ \ | | | | \ V /
| _ < | |___ / ___ \ | |_| | | |
|_| \_\ |_____| /_/ \_\ |____/ |_|
>
2019-04-23 15:10:19,344 INFO
[org.apereo.cas.support.events.listener.DefaultCasEventListener] - < [0m>
2019-04-23 15:10:19,344 INFO
[org.apereo.cas.support.events.listener.DefaultCasEventListener] - <Ready
to process requests @ [2019-04-23T13:10:19.341Z]>
2019-04-23 15:10:19,351 INFO
[org.apereo.cas.CasConfigurationServerServletInitializer] - <Root context
already created (using as parent).>
[36m
____ _ ____ ____ __ _
____
/ ___| / \ / ___| / ___| ___ _ __ / _| (_) __ _ /
___| ___ _ __ __ __ ___ _ __
| | / _ \ \___ \ | | / _ \ | '_ \ | |_ | | / _` |
\___ \ / _ \ | '__| \ \ / / / _ \ | '__|
| |___ / ___ \ ___) | | |___ | (_) | | | | | | _| | | | (_| |
___) | | __/ | | \ V / | __/ | |
\____| /_/ \_\ |____/ \____| \___/ |_| |_| |_| |_| \__, |
|____/ \___| |_| \_/ \___| |_|
|___/
CAS Version: 6.0.3
CAS Commit Id: e456ee778e8d98d3a1c08825fbc1f570bb85419b
CAS Build Date/Time: 2019-04-18T12:46:44Z
Spring Boot Version: 2.1.2.RELEASE
Spring Version: 5.1.3.RELEASE
Java Home: C:\Program Files\Java\jdk-11.0.2
Java Vendor: Oracle Corporation
Java Version: 11.0.2
JVM Free Memory: 198 MB
JVM Maximum Memory: 3 GB
JVM Total Memory: 444 MB
JCE Installed: Yes
Node Version: v8.11.1
NPM Version: N/A
OS Architecture: amd64
OS Name: Windows 10
OS Version: 10.0
OS Date/Time: 2019-04-23T15:10:19.519958100
OS Temp Directory: D:\edhec\web\tomcat\apache-tomcat-9.0.19\temp
------------------------------------------------------------
[0m
2019-04-23 15:10:19,529 INFO
[org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator]
- <Configuration files found at [\etc\cas\config] are [[file
[D:\etc\cas\config\cas.properties]]] under profile(s) [[standalone]]>
2019-04-23 15:10:19,564 INFO
[org.apereo.cas.CasConfigurationServerServletInitializer] - <The following
profiles are active: standalone>
2019-04-23 15:10:22,202 INFO
[org.apereo.cas.ticket.registry.HazelcastTicketRegistry] - <Shutting down
Hazelcast instance [localhost]>
23-Apr-2019 15:10:22.228 SEVERE [main]
org.apache.catalina.startup.HostConfig.deployWAR Erreur lors du
d├®ploiement de l'archive
[D:\edhec\web\tomcat\apache-tomcat-9.0.19\webapps\cas.war] de l'application
web
java.lang.IllegalStateException: Erreur lors du d├®marrage du conteneur
fils
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:716)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:423)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: org.apache.catalina.LifecycleException: Echec de d├®marrage du
composant
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cas]]
at
org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
... 37 more
Caused by: java.lang.IllegalStateException: No Scope registered for scope
name 'refresh'
I'm quite confuse, I've made a lot of apps with spring boot and never add
any problem running embedded tomcat for dev and standalone for prod, the
generated war always run on the standalone tomcat.
I probably miss something but behind all the 'magic' of auto configuration
and overriding, I feel lost and don't really know where to seek.
Thanks for any help :)
--
- 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/d847e391-88c2-4d23-a759-479f2f415623%40apereo.org.