项目制品库 创建docker服务报错

  • Choerodon平台版本:0.23

  • 运行环境:自主搭建 v0.22升级至v0.23

  • 问题描述:
    项目制品库 创建Docker类型报错
    http://api.xxx.com/rdupm/v1/harbor-quota/global
    {failed: true, code: “error.error”, message: “程序出现错误,请联系管理员”, type: “warn”}
    code: “error.error”
    failed: true
    message: “程序出现错误,请联系管理员”
    type: “warn”

错误日志:
2020-10-31 21:17:15.335 DEBUG 7 — [ XNIO-3 task-37] o.h.r.h.infra.util.HarborHttpClient : url:https://harborxx.com//api/configurations
2020-10-31 21:17:15.335 DEBUG 7 — [ XNIO-3 task-37] o.h.r.h.infra.util.HarborHttpClient : body:null
2020-10-31 21:17:15.349 ERROR 7 — [ XNIO-3 task-37] o.h.core.exception.BaseExceptionHandler : Unknown exception, request: RequestInfo{URI=/v1/harbor-quota/global, method=public org.springframework.http.ResponseEntity<org.hrds.rdupm.harbor.api.vo.HarborQuotaVo> org.hrds.rdupm.harbor.api.controller.v1.HarborQuotaController.getGlobalQuota()}, user: CustomUserDetails{userId=38, username=qhm9vv2n1y, roleId=10, roleIds=[10, 12], siteRoleIds=[], tenantRoleIds=[10, 12], roleMergeFlag=true, tenantId=1, tenantIds=[1], organizationId=1, isAdmin=true, clientId=null, timeZone='CTT, language='zh_CN}
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.Gson.fromJson(Gson.java:939) ~[gson-2.8.5.jar!/:na]
at com.google.gson.Gson.fromJson(Gson.java:892) ~[gson-2.8.5.jar!/:na]
at com.google.gson.Gson.fromJson(Gson.java:841) ~[gson-2.8.5.jar!/:na]
at com.google.gson.Gson.fromJson(Gson.java:813) ~[gson-2.8.5.jar!/:na]
at org.hrds.rdupm.harbor.app.service.impl.HarborQuotaServiceImpl.getGlobalQuota(HarborQuotaServiceImpl.java:116) ~[classes!/:0.23.5]
at org.hrds.rdupm.harbor.api.controller.v1.HarborQuotaController.getGlobalQuota(HarborQuotaController.java:69) ~[classes!/:0.23.5]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_242]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_242]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_242]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_242]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) ~[spring-web-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) ~[spring-web-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) ~[spring-webmvc-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891) ~[spring-webmvc-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) ~[spring-webmvc-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) ~[spring-webmvc-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974) [spring-webmvc-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866) [spring-webmvc-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [javax.servlet-api-3.1.0.jar!/:3.1.0]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851) [spring-webmvc-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar!/:3.1.0]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at org.hzero.mybatis.parser.autoconfigure.SqlParserInterceptorConfiguration$SqlParserAutoClearFilter.doFilter(SqlParserInterceptorConfiguration.java:52) [hzero-starter-mybatis-mapper-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at org.hzero.core.jackson.config.ObjectMapperConfiguration$SensitiveAutoCloseFilter.doFilter(ObjectMapperConfiguration.java:51) [hzero-starter-core-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90) [spring-boot-actuator-2.0.6.RELEASE.jar!/:2.0.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at org.hzero.starter.keyencrypt.mvc.EncryptHeaderContextFilter.doFilter(EncryptHeaderContextFilter.java:34) [hzero-starter-keyencrypt-1.4.1-BETA.1.jar!/:1.4.1-BETA.1]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at io.choerodon.resource.filter.JwtTokenFilter.doFilter(JwtTokenFilter.java:106) [hzero-starter-core-1.4.0.RELEASE.jar!/:1.4.0.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) [spring-security-web-5.0.9.RELEASE.jar!/:5.0.9.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357) [spring-web-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270) [spring-web-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-1.4.26.Final.jar!/:1.4.26.Final]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-5.0.10.RELEASE.jar!/:5.0.10.RELEASE]

测试API:
https://harbor.xxxx.com//api/configurations

{
“auth_mode”: {
“value”: “db_auth”,
“editable”: false
},
“count_per_project”: {
“value”: -1,
“editable”: true
},
“email_from”: {
“value”: “admin \u003csample_admin@mydomain.com\u003e”,
“editable”: true
},
“email_host”: {
“value”: “smtp.mydomain.com”,
“editable”: true
},
“email_identity”: {
“value”: “”,
“editable”: true
},
“email_insecure”: {
“value”: false,
“editable”: true
},
“email_port”: {
“value”: 25,
“editable”: true
},
“email_ssl”: {
“value”: false,
“editable”: true
},
“email_username”: {
“value”: “sample_admin@mydomain.com”,
“editable”: true
},
“http_authproxy_case_sensitive”: {
“value”: true,
“editable”: true
},
“http_authproxy_endpoint”: {
“value”: “”,
“editable”: true
},
“http_authproxy_skip_search”: {
“value”: false,
“editable”: true
},
“http_authproxy_tokenreview_endpoint”: {
“value”: “”,
“editable”: true
},
“http_authproxy_verify_cert”: {
“value”: true,
“editable”: true
},
“ldap_base_dn”: {
“value”: “”,
“editable”: true
},
“ldap_filter”: {
“value”: “”,
“editable”: true
},
“ldap_group_admin_dn”: {
“value”: “”,
“editable”: true
},
“ldap_group_attribute_name”: {
“value”: “”,
“editable”: true
},
“ldap_group_base_dn”: {
“value”: “”,
“editable”: true
},
“ldap_group_membership_attribute”: {
“value”: “memberof”,
“editable”: true
},
“ldap_group_search_filter”: {
“value”: “”,
“editable”: true
},
“ldap_group_search_scope”: {
“value”: 2,
“editable”: true
},
“ldap_scope”: {
“value”: 2,
“editable”: true
},
“ldap_search_dn”: {
“value”: “”,
“editable”: true
},
“ldap_timeout”: {
“value”: 5,
“editable”: true
},
“ldap_uid”: {
“value”: “cn”,
“editable”: true
},
“ldap_url”: {
“value”: “”,
“editable”: true
},
“ldap_verify_cert”: {
“value”: true,
“editable”: true
},
“notification_enable”: {
“value”: true,
“editable”: true
},
“oidc_client_id”: {
“value”: “”,
“editable”: true
},
“oidc_endpoint”: {
“value”: “”,
“editable”: true
},
“oidc_name”: {
“value”: “”,
“editable”: true
},
“oidc_scope”: {
“value”: “”,
“editable”: true
},
“oidc_verify_cert”: {
“value”: true,
“editable”: true
},
“project_creation_restriction”: {
“value”: “everyone”,
“editable”: true
},
“quota_per_project_enable”: {
“value”: true,
“editable”: true
},
“read_only”: {
“value”: false,
“editable”: true
},
“robot_token_duration”: {
“value”: 43200,
“editable”: true
},
“scan_all_policy”: {
“value”: null,
“editable”: true
},
“self_registration”: {
“value”: false,
“editable”: true
},
“storage_per_project”: {
“value”: -1,
“editable”: true
},
“token_expiration”: {
“value”: 30,
“editable”: true
},
“uaa_client_id”: {
“value”: “”,
“editable”: true
},
“uaa_client_secret”: {
“value”: “”,
“editable”: true
},
“uaa_endpoint”: {
“value”: “”,
“editable”: true
},
“uaa_verify_cert”: {
“value”: false,
“editable”: true
}
}

制品库关于harbro的url配置是“https://172.23.xx.xx:8080”,结尾不能加“/”。