OpenLDAP用户无法同步

  • Choerodon平台版本: 0.18

  • 遇到问题的执行步骤:
    安装完成后,添加完成项目并添加用户,使用用户登录无法打开开发控制台,报错gitlab用户无法同步。
    删除iam_user, devops_user, gitlabhq库中users表中所有id不为1的用户,再次同步,发现只有iam_user有数据,devops_user和users表都没有更新,具体报错信息如下

devops-service报错信息如下:

gitlab-service报错信息如下:
2019-08-19 16:34:37.825 INFO 9 — [XNIO-3 task-163] i.c.r.h.ControllerExceptionHandler : exception info io.choerodon.core.exception.FeignException: Bad Request

8/19/2019 4:34:37 PM at io.choerodon.gitlab.app.service.impl.UserServiceImpl.createUser(UserServiceImpl.java:36)

8/19/2019 4:34:37 PM at io.choerodon.gitlab.api.controller.v1.UserController.create(UserController.java:57)

8/19/2019 4:34:37 PM at sun.reflect.GeneratedMethodAccessor314.invoke(Unknown Source)

8/19/2019 4:34:37 PM at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

8/19/2019 4:34:37 PM at java.lang.reflect.Method.invoke(Method.java:498)

8/19/2019 4:34:37 PM at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)

8/19/2019 4:34:37 PM at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)

8/19/2019 4:34:37 PM at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)

8/19/2019 4:34:37 PM at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)

8/19/2019 4:34:37 PM at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)

8/19/2019 4:34:37 PM at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)

8/19/2019 4:34:37 PM at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)

8/19/2019 4:34:37 PM at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)

8/19/2019 4:34:37 PM at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)

8/19/2019 4:34:37 PM at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)

8/19/2019 4:34:37 PM at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

8/19/2019 4:34:37 PM at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)

8/19/2019 4:34:37 PM at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)

8/19/2019 4:34:37 PM at io.choerodon.resource.filter.JwtTokenFilter.doFilter(JwtTokenFilter.java:90)

8/19/2019 4:34:37 PM at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

8/19/2019 4:34:37 PM at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)

8/19/2019 4:34:37 PM at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

8/19/2019 4:34:37 PM at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

8/19/2019 4:34:37 PM at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:209)

8/19/2019 4:34:37 PM at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)

8/19/2019 4:34:37 PM at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)

8/19/2019 4:34:37 PM at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)

8/19/2019 4:34:37 PM at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

8/19/2019 4:34:37 PM at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)

8/19/2019 4:34:37 PM at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

8/19/2019 4:34:37 PM at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

8/19/2019 4:34:37 PM at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)

8/19/2019 4:34:37 PM at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

8/19/2019 4:34:37 PM at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

8/19/2019 4:34:37 PM at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)

8/19/2019 4:34:37 PM at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

8/19/2019 4:34:37 PM at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

8/19/2019 4:34:37 PM at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:155)

8/19/2019 4:34:37 PM at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:123)

8/19/2019 4:34:37 PM at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:108)

8/19/2019 4:34:37 PM at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

8/19/2019 4:34:37 PM at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

8/19/2019 4:34:37 PM at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)

8/19/2019 4:34:37 PM at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

8/19/2019 4:34:37 PM at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:65)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)

8/19/2019 4:34:37 PM at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

8/19/2019 4:34:37 PM at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)

8/19/2019 4:34:37 PM at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)

8/19/2019 4:34:37 PM at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)

8/19/2019 4:34:37 PM at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

8/19/2019 4:34:37 PM at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)

8/19/2019 4:34:37 PM at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

8/19/2019 4:34:37 PM at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)

8/19/2019 4:34:37 PM at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)

8/19/2019 4:34:37 PM at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336)

8/19/2019 4:34:37 PM at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)

8/19/2019 4:34:37 PM at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

8/19/2019 4:34:37 PM at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

8/19/2019 4:34:37 PM at java.lang.Thread.run(Thread.java:813)

8/19/2019 4:34:37 PM Caused by: org.gitlab4j.api.GitLabApiException: Bad Request

8/19/2019 4:34:37 PM at org.gitlab4j.api.AbstractApi.validate(AbstractApi.java:330)

8/19/2019 4:34:37 PM at org.gitlab4j.api.AbstractApi.post(AbstractApi.java:143)

8/19/2019 4:34:37 PM at org.gitlab4j.api.UserApi.createUser(UserApi.java:353)

8/19/2019 4:34:37 PM at io.choerodon.gitlab.app.service.impl.UserServiceImpl.createUser(UserServiceImpl.java:34)

8/19/2019 4:34:37 PM … 82 more

8/19/2019 4:34:37 PM 2019-08-19 16:34:37.826 WARN 9 — [XNIO-3 task-163] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [io.choerodon.core.exception.FeignException: Bad Request]

8/19/2019 4:35:40 PM 2019-08-19 16:35:40.680 INFO 9 — [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration

8/19/2019 4:36:47 PM 2019-08-19 16:36:47.604 INFO 9 — [XNIO-2 task-234] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://register-server.c7n-system:8000/

  • 文档地址:

  • 环境信息(如:节点信息):

  • 报错日志:

  • 原因分析:

    提出您分析问题的过程,以便我们能更准确的找到问题所在

  • 疑问:

    提出您对于遇到和解决该问题时的疑问

查看实例事件


点击对应的失败事件看下是哪个节点出了错,报错的日志截图一下,把右边的报错日志发一下,例:

重新安装后我这还有一个问题就是看不到事务

事务看到的日志其实和容器看到的是一样的,还是一样的错误

gitlab-service和devops-service都在报错,报错信息在前面的描述中

删除c7n-mysql中的iam_user和devops_user两个表以及gitlab-mysql 中users表后,会存在一些垃圾数据需要清理,主要是gitlab-mysql中gitlabhq_production库中的namespaces和routes两个表对应的信息也需要清理,清理完成后,再次同步问题即可解决。