java—cas的高可用性配置

nvbavucw  于 2021-06-08  发布在  Redis
关注(0)|答案(0)|浏览(274)

我在java8和tomcat8上实现cas5作为高可用性,haproxy作为负载均衡器,redis作为票证注册。票务登记处遵循此处给出的详细信息。接下来是部署cas,部署在两个tomcat上,比如t1和t2。

haproxy (80)
                        /\
                       /  \
                      /    \
            tomcat (T1)    tomcat (T2)
                      \    /
                       \  /
                        \/
                   redis (6379)

          T1 and T2, where CAS was deployed

haproxy形态:

cookie JSESSIONID prefix nocache
server tomcat1 127.0.0.1:1111 cookie t1 check inter 1000
server tomcat2 127.0.0.1:2222 cookie t2 check inter 1000

当我点击url时,它连接到t1。我可以登录并创建票证(t1验证,t2验证)。登录后,如果我关闭t1和注销它得到连接到t2,并给出以下错误
调试[org.apereo.cas.web.support.cookieretrievingcookiegenerator:141]-java.lang.nullpointerexception:null位于org.apereo.cas.web.support.encryptedcookievaluemanager.obtaincookievalue(encryptedcookievaluemanager)。java:35)~[cas-server-core-cookie-api-5.3.2。jar:5.3.2]在org.apereo.cas.web.support.cookieretrievingcookiegenerator.retrievecookievalue(cookieretrievingcookiegenerator)。java:139)~[cas-server-core-cookie-api-5.3.2。jar:5.3.2]在sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)~[?:1.8.0\u 251]在sun.reflect.nativemethodaccessorimpl.invoke(未知源)~[?:1.8.0\u 251]在sun.reflect.delegatingmethodaccessorimpl.invoke(未知源)~[?:1.8.0\u 251]位于java.lang.reflect.method.invoke(未知源)~[?:1.8.0\u 251]位于org.springframework.util.reflectionutils.invokemethod(reflectionutils)。java:216)~[spring-core-4.3.18.释放。jar:4.3.18.release]在org.springframework.cloud.context.scope.genericscope$lockedscopedproxyfactorybean.invoke(genericscope。java:470)~[spring-cloud-context-1.3.0.release。jar:1.3.0.release]在org.springframework.aop.framework.reflectivemethodinvocation.procedue(reflectivemethodinvocation。java:179)~[spring-aop-4.3.18.释放。jar:4.3.18.release]在org.springframework.aop.framework.cglibaopproxy$dynamicadvisedinterceptor.intercept(cglibaopproxy。java:671)~[spring-aop-4.3.18.释放。jar:4.3.18.release]在org.apereo.cas.web.support.cookieretrievingcookiegenerator$$enhancerbyspringcglib$$230a627a.retrievecookievalue()~[cas-server-core-cookie-api-5.3.2。jar:5.3.2]在org.apereo.cas.web.flow.logout.terminatesessionaction.terminate(terminatesessionaction。java:72)~[cas-server-support-actions-5.3.2。jar:5.3.2]在org.apereo.cas.web.flow.logout.terminatesessionaction.doexecute(terminatesessionaction。java:54)~[cas-server-support-actions-5.3.2。jar:5.3.2]在org.springframework.webflow.action.abstractaction.execute(抽象操作。java:188)~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)~[?:1.8.0\u 251]在sun.reflect.nativemethodaccessorimpl.invoke(未知源)~[?:1.8.0\u 251]在sun.reflect.delegatingmethodaccessorimpl.invoke(未知源)源代码)~[?:1.8.0\u 251]位于java.lang.reflect.method.invoke(未知源代码)~[?:1.8.0\u 251]位于org.springframework.util.reflectionutils.invokemethod(reflectionutils)。java:216)~[spring-core-4.3.18.释放。jar:4.3.18.release]在org.springframework.cloud.context.scope.genericscope$lockedscopedproxyfactorybean.invoke(genericscope。java:470) ~[spring-cloud-context-1.3.0.release。jar:1.3.0.release]在org.springframework.aop.framework.reflectivemethodinvocation.procedue(reflectivemethodinvocation。java:179)~[spring-aop-4.3.18.释放。jar:4.3.18.release]在org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy。java:213) ~[spring-aop-4.3.18.释放。jar:4.3.18.release]在com.sun.proxy.$proxy169.execute(未知源)~[?:?]在org.springframework.webflow.execution.actionexecutor.execute(actionexecutor。java:51)~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在org.springframework.webflow.action.evaluateaction.doexecute(evaluateaction。java:77) ~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在org.springframework.webflow.action.abstractaction.execute(abstractaction。java:188)~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在org.springframework.webflow.execution.actionexecutor.execute(actionexecutor。java:51)~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在org.springframework.webflow.engine.actionstate.doenter(actionstate。java:101)~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在org.springframework.webflow.engine.state.enter(state。java:194)~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在org.springframework.webflow.engine.flow.start(flow。java:527) ~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在org.springframework.webflow.engine.impl.flowexecutionimpl.start(flowexecutionimpl。java:368)~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在org.springframework.webflow.engine.impl.flowexecutionimpl.start(flowexecutionimpl。java:223)~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在org.springframework.webflow.executor.flowexecutompl.launchexecution(flowexecutompl。java:139)~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)~[?:1.8.0\u 251]在sun.reflect.nativemethodaccessorimpl.invoke(未知源)~[?:1.8.0\u 251]在sun.reflect.delegatingmethodaccessorimpl.invoke(未知源)~[?:1.8.0\u 251]位于java.lang.reflect.method.invoke(未知源)~[?:1.8.0\u 251]位于org.springframework.util.reflectionutils.invokemethod(reflectionutils)。java:216)~[spring-core-4.3.18.释放。jar:4.3.18.release]在org.springframework.cloud.context.scope.genericscope$lockedscopedproxyfactorybean.invoke(genericscope。java:470)~[spring-cloud-context-1.3.0.release。jar:1.3.0.release]在org.springframework.aop.framework.reflectivemethodinvocation.procedue(reflectivemethodinvocation。java:179)~[spring-aop-4.3.18.释放。jar:4.3.18.release]在org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy。java:213)~[spring-aop-4.3.18.释放。jar:4.3.18.release]在com.sun.proxy.$proxy167.launchexecution(未知源)~[?:?]在org.springframework.webflow.mvc.servlet.flowhandleradapter.handle(flowhandleradapter)。java:264) ~[spring-webflow-2.5.0.发布。jar:2.5.0.release]在org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet。java:967)~[spring-webmvc-4.3.18.发布。jar:4.3.18.release]位于org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet。java:901)~[spring-webmvc-4.3.18.发布。jar:4.3.18.release]在org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet。java:970)~[spring-webmvc-4.3.18.发布。jar:4.3.18.release]位于org.springframework.web.servlet.frameworkservlet.doget(frameworkservlet。java:861)~[spring-webmvc-4.3.18.发布。jar:4.3.18.release]在javax.servlet.http.httpservlet.service(httpservlet。java:622) ~[servlet api.jar:?]位于org.springframework.web.servlet.frameworkservlet.service(frameworkservlet)。java:846)~[spring-webmvc-4.3.18.发布。jar:4.3.18.release]在javax.servlet.http.httpservlet.service(httpservlet。java:729)~[servlet api.jar:?]位于org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:292) ~[卡塔琳娜。jar:8.0.32]在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:207)~[卡塔琳娜。jar:8.0.32]在org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter。java:52)~[tomcat网站。jar:8.0.32]位于org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:240) ~[卡塔琳娜。jar:8.0.32]在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:207)~[卡塔琳娜。jar:8.0.32]在org.apereo.cas.web.nic.filter.sarathixssfilter.dofilter(sarathixssfilter。java:83)~[classes/:5.3.2]位于org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:240) ~[卡塔琳娜。jar:8.0.32]在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:207)~[卡塔琳娜。jar:8.0.32]在org.apereo.cas.web.nic.filter.casfilter.dofilter(casfilter。java:94)~[classes/:5.3.2]位于org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:240) ~[卡塔琳娜。jar:8.0.32]在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:207)~[卡塔琳娜。jar:8.0.32]位于org.apereo.cas.web.support.authenticationcredentialsthreadlocalbinderclearingfilter.dofilter(authenticationcredentialsthreadlocalbinderclearingfilter)。java:30)~[cas-server-core-web-api-5.3.2。jar:5.3.2]在org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:240)~[卡塔琳娜。jar:8.0.32]在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:207)~[卡塔琳娜。jar:8.0.32]在org.apereo.cas.security.requestparameterpolicyenforcementfilter.dofilter(requestparameterpolicyenforcementfilter。java:261)~[cas-server-security-filter-2.0.10.2。jar:2.0.10.2]位于org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:240)~[卡塔琳娜。jar:8.0.32]在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:207)~[卡塔琳娜。jar:8.0.32]在org.apereo.cas.security.responseheadersenforcementfilter.dofilter(responseheadersenforcementfilter。java:237)~[cas-server-security-filter-2.0.10.2。jar:2.0.10.2]在org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:240)~[卡塔琳娜。jar:8.0.32]在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:207)~[卡塔琳娜。jar:8.0.32]在org.apereo.cas.security.addresponseheadersfilter.dofilter(addresponseheadersfilter。java:94) ~[cas-server-security-filter-2.0.10.2。jar:2.0.10.2]位于org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:240)~[卡塔琳娜。jar:8.0.32]在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:207)~[卡塔琳娜。jar:8.0.32]在org.springframework.boot.actuate.trace.webrequesttracefilter.dofilterinternal(webrequesttracefilter。java:111)~[spring-boot-actuator-1.5.14.释放。jar:1.5.14.release]在org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter。java:107)~[spring-web-4.3.18.发布。jar:4.3.18.release]在org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain)。java:240)~[卡塔琳娜。jar:8.0.32]在org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain。java:207)~(过氧化氢)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题