hello!

these forums have been great for me, and I'd like to throw out a question 
to see if anyone has any insights.

here's what's working:

cas and cas-management 6.1 RC4 running on tomcat9 on the same server, are 
both able to see the git service registry I have set up.

my fun begins when cas-management commits it's changes. It commits them in 
the local git cache, which the cas service is also pointing at and picks 
up, BUT it never pushes the commit to the git repo.

I get java nullopintexception error. actually I get that error right when I 
select to look at the services in the cas-management web interface:

---------------------------------------
2020-01-31 10:44:07,275 ERROR 
[org.apereo.cas.mgmt.controller.CommitController] - <null>
java.lang.NullPointerException: null
    at 
org.apereo.cas.mgmt.controller.CommitController.isPublishedBehind(CommitController.java:201)
 
~[cas-mgmt-support-version-control-6.1.0-RC4.jar:6.1.0-RC4]
    at 
org.apereo.cas.mgmt.controller.CommitController.gitStatus(CommitController.java:225)
 
[cas-mgmt-support-version-control-6.1.0-RC4.jar:6.1.0-RC4]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:?]
    at 
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 
~[?:?]
    at 
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 
~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
    at 
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
 
[spring-webmvc-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:889)
 
[spring-webmvc-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:794)
 
[spring-webmvc-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
 
[spring-webmvc-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039)
 
[spring-webmvc-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
 
[spring-webmvc-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
 
[spring-webmvc-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897)
 
[spring-webmvc-5.2.0.M2.jar:5.2.0.M2]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) 
[servlet-api.jar:?]
    at 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
 
[spring-webmvc-5.2.0.M2.jar:5.2.0.M2]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 
[servlet-api.jar:?]
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
[catalina.jar:9.0.30]
    at 
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 
[tomcat-websocket.jar:9.0.30]
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
[catalina.jar:9.0.30]
    at 
org.apereo.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:66)
 
[inspektr-common-1.8.5.GA.jar:1.8.5.GA]
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
[catalina.jar:9.0.30]
    at 
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
[catalina.jar:9.0.30]
    at 
org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
[catalina.jar:9.0.30]
    at 
org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
[catalina.jar:9.0.30]
    at 
org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:130)
 
[spring-boot-2.2.0.M3.jar:2.2.0.M3]
    at 
org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
 
[spring-boot-2.2.0.M3.jar:2.2.0.M3]
    at 
org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:105)
 
[spring-boot-2.2.0.M3.jar:2.2.0.M3]
    at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:123)
 
[spring-boot-2.2.0.M3.jar:2.2.0.M3]
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
[catalina.jar:9.0.30]
    at 
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 
[spring-web-5.2.0.M2.jar:5.2.0.M2]
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
[catalina.jar:9.0.30]
    at 
org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
 
[log4j-web-2.11.2.jar:2.11.2]
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
 
[catalina.jar:9.0.30]
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 
[catalina.jar:9.0.30]
    at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) 
[tomcat-coyote.jar:9.0.30]
    at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
 
[tomcat-coyote.jar:9.0.30]
    at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
 
[tomcat-coyote.jar:9.0.30]
    at 
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:1998)
 
[tomcat-coyote.jar:9.0.30]
    at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
[tomcat-coyote.jar:9.0.30]
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
[?:?]
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
[?:?]
    at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 
[tomcat-util.jar:9.0.30]
    at java.lang.Thread.run(Thread.java:834) [?:?]




I have a rather fun setup, here's what I think is pertinent:

the git repo in question is set up in a folder on the tomcat server. Call 
it: *git-repo-folder.*
the linux user environment this all runs in is aware of the git repo, as 
well as the ssh key wich allows for unprompted git processes to be run. 
This was achieved by cloning *git-repo-folder *via ssh, generating a 
pub/private key, importing the key into the git server, importing the key 
into my known_hosts file, then editing the ~/.ssh/config file to have that 
key used whenever this particular git server is accessed.


so CAS interfaces with all this via these cas.properties:
# SERVICE REGISTRY
cas.serviceRegistry.initFromJson=false
cas.serviceRegistry.git.repositoryUrl
[email protected]:user/cas-6_1-service-definitions.git
cas.serviceRegistry.git.branchesToClone=master
cas.serviceRegistry.git.activeBranch=master
cas.serviceRegistry.git.cloneDirectory=${git-repo-folder-location}
cas.serviceRegistry.git.pushChanges=true
cas.serviceRegistry.git.timeout=PT10S
cas.serviceRegistry.git.privateKeyPath
=${me.base.dir}/cas-settings/keys/coderepo_id_rsa


and CAS-MANAGEMENT interfaces with all this via these management.properties:
mgmt.versionControl.servicesRepo=${git-repo-folder-location}
mgmt.versionControl=true

# SERVICE REGISTRY
cas.serviceRegistry.initFromJson=false
cas.serviceRegistry.git.repositoryUrl
[email protected]:user/cas-6_1-service-definitions.git
cas.serviceRegistry.git.branchesToClone=master
cas.serviceRegistry.git.activeBranch=master
cas.serviceRegistry.git.pushChanges=true


now in the management.properties, if I try and put the 
cas.serviceRegistry.git.privateKeyPath entry in there, it blows up and says 
that's not a proper key property and won't even start

it appears as thought the commitController is not happy with my settings. I 
had a HECK of a time finding the mgmt.versionControl.servicesRepo key. I 
found it on another site, but haven't actually seen it referenced on any of 
apereo's docs. they reference it as mgmt.servicesRepo, which always blew up 
as an unknown key.

that leads me to think, there's another key I need, that I just don't know 
about... maybe?

any insight would be wonderful! thanks!

-- 
- 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/20003e1c-e2fb-4d44-9982-52a540e4db4a%40apereo.org.

Reply via email to