Dmitriy, Late to the party on this one. This solution worked for me on Ubuntu 18.04 with distro packaged Tomcat 9.0.16. Thank you!
What are the ramifications of setting this value? Bill On Wednesday, November 13, 2019 at 8:58:43 AM UTC-5, Dmitriy Kopylenko wrote: > > For what it's worth - if anyone is deploying CAS 6.1 to external Tomcat > versions that do not have the newer API, and do not want to either upgrade > Tomcat or use CAS in the embedded mode, add this line to your > cas.properties -> > *spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration* > > and you should be good to go. > > Cheers, > D. > > > From: Nicolas Teste <[email protected]> <javascript:> > Reply: [email protected] <javascript:> <[email protected]> <javascript:> > Date: November 13, 2019 at 8:50:17 AM > To: CAS Community <[email protected]> <javascript:> > Subject: [cas-user] Re: CAS 6.x Error while deploying cas.war in tomcat > > I had the same issue a few days ago trying to upgrade from 6.0 to 6.1 on > Debian 9 and Tomcat 8.5.38 (from backport). > It looks like the method is really missing. > > Online ressources > > - > > https://github.com/apache/tomcat/blame/master/java/org/apache/catalina/valves/RemoteIpValve.java#L480 > > - https://bz.apache.org/bugzilla/show_bug.cgi?id=57665#c24 > > seems to indicate that the method is quite new and not available in our > distro packaged Tomcat > > Fixed in: >> - master for 9.0.23 onwards >> - 8.5.x for 8.5.44 onwards >> - 7.0.x for 7.0.97 onwards >> >> > Le vendredi 18 octobre 2019 16:48:06 UTC+2, MW a écrit : >> >> I bet it would run with this command: java -jar /path/to/cas.war >> >> However, remove the line in your gradle.properties >> >> tomcatVersion=9.0.16 >> >> Then, replace -tomcat as your appServer value and recompile. >> >> >> >> >> On Thursday, October 17, 2019 at 9:26:55 AM UTC-6, moncada wrote: >> >>> Hello everyone, >>> >>> I am Ubuntu Bionic whith Tomcat 9.0.16 and CAS 6.1.0-SNAPSHOT >>> >>> I build the war with the command via overlay: >>> >>> build.sh package >>> >>> I copy cas.war in the webapps directory here is the log: >>> >>> 2019-10-17 17:19:27,064 INFO >>> >>> [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] >>> - <Configuration files found at [/etc/cas/config] are [[file >>> [/etc/cas/config/cas.properties]]] under profile(s) [[standalone]]> >>> 2019-10-17 17:19:27,246 INFO >>> [org.apereo.cas.web.CasWebApplicationServletInitializer] - <The >>> following profiles are active: standalone> >>> 2019-10-17 17:19:46,297 DEBUG >>> [org.apereo.cas.support.saml.OpenSamlConfigBean] - <Initialized OpenSaml >>> successfully.> >>> 2019-10-17 17:19:46,613 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)'> >>> 2019-10-17 17:19:46,659 WARN >>> >>> [org.springframework.boot.context.properties.migrator.PropertiesMigrationListener] >>> - < >>> The use of configuration keys that have been renamed was found in the >>> environment: >>> >>> Property source 'bootstrapProperties': >>> Key: cas.authn.throttle.appcode >>> Replacement: cas.authn.throttle.app-code >>> >>> >>> Each configuration key has been temporarily mapped to its replacement >>> for your convenience. To silence this warning, please update your >>> configuration to use the new keys. >>> > >>> 2019-10-17 17:19:46,703 ERROR >>> [org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter] - < >>> >>> *************************** >>> APPLICATION FAILED TO START >>> *************************** >>> >>> Description: >>> >>> An attempt was made to call a method that does not exist. The attempt >>> was made from the following location: >>> >>> >>> >>> org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer.customizeRemoteIpValve(TomcatWebServerFactoryCustomizer.java:186) >>> >>> The following method did not exist: >>> >>> 'void >>> org.apache.catalina.valves.RemoteIpValve.setHostHeader(java.lang.String)' >>> >>> The method's class, org.apache.catalina.valves.RemoteIpValve, is >>> available from the following locations: >>> >>> >>> >>> jar:file:/usr/share/java/tomcat9-catalina-9.0.16.jar!/org/apache/catalina/valves/RemoteIpValve.class >>> >>> >>> jar:file:/var/lib/tomcat9/webapps/cas/WEB-INF/lib/tomcat-catalina-9.0.27.jar!/org/apache/catalina/valves/RemoteIpValve.class >>> >>> >>> jar:file:/var/lib/tomcat9/webapps/cas/WEB-INF/lib/tomcat-embed-core-9.0.27.jar!/org/apache/catalina/valves/RemoteIpValve.class >>> >>> It was loaded from the following location: >>> >>> file:/usr/share/java/tomcat9-catalina-9.0.16.jar >>> >>> >>> Action: >>> >>> Correct the classpath of your application so that it contains a single, >>> compatible version of org.apache.catalina.valves.RemoteIpValve >>> >>> >>> Thanks. >>> >>> -- >>> Juan Carlos Giménez Moncada >>> Ticarum / Universidad de Murcia >>> Campus de Espinardo >>> 30100 Murcia >>> >> -- > - 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] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/a/apereo.org/d/msgid/cas-user/42755d7d-96b2-46b0-8d24-72e15a5065e4%40apereo.org > > <https://groups.google.com/a/apereo.org/d/msgid/cas-user/42755d7d-96b2-46b0-8d24-72e15a5065e4%40apereo.org?utm_medium=email&utm_source=footer> > . > > -- - 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/c0a821bb-13a1-4417-a641-968cfe6db060%40apereo.org.
