Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-4351

"Backend is not available" error when trying to login into Dev Spaces Dashboard with both Bitbucket Server OAuth and PAT configured

XMLWordPrintable

    • False
    • None
    • False
    • Release Notes
    • Hide
      = Not possible to log in to User Dashboard when both Bitbucket PAT and Bitbucket OAuth are configured

      Before this update, including a Bitbucket Personal Access Token (PAT) in workspaces on a {prod-short} installation with Bitbucket OAuth integration resulted in a "Backend is not available" error message. With this update, it's possible to log in to the User Dashboard without issues.
      Show
      = Not possible to log in to User Dashboard when both Bitbucket PAT and Bitbucket OAuth are configured Before this update, including a Bitbucket Personal Access Token (PAT) in workspaces on a {prod-short} installation with Bitbucket OAuth integration resulted in a "Backend is not available" error message. With this update, it's possible to log in to the User Dashboard without issues.
    • Bug Fix
    • Done
    • Hide

      Delete secret with Bitbucket Server Personal Access Token from the user namespace.

      Show
      Delete secret with Bitbucket Server Personal Access Token from the user namespace.

      Description of problem:

      It is impossible to login into ocp 4.12, ocp 4.13 as USER. "Backend is not available" error (500) returned.

      Prerequisites (if any, like setup, operators/versions):

      • airgap ocp 4.12 was set up
      • Devspaces 3.6.0 RC-05-01 deployed

      Steps to Reproduce

      1. Open https://devspaces.apps.ds-airgap-v12.crw-qe.com
      2. Configure BitBucket OAuth in Dev Spaces
      3. Create workspace using BitBucket repo and accepting OAuth flow.
      4. Go to "Dashboard > User Preferences > Add Personal Access Token" tab and add Bitbucket Server Personal Access Token
      5. Re-login to Dev Spaces Dashboard

      Actual results:

      • "Backend is not available" error message, 500 status code, re-fresh don`t help. **

      Screencast: Screencast from 04.05.23 11_59_36.webm

      https://devspaces.apps.ds-airgap-v12.crw-qe.com/api/kubernetes/namespace/provision returned error "HTTP Status 500 – Internal Server Error":

      <!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1><hr class="line" /><p><b>Type</b> Exception Report</p><p><b>Message</b> java.lang.StackOverflowError</p><p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request.</p><p><b>Exception</b></p><pre>jakarta.servlet.ServletException: java.lang.StackOverflowError
      	org.everrest.core.servlet.EverrestServlet.service(EverrestServlet.java:76)
      	jakarta.servlet.http.HttpServlet.service(HttpServlet.java:631)
      	com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:290)
      	com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:280)
      	com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184)
      	com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:89)
      	org.eclipse.che.core.metrics.ApiResponseMetricFilter.doFilter(ApiResponseMetricFilter.java:46)
      	org.eclipse.che.multiuser.api.authentication.commons.filter.MultiUserEnvironmentInitializationFilter.doFilter(MultiUserEnvironmentInitializationFilter.java:161)
      	org.eclipse.che.commons.logback.filter.RequestIdLoggerFilter.doFilter(RequestIdLoggerFilter.java:50)
      	com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121)
      	com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133)
      </pre><p><b>Root Cause</b></p><pre>java.lang.StackOverflowError
      	java.base&#47;java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
      	java.base&#47;java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:253)
      	java.base&#47;java.io.File.exists(File.java:831)
      	io.fabric8.kubernetes.client.Config.getHomeDir(Config.java:791)
      	io.fabric8.kubernetes.client.Config.getKubeconfigFilename(Config.java:560)
      	io.fabric8.kubernetes.client.Config.tryKubeConfig(Config.java:544)
              ...
      	io.fabric8.kubernetes.client.dsl.base.BaseOperation.list(BaseOperation.java:83)
      	org.eclipse.che.workspace.infrastructure.openshift.project.OpenShiftProjectFactory.findPreparedNamespaces(OpenShiftProjectFactory.java:192)
      	org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespaceFactory.list(KubernetesNamespaceFactory.java:206)
      	org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesPersonalAccessTokenManager.doGetPersonalAccessToken(KubernetesPersonalAccessTokenManager.java:160)
      	org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesPersonalAccessTokenManager.get(KubernetesPersonalAccessTokenManager.java:144)
      

      Full error message: error_message.txt

      Expected results:

      • User successfully logged in, Dashboard available.

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Acceptance criteria: 

       

      Build Details:

      • airgap 4.12, 4.13
      • Devspaces 3.6.0 RC-05-01, 3.7.0 RC-06-02, 3.7.1.GA

      Additional info (Such as Logs, Screenshots, etc):

      Upstream issue: https://github.com/eclipse/che/issues/21958

      User namespace: project-user-devspaces.yaml

      Root cause of issue:

      Devspaces can't provision user namespace "user-devspaces" and returns "HTTP Status 500 – Internal Server Error" instead.
      At the same time there were no error messages in devspaces pod logs: devspaces-6ff575444d-zzdlc-devspaces.log
      (https://devspaces.apps.ds-airgap-v12.crw-qe.com/swagger/#/kubernetes-namespace/provision)

      Removal of secret with BitBucket Server Personal Access Token secret-personal-access-token-7a0pt.yaml from user namespace had restored an access to Dev Spaces Dashboard.
      And there was the same login error once I had restored the secret.

        1. bb-server-oauth-pat setup.png
          bb-server-oauth-pat setup.png
          92 kB
        2. bug_pat_devspaces.jpg
          bug_pat_devspaces.jpg
          73 kB
        3. devspaces-6ff575444d-zzdlc-devspaces.log
          24 kB
        4. devspaces-f69bff577-gk9rm-devspaces.log
          1.77 MB
        5. error_message.txt
          111 kB
        6. image-2023-05-04-14-23-32-198.png
          image-2023-05-04-14-23-32-198.png
          154 kB
        7. image-2023-05-04-17.11.22.png
          image-2023-05-04-17.11.22.png
          434 kB
        8. project-user-devspaces.yaml
          3 kB
        9. Screencast from 04.05.23 11_59_36.webm
          786 kB
        10. screenshot-1.png
          screenshot-1.png
          126 kB
        11. Screenshot from 2023-05-04 14-58-57.png
          Screenshot from 2023-05-04 14-58-57.png
          158 kB
        12. secret-personal-access-token-7a0pt.yaml
          2 kB

              ivinokur-1 Igor Vinokur
              rh-ee-mdolhalo Maryna Dolhalova (Inactive)
              Shmaraiev Oleksandr Shmaraiev Oleksandr
              Jana Vrbkova Jana Vrbkova
              Votes:
              0 Vote for this issue
              Watchers:
              16 Start watching this issue

                Created:
                Updated:
                Resolved: