OPTIONS request to "/api/" failed, reason: Internal server error occurs. API is not accessible
See original GitHub issueSummary
my chectl version
i have installed eclipse-che using below command
chectl server:deploy --che-operator-cr-patch-yaml=/Users/divine/Documents/office_tasks/TAP-4540/terraformCheJune17/eclipseche_yaml/che-operator-cr-patch.yaml --platform=k8s --installer=operator --debug --k8spoderrorrechecktimeout=1000000 --domain=eclipseche-dchelladurai-chejune15.calatrava.vmware.com --k8spodreadytimeout=1000000
i have integrated dex
with github connector . i followed the steps mentioned here , to configure dex
with github connector.
when i hit eclipse-che dashboard url, the webpage redirects to github login and after successful authentication flow in github, the webpage redirects back to eclipse-che dashboard url, but it fails to completely load the webpage due to below error.
https://eclipseche-dchelladurai-chejune15.calatrava.vmware.com/api/ —OPTIONS request-- this api throws errorMessage 500 Internal server error occurs. API is not accessible
https://eclipseche-dchelladurai-chejune15.calatrava.vmware.com/api/ — what does this api do?
below is the output of che
ingress in eclipse-che
namespace. i have installed ingress-nginx in the k8s cluster.
is this error anything related to my ingress configuration?
Please help me to fix this error @tolusha @sparkoo
https://eclipseche-dchelladurai-chejune15.calatrava.vmware.com/api/
checluster
output kubectl get checluster eclipse-che -n eclipse-che -o yaml
apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
creationTimestamp: "2022-06-17T10:02:53Z"
finalizers:
- checluster.che.eclipse.org
- cheGateway.clusterpermissions.finalizers.che.eclipse.org
- cheWorkspaces.clusterpermissions.finalizers.che.eclipse.org
- namespaces-editor.permissions.finalizers.che.eclipse.org
- devWorkspace.permissions.finalizers.che.eclipse.org
- dashboard.clusterpermissions.finalizers.che.eclipse.org
generation: 2
name: eclipse-che
namespace: eclipse-che
resourceVersion: "736485"
uid: 68fc4e54-e437-497b-a7ee-24264735a6a2
spec:
components:
cheServer:
debug: true
deployment:
securityContext: {}
logLevel: INFO
proxy: {}
dashboard:
deployment:
securityContext: {}
database:
credentialsSecretName: postgres-credentials
deployment:
securityContext: {}
externalDb: true
postgresDb: dbche
postgresHostName: database-1-postgres.cq9mxgg86wjj.ap-south-1.rds.amazonaws.com
postgresPort: "5432"
pvc: {}
devWorkspace:
deployment:
securityContext: {}
devfileRegistry:
deployment:
securityContext: {}
imagePuller:
enable: false
spec: {}
metrics:
enable: true
pluginRegistry:
deployment:
securityContext: {}
containerRegistry: {}
devEnvironments:
defaultNamespace:
template: <username>-che
storage:
pvc: {}
pvcStrategy: common
trustedCerts: {}
networking:
auth:
gateway:
deployment:
securityContext: {}
identityProviderURL: https://dex-dchelladurai-chejune15.calatrava.vmware.com
oAuthClientName: eclipse-che
oAuthSecret: ZXhhbXBsZS1hcHAtc2VjcmV0
domain: eclipseche-dchelladurai-chejune15.calatrava.vmware.com
tlsSecretName: che-tls
status:
chePhase: Active
cheURL: https://eclipseche-dchelladurai-chejune15.calatrava.vmware.com
cheVersion: next
devfileRegistryURL: https://eclipseche-dchelladurai-chejune15.calatrava.vmware.com/devfile-registry
gatewayPhase: Established
pluginRegistryURL: https://eclipseche-dchelladurai-chejune15.calatrava.vmware.com/plugin-registry/v3
workspaceBaseDomain: eclipseche-dchelladurai-chejune15.calatrava.vmware.com
my dex.yaml
configuration
---
apiVersion: v1
kind: Namespace
metadata:
name: dex
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: dex
name: dex
namespace: dex
spec:
replicas: 1
selector:
matchLabels:
app: dex
template:
metadata:
labels:
app: dex
spec:
serviceAccountName: dex # This is created below
containers:
- image: ghcr.io/dexidp/dex:v2.30.0
name: dex
command: ["/usr/local/bin/dex", "serve", "/etc/dex/cfg/config.yaml"]
ports:
- name: https
containerPort: 5556
volumeMounts:
- name: config
mountPath: /etc/dex/cfg
- name: tls
mountPath: /etc/dex/tls
env:
- name: GITHUB_CLIENT_ID
valueFrom:
secretKeyRef:
name: github-client
key: client-id
- name: GITHUB_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: github-client
key: client-secret
readinessProbe:
httpGet:
path: /healthz
port: 5556
scheme: HTTPS
volumes:
- name: config
configMap:
name: dex
items:
- key: config.yaml
path: config.yaml
- name: tls
secret:
secretName: dex.example.com.tls
---
kind: ConfigMap
apiVersion: v1
metadata:
name: dex
namespace: dex
data:
config.yaml: |
issuer: https://dex-dchelladurai-chejune15.calatrava.vmware.com
storage:
type: kubernetes
config:
inCluster: true
web:
https: 0.0.0.0:5556
tlsCert: /etc/dex/tls/tls.crt
tlsKey: /etc/dex/tls/tls.key
connectors:
- type: github
id: github
name: GitHub
config:
clientID: f5108abcdef
clientSecret: b193d487a4bfe44abcdef
redirectURI: https://dex-dchelladurai-chejune15.calatrava.vmware.com/callback
org: kubernetes
oauth2:
skipApprovalScreen: true
staticClients:
- id: eclipse-che
redirectURIs:
- 'https://eclipseche-dchelladurai-chejune15.calatrava.vmware.com/oauth/callback'
name: 'eclipse-che'
secret: ZXhhbXBsZS1hcHAtc2VjcmV0
---
apiVersion: v1
kind: Service
metadata:
name: dex
namespace: dex
spec:
type: ClusterIP
ports:
- name: dex
port: 5556
protocol: TCP
targetPort: 5556
selector:
app: dex
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: dex
name: dex
namespace: dex
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dex
rules:
- apiGroups: ["dex.coreos.com"] # API group created by dex
resources: ["*"]
verbs: ["*"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["create"] # To manage its own resources, dex must be able to create customresourcedefinitions
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dex
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: dex
subjects:
- kind: ServiceAccount
name: dex # Service account assigned to the dex pod, created above
namespace: dex # The namespace dex is running in
Relevant information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
@tolusha @sparkoo
below is the
custom-certs
configmap which i created ineclipse-che
namespace as per the [documentation] (https://www.eclipse.org/che/docs/stable/administration-guide/importing-untrusted-tls-certificates/). is this correct?i used below commands to create it
@sparkoo @Divine1 How to configure certificates in Che https://www.eclipse.org/che/docs/stable/administration-guide/importing-untrusted-tls-certificates/