Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-27019

Show in -> Web console option does not work at times

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.14.0.AM1
    • Fix Version/s: 4.16.0.AM1
    • Component/s: cdk, openshift
    • Labels:
      None
    • Sprint:
      devex #179 Jan/Feb 2020, devex #180 Feb/Mar 2020, devex #181 Mar 2020, devex #182 Apr 2020, devex #183 May 2020
    • Steps to Reproduce:
      Hide

      The following is not consistent and works at times, while it doesn't in others. It does not depend on a particular CRC version (1.3, 1.4 & 1.5 were tested with 1.5 failing this time):

      1. Download CRC 1.3
      2. Create CR Container 1.0 adapter
      3. Start the adapter
      4. ASSERT: Adapter is started
      5. Connect to OS cluster via CLI using crc binary (./crc console)
      6. ASSERT: One can connect to OS via web console
      7. Open Openshift Explorer in IDE
      8. On the connection -> Show In -> Web Console
      9. ASSERT: Proper endpoint url is used to connect to web console
      Actualy it uses openshift server url (https://api.crc.testing:6443/) which is returning:

      {
        "kind": "Status",
        "apiVersion": "v1",
        "metadata": {
          
        },
        "status": "Failure",
        "message": "forbidden: User \"system:anonymous\" cannot get path \"/\"",
        "reason": "Forbidden",
        "details": {
          
        },
        "code": 403
      }
      
      Show
      The following is not consistent and works at times, while it doesn't in others. It does not depend on a particular CRC version (1.3, 1.4 & 1.5 were tested with 1.5 failing this time): 1. Download CRC 1.3 2. Create CR Container 1.0 adapter 3. Start the adapter 4. ASSERT: Adapter is started 5. Connect to OS cluster via CLI using crc binary (./crc console) 6. ASSERT: One can connect to OS via web console 7. Open Openshift Explorer in IDE 8. On the connection -> Show In -> Web Console 9. ASSERT: Proper endpoint url is used to connect to web console Actualy it uses openshift server url ( https://api.crc.testing:6443/ ) which is returning: { "kind" : "Status" , "apiVersion" : "v1" , "metadata" : { }, "status" : "Failure" , "message" : "forbidden: User \" system:anonymous\ " cannot get path \" /\"", "reason" : "Forbidden" , "details" : { }, "code" : 403 }

      Description

      Show in -> Web Console does not work for Openshift connection created from CRC 1.3 version as the Server's url (OS 4.2 endpoint - https://api.crc.testing:6443/) does not work for web console access. The correct one is https://console-openshift-console.apps-crc.testing/.

      I got this error stack trace, btw:

      eclipse.buildId=12.14.0.AM1-v20200123-0055-B5802
      java.version=11.0.5
      java.vendor=Oracle Corporation
      BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
      Framework arguments:  -product com.jboss.devstudio.core.product
      Command-line arguments:  -data file:/home/odockal/workspace_12140AM1-0123/ -os linux -ws gtk -arch x86_64 -product com.jboss.devstudio.core.product
      
      org.eclipse.core.jobs
      Error
      Mon Jan 27 15:12:23 CET 2020
      An internal error occurred during: "Retrieving console for https://api.crc.testing:6443...".
      
      com.openshift.restclient.UnsupportedEndpointException: Unable to determine the api endpoint for kind 'ConfigMap'
      	at com.openshift.internal.restclient.URLBuilder.buildWithNamespaceInPath(URLBuilder.java:149)
      	at com.openshift.internal.restclient.URLBuilder.build(URLBuilder.java:135)
      	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:297)
      	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:271)
      	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:239)
      	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:222)
      	at com.openshift.internal.restclient.DefaultClient.get(DefaultClient.java:406)
      	at com.openshift.internal.restclient.capability.server.Console.getOpenShift4ConsoleUrl(Console.java:93)
      	at com.openshift.internal.restclient.capability.server.Console.getOpenShift4ConsoleUrl(Console.java:107)
      	at com.openshift.internal.restclient.capability.server.Console.getConsoleUrl(Console.java:64)
      	at org.jboss.tools.openshift.core.connection.Connection.getConsoleURL(Connection.java:381)
      	at org.jboss.tools.openshift.internal.ui.handler.OpenInWebConsoleHandler.lambda$0(OpenInWebConsoleHandler.java:61)
      	at org.eclipse.core.runtime.jobs.Job$1.run(Job.java:164)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
      
      
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                adietish André Dietisheim
                Reporter:
                odockal Ondrej Dockal
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: