origin: Access fail with 'oc cluster up --public-hostname=' and redirect to 127.0.0.1
Version
oc v3.10.0+dd10d17
Steps To Reproduce
oc cluster up --public-hostname=‘<public ip>’
Current Result
oc v3.10.0+dd10d17
kubernetes v1.10.0+b81c8f8
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://127.0.0.1:8443
openshift v3.10.0+a5e4ac9-10
kubernetes v1.10.0+b81c8f8
When I access https://<public ip>:8443,redirecting the address https://127.0.0.1:8443.
Expected Result
When I access https://<public ip>:8443, I could access normaly.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 9
- Comments: 28 (9 by maintainers)
Hello,
Yes, this does happen if you first start it up as a local cluster - and then realise you need to access it via a Private / Public IP Address.
To fix it, delete the directory:
openshift.local.clusterupor even better, delete the entire top level directoryopenshift-origin-server-v3.11.0-0cbc58b-linux-64bit.Then run
tar -zxvf openshift-origin-server-v3.11.0-0cbc58b-linux-64bit.tar.gzagain.And start up the cluster using:
oc cluster up --public-hostname=<Public IP>You should now be able to access it via:
https://<Public IP>:8443/consoleHi all, in the end, I access the console successful though https:/<public-ip>:8443/console/.
Even after you have run
oc cluster up --public-hostname=<server-ip> --routing-suffix=<server-ip>.nip.io, you will need to access link as https:/<public-ip>:8443/console/ and not https:/<public-ip>:8443.The default route https:/<public-ip>:8443/ will still bring you to 127.0.0.1.
The route https:/<public-ip>:8443/console/ will bring you to the dashboard.
Issue still present. Working on:
After:
web console is still bound to 127.0.0.1 (
https://okd:8443is redirected tohttps://127.0.0.1:8443):After launching:
web console remains bound to 127.0.0.1 (instead of okd):
https://okd:8443still gets redirected tohttps://127.0.0.1:8443Any hint?
Thanks, @jinalshah .
Going to
https://<Public IP>:8443/consolenow works.Though
https://<Public IP>:8443/is still redirected tohttps://127.0.0.1:8443/consoleSo, somehow it’s the
/consolethat matters.It seams a kind of leftover from a previous attempt, if I delete the whole ~/openshift.local.clusterup and retry it works as expected. Reproduction step: oc cluster up oc cluster down oc cluster up --public-hostname=<pubilc_hostname>