Command "oc login" returning "Internal error occurred: unexpected response: 500"

Solution Verified - Updated -

Issue

  • Following error shows up when command "oc login" is executed:
# oc login --loglevel=10
I0301 15:58:16.419931   95105 loader.go:359] Config loaded from file /root/.kube/config
I0301 15:58:16.420960   95105 loader.go:359] Config loaded from file /root/.kube/config
I0301 15:58:16.421302   95105 round_trippers.go:386] curl -k -v -XHEAD  'https://<hostname>:8443/'
I0301 15:58:16.434608   95105 round_trippers.go:405] HEAD https://<hostname>:8443/ 403 Forbidden in 13 milliseconds
I0301 15:58:16.434636   95105 round_trippers.go:411] Response Headers:
I0301 15:58:16.434654   95105 round_trippers.go:414]     X-Content-Type-Options: nosniff
I0301 15:58:16.434665   95105 round_trippers.go:414]     Content-Length: 210
I0301 15:58:16.434681   95105 round_trippers.go:414]     Date: Fri, 01 Mar 2019 15:58:16 GMT
I0301 15:58:16.434692   95105 round_trippers.go:414]     Cache-Control: no-store
I0301 15:58:16.434702   95105 round_trippers.go:414]     Content-Type: application/json
I0301 15:58:16.434750   95105 round_trippers.go:386] curl -k -v -XGET  -H "X-Csrf-Token: 1" 'https://<hostname>:8443/.well-known/oauth-authorization-server'
I0301 15:58:16.436208   95105 round_trippers.go:405] GET https://<hostname>:8443/.well-known/oauth-authorization-server 200 OK in 1 milliseconds
I0301 15:58:16.436235   95105 round_trippers.go:411] Response Headers:
I0301 15:58:16.436251   95105 round_trippers.go:414]     Cache-Control: no-store
I0301 15:58:16.436262   95105 round_trippers.go:414]     Content-Type: application/json
I0301 15:58:16.436276   95105 round_trippers.go:414]     Content-Length: 600
I0301 15:58:16.436287   95105 round_trippers.go:414]     Date: Fri, 01 Mar 2019 15:58:16 GMT
I0301 15:58:16.436643   95105 round_trippers.go:386] curl -k -v -XGET  -H "X-Csrf-Token: 1" 'https://<hostname>:8443/oauth/authorize?client_id=openshift-challenging-client&code_challenge=YPLpu7591PQqpR9K7bk3wwExERRtg-UF4wlRYtiMHL4&code_challenge_method=S256&redirect_uri=https%3A%2F%2F<hostname>%3A8443%2Foauth%2Ftoken%2Fimplicit&response_type=code'
I0301 15:58:16.453828   95105 round_trippers.go:405] GET https://<hostname>:8443/oauth/authorize?client_id=openshift-challenging-client&code_challenge=YPLpu7591PQqpR9K7bk3wwExERRtg-UF4wlRYtiMHL4&code_challenge_method=S256&redirect_uri=https%3A%2F%2F<hostname>%3A8443%2Foauth%2Ftoken%2Fimplicit&response_type=code 401 Unauthorized in 17 milliseconds
I0301 15:58:16.453877   95105 round_trippers.go:411] Response Headers:
I0301 15:58:16.453894   95105 round_trippers.go:414]     Www-Authenticate: Basic realm="openshift"
I0301 15:58:16.453910   95105 round_trippers.go:414]     Content-Type: text/plain; charset=utf-8
I0301 15:58:16.453925   95105 round_trippers.go:414]     Content-Length: 0
I0301 15:58:16.453937   95105 round_trippers.go:414]     Date: Fri, 01 Mar 2019 15:58:16 GMT
Authentication required for https://<hostname>:8443 (openshift)
Username: admin
Password:
I0301 15:58:18.774872   95105 round_trippers.go:386] curl -k -v -XGET  -H "Authorization: Basic YWRtaW46ZXVyb3BjYXI=" -H "X-Csrf-Token: 1" 'https://<hostname>:8443/oauth/authorize?client_id=openshift-challenging-client&code_challenge=YPLpu7591PQqpR9K7bk3wwExERRtg-UF4wlRYtiMHL4&code_challenge_method=S256&redirect_uri=https%3A%2F%2F<hostname>%3A8443%2Foauth%2Ftoken%2Fimplicit&response_type=code'
I0301 15:58:18.781247   95105 round_trippers.go:405] GET https://<hostname>:8443/oauth/authorize?client_id=openshift-challenging-client&code_challenge=YPLpu7591PQqpR9K7bk3wwExERRtg-UF4wlRYtiMHL4&code_challenge_method=S256&redirect_uri=https%3A%2F%2F<hostname>%3A8443%2Foauth%2Ftoken%2Fimplicit&response_type=code 500 Internal Server Error in 6 milliseconds
I0301 15:58:18.781270   95105 round_trippers.go:411] Response Headers:
I0301 15:58:18.781280   95105 round_trippers.go:414]     Content-Length: 29
I0301 15:58:18.781288   95105 round_trippers.go:414]     Date: Fri, 01 Mar 2019 15:58:18 GMT
I0301 15:58:18.781296   95105 round_trippers.go:414]     Content-Type: text/plain; charset=utf-8
I0301 15:58:18.781449   95105 helpers.go:201] server response object: [{
  "metadata": {},
  "status": "Failure",
  "message": "Internal error occurred: unexpected response: 500",
  "reason": "InternalError",
  "details": {
    "causes": [
      {
        "message": "unexpected response: 500"
      }
    ]
  },
  "code": 500
}]
F0301 15:58:18.781512   95105 helpers.go:119] Error from server (InternalError): Internal error occurred: unexpected response: 500

Environment

  • Openshift Container Platform 3.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In