无法使用Maven Fabric8将Spring Boot应用程序部署到Openshift集群:TLS内部错误

时间:2019-12-13 05:33:40

标签: maven openshift fabric8

无法使用fabric8将Spring Boot应用程序部署到openshift集群。 出现以下错误。

[INFO] F8: Using BuildServiceConfig cart-service-s2i for Source strategy
[INFO] F8: Adding to ImageStream cart-service
[INFO] F8: Starting Build cart-service-s2i
[ERROR] F8: OpenShift Error: [500 Failure] [InternalError] Internal error occurred: error dialing backend: remote error: tls: internal error
[ERROR] F8: Failed to execute the build [Unable to build the image using the OpenShift build service]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:43 min
[INFO] Finished at: 2019-12-12T22:04:51+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:3.5.28:build (fmp) on project cart-service: Failed to execute the build: Unable to build the image using the OpenShift build service: Failure executing: POST at: https://master.na311.openshift.opentlc.com/apis/build.openshift.io/v1/namespaces/vishdube-otp/buildconfigs/cart-service-s2i/instantiatebinary?commit=. Message: Internal error occurred: error dialing backend: remote error: tls: internal error. Received status: Status(apiVersion=v1, code=500, details=StatusDetails(causes=[StatusCause(field=null, message=error dialing backend: remote error: tls: internal error, reason=null, additionalProperties={})], group=null, kind=null, name=null, retryAfterSeconds=null, additionalProperties={}), kind=Status, message=Internal error occurred: error dialing backend: remote error: tls: internal error, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=InternalError, status=Failure, additionalProperties={}). -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

如果我进一步调试它,则会出现以下响应。

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {

  },
  "status": "Failure",
  "message": "buildconfigs.build.openshift.io \"cart-service-s2i\" is forbidden: User \"system:anonymous\" cannot get buildconfigs.build.openshift.io/instantiatebinary in the namespace \"vishdube-otp\": no RBAC policy matched",
  "reason": "Forbidden",
  "details": {
    "name": "cart-service-s2i",
    "group": "build.openshift.io",
    "kind": "buildconfigs"
  },
  "code": 403
}

请让我知道问题的原因和解决方法。

仅供参考!这是更多细节

oc v3.11.154
kubernetes v1.11.0+d4cacc0
features: Basic-Auth SSPI Kerberos SPNEGO

Server https://master.na311.openshift.opentlc.com:443
openshift v3.11.43
kubernetes v1.11.0+d4cacc0

我也尝试了fabric8 4.1.0和更高版本。出现相同的错误。

0 个答案:

没有答案