Bug 1406066
| Summary: | [RFE] Throw a more user friendly error if oc hits an open port that doesn't belong to OpenShift | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Nick Schuetz <nschuetz> |
| Component: | oc | Assignee: | Maciej Szulik <maszulik> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Xingxing Xia <xxia> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.3.1 | CC: | aos-bugs, ffranz, jokerman, mmccomas, nschuetz, xiaocwan, yanpzhan, yapei |
| Target Milestone: | --- | ||
| Target Release: | 3.7.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: |
Feature:
Provide more user friendly error when trying to log to non-OpenShift cluster.
Reason:
Be able to clearly identify why login fails.
Result:
oc login provides more user friendly error when trying to login into non-OpenShift cluster.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-11-21 18:38:10 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Nick Schuetz
2016-12-19 15:59:09 UTC
> Message indicating that the server is not available on that port. Maybe still
> include the HTTP response, but perhaps there should be some suggestion to use
> <your server url>:8443 too?
I agree with including a suggestion to try the default cluster port, however it would not always be accurate to say that "the server is not available on that port", as it might be the openshift server that is being hit, but simply returning an internal error response. Will open PR
Related PR: https://github.com/openshift/origin/pull/12654 @ffranz would this be something we could backport, or is it better to wait until this patch makes it into the next version of ocp? Wasn't this reverted by https://github.com/openshift/origin/commit/91b914e74234a473734162bb7e610859e1103b31 ? It wasn't nevermind. I think it was supposed to be in v3.5.0.50 already. Anyway it's not going to be backported. (In reply to Nick Schuetz from comment #0) > 1. oc login <your server with port 443 open but not by OpenShift> > F1219 09:25:44.993218 39620 helpers.go:110] Error from server: Internal > error occurred: unexpected response: 503 Trying to install apache/nginx with 443 port on openshift 8443 env. Will continue next day Checked multiple situations in oc/OCP v3.7.0-0.182.0. Below situations work well: a. Specify port 8445 not opened in server $ oc login https://$MASTER:8445 error: dial tcp ...:8445: getsockopt: no route to host - verify you have provided the correct host and port and that the server is currently running b. Specify port 443 not opened in server error: dial tcp ...:443: getsockopt: connection refused - verify you have provided the correct host and port and that the server is currently running Above all include "verify you ... correct host and port ... currently running" as the PR intends Verified in oc v3.7.0-0.189.0 for comment 10, now the errors are appended with "verify ... currently running": error: json: cannot unmarshal number into Go value of type util.OauthAuthorizationServerMetadata - verify you have provided the correct host and port and that the server is currently running. error: invalid character '<' looking for beginning of value - verify you have provided the correct host and port and that the server is currently running. |