che icon indicating copy to clipboard operation
che copied to clipboard

Unable to use chectl for OpenShift platform

Open andy316x opened this issue 7 years ago • 6 comments

When attempting to run chectl using the Openshift platform I get the following error:

  • "http:" not supported. Expected "https:"

The full log can be seen below:

$ chectl server:start --platform=openshift --domain=apps.company.aws.local ✖ Verify Kubernetes API → Failed to connect to Kubernetes API. E_CHECTL_UNKNOWN_ERROR - Message: Protocol "http:" not supported. Expected "https:" 👀 Looking for an already existing Che instance › Error: Failed to connect to Kubernetes API. E_CHECTL_UNKNOWN_ERROR - Message: Protocol "http:" not supported. Expected "https:"

andy316x avatar Sep 30 '19 09:09 andy316x

@sleshchenko @amisevsk Could you have a look pls?

tolusha avatar Sep 30 '19 09:09 tolusha

Seems like a bug: Unable to use chectl if K8s/OS cluster use non-secure connection (http). I guess we should analyze the current content and choose the right agent https://github.com/che-incubator/chectl/blob/b9f6ac7ada95d8b8a99c308f521bb8a96bcec15b/src/api/kube.ts#L895

@andy316x Could you provide more info about your OpenShift installation? Does it really use http but not https?

sleshchenko avatar Sep 30 '19 10:09 sleshchenko

@sleshchenko my installation of Openshift does use https, at the minute it is using certificates signed by Openshift while I wait for certificates signed by our private CA, nonetheless once I get certificates signed they will still not be signed by a public authority.

andy316x avatar Sep 30 '19 12:09 andy316x

@andy316x Seems something is wrong with the currect cluster. Could you check output of oc config current-context, oc config view, is protocol https for you cluster? Check also like oc get pods to make sure that oc does not have the same issue.

sleshchenko avatar Sep 30 '19 12:09 sleshchenko

$ oc config current-context
che/console-company-aws-local:443/user1
$ oc config view
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: REDACTED
    server: https://console.company.aws.local:443
  name: console-company-aws-local:443
- cluster:
    certificate-authority-data: REDACTED
    server: https://console-int.company.aws.local:443
  name: console-int-company-aws-local:443
contexts:
- context:
    cluster: console-company-aws-local:443
    namespace: che
    user: user1/console-company-aws-local:443
  name: che/console-company-aws-local:443/user1
- context:
    cluster: console-company-aws-local:443
    namespace: default
    user: system:admin/console-int-company-aws-local:443
  name: default/console-company-aws-local:443/system:admin
- context:
    cluster: console-company-aws-local:443
    namespace: default
    user: user1/console-company-aws-local:443
  name: default/console-company-aws-local:443/user1
- context:
    cluster: console-int-company-aws-local:443
    namespace: default
    user: system:admin/console-int-company-aws-local:443
  name: default/console-int-company-aws-local:443/system:admin
- context:
    cluster: console-company-aws-local:443
    namespace: eclipse-che2
    user: user1/console-company-aws-local:443
  name: eclipse-che2/console-company-aws-local:443/user1
- context:
    cluster: console-company-aws-local:443
    namespace: hello-world
    user: user1/console-company-aws-local:443
  name: hello-world/console-company-aws-local:443/user1
current-context: che/console-company-aws-local:443/user1
kind: Config
preferences: {}
users:
- name: system:admin/console-int-company-aws-local:443
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
- name: user1/console-company-aws-local:443
  user:
    token: jFF0cZ6aggYf2pUMyfEXsnF5WzzR1eC85-p-yU1rKj4
$ oc get pods
No resources found.

andy316x avatar Sep 30 '19 12:09 andy316x

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

che-bot avatar Apr 01 '20 07:04 che-bot