6.2.x Gradle Compilation

1,299 views
Skip to first unread message

Jérémie Pilette

unread,
Jan 2, 2020, 7:56:57 AM1/2/20
to CAS Community
Hi everybody,
I have a problem with my first compilation of cas-overlay-template (6.2.x)

Here this is  my messages :

FAILURE: Build failed with an exception.
A problem occurred evaluating root project 'cas'.
> Could not resolve all artifacts for configuration 'classpath'.
   > Could not find org.apereo.cas:cas-server-core-api-configuration-model:6.2.0-SNAPSHOT.
[...]
Could not find org.apereo.cas:cas-server-core-configuration-metadata-repository:6.2.0-SNAPSHOT.
     Searched in the following locations:
[...]


Do you have an idea please ?

Jérémie

Dmitriy Kopylenko

unread,
Jan 2, 2020, 8:24:48 AM1/2/20
to cas-...@apereo.org
Hi there.

Change version of CAS to 6.2 RC2 in gradle.properties like so:

cas.version=6.2.0-RC2

Best,
D.
--
- 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/5f89af02-21ff-4d66-82ca-73474ffb4b52%40apereo.org.

Jérémie Pilette

unread,
Jan 2, 2020, 2:47:52 PM1/2/20
to CAS Community, dkopy...@unicon.net
Hi Dmitriy,
thank you.
Now I have another ailed :

> Task :run FAILED


FAILURE: Build failed with an exception.

* Where:
Script '/home/USER/bin/cas-overlay-template/gradle/tasks.gradle' line: 57

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings

Thank you,
Jérémie


Le jeudi 2 janvier 2020 14:24:48 UTC+1, Dmitriy Kopylenko a écrit :
Hi there.

Change version of CAS to 6.2 RC2 in gradle.properties like so:

cas.version=6.2.0-RC2

Best,
D.

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

Dmitriy Kopylenko

unread,
Jan 2, 2020, 2:59:28 PM1/2/20
to CAS Community
You might want to run it with —info or —debug flag to see what might be failing, like so:

./gradlew run —info

or build and run as two separate steps:

./gradlew clean build
java -jar build/libs/cas.war

D.

This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.


=
Message has been deleted

Ray Bon

unread,
Jan 29, 2020, 7:19:46 PM1/29/20
to cas-...@apereo.org
Tom,

I think if you are running the release candidates, check https://github.com/apereo/cas/blob/master/gradle.properties to see what master is set at.
Try 6.2.0-SNAPSHOT

Ray

On Wed, 2020-01-29 at 13:35 -0800, Tom Healey wrote:
Hi all,
I am trying to modify the overlay from

from the CAS overlay directory that i downloaded from  gitbub.


I have changed my gradle.properties
to cas.version=6.2.0-RC2
(I copied it right from the posting. )

and I get:

Could not resolve org.apereo.cas:cas-server-core-api-configuration-model:6.2.0-RC2.

I am running ./gradlew from the command line.

When I run it from the docker-build file it works but I can't use that all the time. I want to configure the CAS war to suit my needs and I think I need to do that with gradlew.
I looked through the docker build to see if I could reverse engineer it to get the right things in place so it can find what it needs to run from the command line with ./gradlew only.

Thanks,
Tom
-- 
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.

Tom Healey

unread,
Jan 31, 2020, 10:28:14 AM1/31/20
to CAS Community

Ray,
Thanks for the quick response. 

Some of that follows is a repeat but I am rewriting for clarity, I hope. Sorry.

I am working from this project:
as I am trying to build a docker image of the CAS war eventually.

Running the ./docker-build.sh task successfully builds the war and the docker image but only after I changed the cas.version property to 6.2.0-RC2.

Background:
When I used what was container build in the gradle.preperties file in the repo ( 6.2.0-SNAPSHOT) it would fail.  It wasn’t until I changed cas.version property to 6.2.0-RC2 that it worked because 6.2.0-SNAPSHOT doesn’t exist in the maven repo, I am assuming.

Current problem:
I am trying to modify this CAS overlay for my own needs and am trying to build the war without building the docker image to speed up development. It takes 10 mins to build the image on my machine because a fair bit of the time it downloads the gradle version specified in the build event though it exists on my machine already.
When I run ./gradlew it fails with this error:
could not resolve org.apereo.cas:cas-server-core-api-configuration-model:6.2.0-RC2.

again it doesn’t fail when building under docker.



Any thoughts?

Tom

Ray Bon

unread,
Jan 31, 2020, 12:46:54 PM1/31/20
to cas-...@apereo.org
Tom,

I have only recently started working with the docker build process, so not an expert.
You should be able to see in the build log where gradle is looking for the packages (may need to turn of gradle output). You can then browse those locations to see what is there.

If you are intending to pull a completed war into a docker, could you use 6.1.x version?
Since it is officially released, the packages should all be there. It may be that some of 6.2.x has not been pushed.

Ray

Tom Healey

unread,
Jan 31, 2020, 2:12:23 PM1/31/20
to CAS Community
Ray,
Again thanks for the quick response.
I COULD use 6.1.3. I switched to the 6.1 branch and was able to successfully build the war.
THANKS!!!!!

Could you point me to some resources on how to work with the CAS overlay?
I DOCs aren't as helpful to me as I need and this is my first time working with the overlays.

Thanks again.
Tom

Dmitriy Kopylenko

unread,
Jan 31, 2020, 2:20:46 PM1/31/20
to cas-...@apereo.org
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/e47d9581-76c8-48ad-b242-827231098026%40apereo.org.

Ray Bon

unread,
Jan 31, 2020, 2:41:49 PM1/31/20
to cas-...@apereo.org

Tom Healey

unread,
Jan 31, 2020, 6:52:57 PM1/31/20
to cas-...@apereo.org
Thanks Ray!

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/4dd2efa5007b513fd2b26616919d51f6ac3b029c.camel%40uvic.ca.

Tom Healey

unread,
Feb 1, 2020, 9:54:43 AM2/1/20
to cas-...@apereo.org
Thanks Dmitriy!
Tom

Jérémie Pilette

unread,
Feb 9, 2020, 6:29:13 AM2/9/20
to CAS Community, dkopy...@unicon.net
Hello,

Thanks for your response.
I come back to (try) to finished my installation...

I have succeed in compiling, but I have an error when I try to deploy on tomcat9.

First, is that possible to use Tomcat-9.0.16 knowing that in gradle.properties it is written tomcatVersion=9.0.30 (On debian package)?

Secondly, this is what I have with  ./gradlew run —info

./gradlew run info

FAILURE
: Build failed with an exception.

* What went wrong:
Task '—info' not found in root project 'cas'.

* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.


* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.

Jérémie


Le jeudi 2 janvier 2020 20:59:28 UTC+1, Dmitriy Kopylenko a écrit :
You might want to run it with —info or —debug flag to see what might be failing, like so:

./gradlew run —info

or build and run as two separate steps:

./gradlew clean build
java -jar build/libs/cas.war

D.

From: Jérémie Pilette <jerem...@gmail.com>
Reply: Jérémie Pilette <jerem...@gmail.com>
Message has been deleted

Jérémie Pilette

unread,
Feb 9, 2020, 8:04:41 AM2/9/20
to CAS Community, dkopy...@unicon.net
Sorry for the secondly part of my previous message.
It was not the good command line.

With the good command line I have this :

[...]
2020-02-09 12:54:49,372 ERROR [org.apereo.cas.configuration.CasConfigurationPropertiesValidator] - <
Failed to bind properties under 'cas' to org.apereo.cas.configuration.CasConfigurationProperties

        cas
.serviceregistry.config.location = file:/etc/cas/services (Origin: "cas.serviceRegistry.config.location" from property source "bootstrapProperties-applicationProfilesCompositeProperties")

Listed settings above are no longer recognized by CAS 6.2.0-RC2. They may have been renamed, removed, or relocated to a new address in the CAS configuration schema. CAS will ignore such settings and will proceed with its normal initialization sequence. Please consult the CAS documentation to review and adjust each setting to find an alternative or remove the definition. Failure to do so puts the stability of the CAS server deployment in danger and complicates future upgrades.
>
[...]
> Task :run FAILED
:run (Thread[Execution worker for ':' Thread 7,5,main]) completed. Took 13.924 secs.


FAILURE
: Build failed with an exception.

* Where:
Script '/home/xxxx/bin/cas-overlay-template-6.2/gradle/tasks.gradle' line: 64


* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.


* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings


BUILD FAILED
in 15s
5 actionable tasks: 3 executed, 2 up-to-date


Jérémie Pilette

unread,
Feb 9, 2020, 1:49:38 PM2/9/20
to CAS Community
Hi,
I have try to compile without dependancies, so I can deploy with tomcat9 without problems. I can see the authentification window.
But When I compile with :

compile "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"


When I deploy the cas.war in tomcat9, it doesn't work.
I have 404 not found in the browser...

Do you have an idea ?

Best regards,

Jérémie

Ray Bon

unread,
Feb 10, 2020, 11:45:42 AM2/10/20
to cas-...@apereo.org
Jérémie,

Check catalina.out log. It should provide some more details.

Ray

Ray Bon

unread,
Feb 10, 2020, 11:50:56 AM2/10/20
to cas-...@apereo.org, dkopy...@unicon.net
Jérémie,

That means that 'cas.serviceregistry.config.location' is not a property. See properties here, https://apereo.github.io/cas/6.1.x/configuration/Configuration-Properties.html#service-registry, for 6.1.x

'config.location' is not there.
Also, it is 'serviceRegistry'.

Ray

Jérémie Pilette

unread,
Feb 11, 2020, 8:49:28 AM2/11/20
to CAS Community, dkopy...@unicon.net
Hi Ray,
thank you for your response.
I have uncommented the line cas.serviceRegistry.config.location: file:/etc/cas/services.(/ets/cas/config)
But it doen't make anaything.
I have change the owner too > chown -R tomcat:tomcat /etc/cas/services. No changes...
Here this my catalina.log :

[...]
[2020-02-11 13:26:52] [info] Starting Servlet engine: [Apache Tomcat/9.0.16 (Debian)]
[2020-02-11 13:26:52] [info] Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml]
[2020-02-11 13:26:52] [warning] The path attribute with value [/manager] in deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml] has been ignored
[2020-02-11 13:26:52] [info] At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2020-02-11 13:26:52] [info] Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml] has finished in [485] ms
[2020-02-11 13:26:52] [info] Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml]
[...]
[...]
[2020-02-11 13:26:58] [info] #033[32m2020-02-11 13:26:58,338 INFO [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] - <Configuration files found at [/etc/cas/config] are [[file [/etc/cas/config/cas.properties]]] under profile(s) [[standalone]]>#033[m
[2020-02-11 13:26:58] [info] 2020-02-11 13:26:58,366 main ERROR RollingFileManager (/
var/log/cas.log) java.io.FileNotFoundException: /var/log/cas.log (Permission denied) java.io.FileNotFoundException: /var/log/cas.log (Permission denied)
[...]
[...]
[2020-02-11 13:26:58] [info] 2020-02-11 13:26:58,369 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@107060e7] unable to create manager for [/var/log/cas.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@79a5298f[pattern=/var/log/cas-%d{yyyy-MM-dd-HH}-%i.log, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[OnStartupTriggeringPolicy, SizeBasedTriggeringPolicy(size=10485760), TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false)]), strategy=DefaultRolloverStrategy(min=1, max=7, useMax=true), advertiseURI=null, layout=%d %p [%c] - <%m>%n, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@107060e7] unable to create manager for [/var/log/cas.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@79a5298f[pattern=/var/log/cas-%d{yyyy-MM-dd-HH}-%i.log, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[OnStartupTriggeringPolicy, SizeBasedTriggeringPolicy(size=10485760), TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false)]), strategy=DefaultRolloverStrategy(min=1, max=7, useMax=true), advertiseURI=null, layout=%d %p [%c] - <%m>%n, filePermissions=null, fileOwner=null]]
[...]
[...]
[2020-02-11 13:26:58] [info] 2020-02-11 13:26:58,370 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
[...]
[...]
[info] 2020-02-11 13:26:58,371 main ERROR RollingFileManager (/var/log/cas_audit.log) java.io.FileNotFoundException: /var/log/cas_audit.log (Permission denied) java.io.FileNotFoundException: /var/log/cas_audit.log (Permission denied)
[...]
[...]
[2020-02-11 13:26:58] [info] 2020-02-11 13:26:58,372 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@107060e7] unable to create manager for [/var/log/cas_audit.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@7b9ab81c[pattern=/var/log/cas_audit-%d{yyyy-MM-dd-HH}-%i.log, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[OnStartupTriggeringPolicy, SizeBasedTriggeringPolicy(size=10485760), TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false)]), strategy=DefaultRolloverStrategy(min=1, max=7, useMax=true), advertiseURI=null, layout=%d %p [%c] - %m%n, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@107060e7] unable to create manager for [/var/log/cas_audit.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@7b9ab81c[pattern=/var/log/cas_audit-%d{yyyy-MM-dd-HH}-%i.log, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[OnStartupTriggeringPolicy, SizeBasedTriggeringPolicy(size=10485760), TimeBasedTriggeringPolicy(nextRolloverMillis=0, interval=1, modulate=false)]), strategy=DefaultRolloverStrategy(min=1, max=7, useMax=true), advertiseURI=null, layout=%d %p [%c] - %m%n, filePermissions=null, fileOwner=null]]
[...]
[...]
[2020-02-11 13:26:58] [info] 2020-02-11 13:26:58,373 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
[...]
[...]
[2020-02-11 13:26:58] [info] #033[32m2020-02-11 13:26:58,399 INFO [org.apereo.cas.web.CasWebApplicationServletInitializer] - <The following profiles are active: standalone>#033[m
[2020-02-11 13:27:01] [info] #033[33m2020-02-11 13:27:01,525 WARN [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatServletWebServerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: 'void org.apache.catalina.valves.RemoteIpValve.setHostHeader(java.lang.String)'>#033[m
[2020-02-11 13:27:01] [info] #033[1;31m2020-02-11 13:27:01,529 ERROR [org.springframework.boot.context.properties.migrator.PropertiesMigrationListener] - <
[2020-02-11 13:27:01] [info] The use of configuration keys that are no longer supported was found in the environment:
[2020-02-11 13:27:01] [info] Property source 'bootstrapProperties-applicationProfilesCompositeProperties':
[2020-02-11 13:27:01] [info] #011Key: cas.service-registry.config.location
[2020-02-11 13:27:01] [info] #011#011Reason: Property renamed due to cas.service-registry.json.location instead.
[2020-02-11 13:27:01] [info] Please refer to the migration guide or reference guide for potential alternatives.
[2020-02-11 13:27:01] [info] >#033[m
[2020-02-11 13:27:01] [info] #033[1;31m2020-02-11 13:27:01,540 ERROR [org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter] - <
[2020-02-11 13:27:01] [info] ***************************
[2020-02-11 13:27:01] [info] APPLICATION FAILED TO START
[2020-02-11 13:27:01] [info] ***************************
Description:
[2020-02-11 13:27:01] [info] An attempt was made to call a method that does not exist. The attempt was made from the following location:
[2020-02-11 13:27:01] [info]     org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer.customizeRemoteIpValve(TomcatWebServerFactoryCustomizer.java:189)
[2020-02-11 13:27:01] [info] The following method did not exist:
[2020-02-11 13:27:01] [info]     'void org.apache.catalina.valves.RemoteIpValve.setHostHeader(java.lang.String)'
[2020-02-11 13:27:01] [info] The method's class, org.apache.catalina.valves.RemoteIpValve, is available from the following locations:
[2020-02-11 13:27:01] [info]     jar:file:/usr/share/java/tomcat9-catalina-9.0.16.jar!/org/apache/catalina/valves/RemoteIpValve.class
[2020-02-11 13:27:01] [info]     jar:file:/var/lib/tomcat9/webapps/cas/WEB-INF/lib/tomcat-catalina-9.0.30.jar!/org/apache/catalina/valves/RemoteIpValve.class
[2020-02-11 13:27:01] [info]     jar:file:/var/lib/tomcat9/webapps/cas/WEB-INF/lib/tomcat-embed-core-9.0.30.jar!/org/apache/catalina/valves/RemoteIpValve.class
[2020-02-11 13:27:01] [info] It was loaded from the following location:
[2020-02-11 13:27:01] [info]     file:/usr/share/java/tomcat9-catalina-9.0.16.jar
[2020-02-11 13:27:01] [info] Action:
[2020-02-11 13:27:01] [info] Correct the classpath of your application so that it contains a single, compatible version of org.apache.catalina.valves.RemoteIpValve
[2020-02-11 13:27:01] [info] >#033[m
[2020-02-11 13:27:01] [crit] Error deploying web application archive [/var/lib/tomcat9/webapps/cas.war]
[2020-02-11 13:27:01] [crit] java.lang.IllegalStateException: Error starting child
[...]
[...]
[2020-02-11 13:27:01] [crit] Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cas]]
[2020-02-11 13:27:01] [crit]     at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
[2020-02-11 13:27:01] [crit]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
[2020-02-11 13:27:01] [crit]     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
[2020-02-11 13:27:01] [crit]     ... 37 more
[2020-02-11 13:27:01] [crit] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatServletWebServerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: 'void org.apache.catalina.valves.RemoteIpValve.setHostHeader(java.lang.String)'



Jérémie

Jérémie Pilette

unread,
Feb 11, 2020, 9:32:06 AM2/11/20
to cas-...@apereo.org
The same by changing

cas.serviceRegistry.config.location=file:/etc/cas/services
by
cas.serviceRegistry.json.location=file:/etc/cas/services
Jérémie

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/10fb447e-8d1f-4510-8513-b098ace772c0%40apereo.org.

Dmitriy Kopylenko

unread,
Feb 11, 2020, 9:34:45 AM2/11/20
to cas-...@apereo.org
Hi there.

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

And add the following property: spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration

And restart Tomcat.

Best,
D.


Jérémie Pilette

unread,
Feb 11, 2020, 10:02:38 AM2/11/20
to CAS Community, dkopy...@unicon.net
Hi Dmitry,

add this spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration in the /etc/cas/config/cas.properties file.

I have made it.... No changes. (http 404)

Please note I do not have a json file in the /etc/cas/services directory yet.

Jérémie

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

Dmitriy Kopylenko

unread,
Feb 11, 2020, 10:04:20 AM2/11/20
to cas-...@apereo.org
A full log would be useful
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/bec94153-7c6a-43d2-a3e6-a17349c05c7d%40apereo.org.

Bob

unread,
Feb 11, 2020, 10:14:30 AM2/11/20
to CAS Community, dkopy...@unicon.net
To get a lot less errors in your log I would start with making sure that you have this directory (and writable for the user that is used to start CAS) : /var/log/

Jérémie Pilette

unread,
Feb 11, 2020, 10:32:21 AM2/11/20
to CAS Community, dkopy...@unicon.net
Sorry,

my log in the attached file.

Thank you

Jérémie



catalina.out

Jérémie Pilette

unread,
Feb 11, 2020, 11:17:59 AM2/11/20
to CAS Community, dkopy...@unicon.net
Yes Bob,
I have change the right from root to tomcat in /var/log   (*.cas..)

For information this is my dependancies to compile :
dependencies {
   
// Other CAS dependencies/modules may be listed here...
   
// implementation "org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"

    compile
"org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"

    compile
"org.apereo.cas:cas-server-support-pm-ldap:${project.'cas.version'}"
    compile
"org.apereo.cas:cas-server-support-pm-webflow:${project.'cas.version'}"
    compile
"org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}"
    compile
"org.apereo.cas:cas-server-support-saml:${project.'cas.version'}"
}


Jérémie

Ray Bon

unread,
Feb 11, 2020, 11:37:16 AM2/11/20
to cas-...@apereo.org, dkopy...@unicon.net
Jérémie,

Check your log and make sure that 'permission denied' errors are gone.
I did not see anything related to CAS failures in the previous log you posted. There were spring boot issues (maybe related to tomcat version mismatch).

Get most recent version of tomcat, then post the logs.

Ray

Jérémie Pilette

unread,
Feb 11, 2020, 11:55:51 AM2/11/20
to CAS Community, dkopy...@unicon.net
I have some difficulties to know the user who can write in this files :
  • cas.out
  • cas_audit.out
It is not tomcat.

Unless using chmod 777 ...

Jérémie

Jérémie Pilette

unread,
Feb 11, 2020, 12:06:03 PM2/11/20
to CAS Community, dkopy...@unicon.net
Sorry, it is
  • cas.log
  • cas_audit.log
of course...

Ray Bon

unread,
Feb 11, 2020, 1:00:21 PM2/11/20
to cas-...@apereo.org, dkopy...@unicon.net
How are you starting tomcat?
Is catalina.out being written to /var/log or is it in TOMCAT_HOME/logs?

To see process owner:
$ ps aux | grep tomcat

Ray
-- 

Jérémie Pilette

unread,
Feb 11, 2020, 1:05:44 PM2/11/20
to CAS Community, dkopy...@unicon.net
I work with Debian 10 / Tomcat 9.0.16

To start : systemctl start tomcat9

root@debian10:~# ps aux | grep tomcat
tomcat    
9793  1.9  3.6 14146344 1197524 ?    Ssl  17:07   1:06 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djava.util.logging.config.file=/var/lib/tomcat9/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/share/tomcat9/bin/bootstrap.jar:/usr/share/tomcat9/bin/tomcat-juli.jar -Dcatalina.base=/var/lib/tomcat9 -Dcatalina.home=/usr/share/tomcat9 -Djava.io.tmpdir=/tmp org.apache.catalina.startup.Bootstrap start
root     10085  0.0  0.0   6144   896 pts/
0    S+   18:03   0:00 grep tomcat


Jérémie

Ray Bon

unread,
Feb 11, 2020, 1:18:09 PM2/11/20
to cas-...@apereo.org, dkopy...@unicon.net
tomcat user will need write access to those files. If the files do not exist, create them:
# touch /var/log/cas.log
# chgrp tomcat /var/log/cas.log

My /var/log has these permissions
drwxrwxr-x 18 root syslog   4096 Feb 11 00:00 log

so tomcat user can not create those files, it must be done beforehand.

Ray

Jérémie Pilette

unread,
Feb 11, 2020, 1:39:12 PM2/11/20
to CAS Community, dkopy...@unicon.net
I have some difficulties to solve this for the moment... about rights...

Waiting,
I have selected the main log which could be interesting (attached file)
My cas.properties too.

Thank you,

Jérémie


cas.properties
catalina.out

Ray Bon

unread,
Feb 11, 2020, 2:06:29 PM2/11/20
to cas-...@apereo.org, dkopy...@unicon.net
Try searchFilter (I do not see userFilter, it may be from a previous version - I am using 6.1)
cas.authn.ldap[0].searchFilter=uid={user}

I do not see searchFilter in the properties for authentication, it does show up elsewhere on the properties page, https://apereo.github.io/cas/6.1.x/configuration/Configuration-Properties.html#ldap-authentication

Ray

Jérémie Pilette

unread,
Feb 11, 2020, 4:24:24 PM2/11/20
to CAS Community, dkopy...@unicon.net
Oh! many thanks,
it seems to be good. Just about this line!

I have the authentification page and a connection test with a usename and password in LDAP run...

Many thanks,

Jérémie

Pavlos Drandakis

unread,
Feb 12, 2020, 2:54:44 AM2/12/20
to cas-...@apereo.org
By default, systemd, allows tomcat to write only under the following directories:
/etc/tomcat9/Catalina/
/var/lib/tomcat9/webapps/
/var/log/tomcat9/

So, you should override systemd - tomcat settings, to allow writing to any other directory (/var/log/ in your case).

Add the following in /etc/systemd/system/tomcat9.service.d/override.conf file (if it's not already there, just create it)

[Service]
ReadWritePaths=/var/log/

If you want to add more directories add more ReadWritePaths=xxx entries

Pavlos




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

Gilles-Dereck GNANCADJA

unread,
Jun 19, 2022, 6:15:07 PM6/19/22
to CAS Community, jerem....@gmail.com, dkopylenko
Hello, I'need help please please!

I'm working on deployement of CAS and for gradlew step i get this error please help me!!


┌──(root💀dgtcp)-[/home/dgtcp/cas-management-overlay]
└─# ./gradlew executable
Starting a Gradle Daemon (subsequent builds will be faster)


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'cas-management'.
> Could not resolve all files for configuration ':casBootWarOverlay'.
   > Could not find org.apereo.cas:cas-mgmt-webapp-tomcat:6.3.0-SNAPSHOT.

     Searched in the following locations:
       - file:/root/.m2/repository/org/apereo/cas/cas-mgmt-webapp-tomcat/6.3.0-SNAPSHOT/maven-metadata.xml
       - file:/root/.m2/repository/org/apereo/cas/cas-mgmt-webapp-tomcat/6.3.0-SNAPSHOT/cas-mgmt-webapp-tomcat-6.3.0-SNAPSHOT.pom
       - https://repo.maven.apache.org/maven2/org/apereo/cas/cas-mgmt-webapp-tomcat/6.3.0-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/org/apereo/cas/cas-mgmt-webapp-tomcat/6.3.0-SNAPSHOT/cas-mgmt-webapp-tomcat-6.3.0-SNAPSHOT.pom
       - https://oss.sonatype.org/content/repositories/releases/org/apereo/cas/cas-mgmt-webapp-tomcat/6.3.0-SNAPSHOT/maven-metadata.xml
       - https://oss.sonatype.org/content/repositories/releases/org/apereo/cas/cas-mgmt-webapp-tomcat/6.3.0-SNAPSHOT/cas-mgmt-webapp-tomcat-6.3.0-SNAPSHOT.pom
       - https://oss.sonatype.org/content/repositories/snapshots/org/apereo/cas/cas-mgmt-webapp-tomcat/6.3.0-SNAPSHOT/maven-metadata.xml
       - https://oss.sonatype.org/content/repositories/snapshots/org/apereo/cas/cas-mgmt-webapp-tomcat/6.3.0-SNAPSHOT/cas-mgmt-webapp-tomcat-6.3.0-SNAPSHOT.pom
       - https://build.shibboleth.net/nexus/content/repositories/releases/org/apereo/cas/cas-mgmt-webapp-tomcat/6.3.0-SNAPSHOT/maven-metadata.xml
       - https://build.shibboleth.net/nexus/content/repositories/releases/org/apereo/cas/cas-mgmt-webapp-tomcat/6.3.0-SNAPSHOT/cas-mgmt-webapp-tomcat-6.3.0-SNAPSHOT.pom
     Required by:
         project :


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2m 24s

Jérémie Pilette (Gmail)

unread,
Jun 19, 2022, 6:15:07 PM6/19/22
to Gilles-Dereck GNANCADJA, CAS Community, dkopylenko

Hi,

did you try to do  :

./gradlew clean build ?

Which version did you download ? 6.3 ? or the last 6.6 ?

Jérémie

Ray Bon

unread,
Jun 20, 2022, 12:00:21 PM6/20/22
to cas-...@apereo.org, jerem....@gmail.com, dkopy...@unicon.net
Is this a new deploy?
If so, you should use 6.5 (there is no .x for the overlay)

Ray


On Sat, 2022-06-18 at 12:42 -0700, Gilles-Dereck GNANCADJA wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.
-- 
Ray Bon
Programmer Analyst
Development Services, University Systems

I acknowledge and respect the lək̓ʷəŋən peoples on whose traditional territory the university stands, and the Songhees, Esquimalt and WSÁNEĆ peoples whose historical relationships with the land continue to this day.

Déreck

unread,
Jul 1, 2022, 6:20:48 AM7/1/22
to cas-...@apereo.org

Hi. Thanks for you answer, i’ve success to build the war ; It’s a new deploy.

 

Envoyé à partir de Courrier pour Windows

 

De : Ray Bon
Envoyé le :lundi 20 juin 2022 17:00
À : cas-...@apereo.org
Cc : jerem....@gmail.com; dkopy...@unicon.net
Objet :Re: [cas-user] 6.2.x Gradle Compilation

This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.


=

-- 

Ray Bon

Programmer Analyst

Development Services, University Systems

 

I acknowledge and respect the lək̓ʷəŋən peoples on whose traditional territory the university stands, and the Songhees, Esquimalt and WSÁNEĆ peoples whose historical relationships with the land continue to this day.

--

- 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/471893d591fe7971c3cc4665061db4ff81dd4108.camel%40uvic.ca.

 

Reply all
Reply to author
Forward
0 new messages