Openshift Console redirects to 127.0.0.1 (Localhost)
Openshift Console redirects to 127.0.0.1 (Localhost)
Error:
I have installed the Openshift cluster. When i was trying to access the cluster console using the public IP it was going back to loopback "127.0.0.1" address.Solution:
It happens if you first start it up as a local cluster - and then try to access it via a Private / Public IP Address.To fix it, delete the directory: openshift.local.clusterup
Then run tar -zxvf openshift-origin-server-v3.11.0-0cbc58b-linux-64bit.tar.gz again.
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/console
Step1:
Shutdown the Cluster
oc cluster down
Setp2:reboot the host
Step3:Delete the openshift folder.
rm -rf openshift.local.clusteruprm -rf .kube/
Setp4:Start the Cluster with Public Hostname/IP.
oc cluster up --public-hostname=okd.example.comoc cluster status
Now access the Console:
https://okd.example.com:8443/console/
Example:
[root@openshiftserver ~]# rm -rf openshift.local.clusterup
[root@openshiftserver ~]# rm -rf .kube/
[root@openshiftserver ~]#
[root@openshiftserver ~]# oc cluster up --public-hostname=okd.example.com
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11 is available ...
Checking type of volume mount ...
Determining server IP ...
Checking if OpenShift is already running ...
Checking for supported Docker version (=>1.22) ...
Checking if insecured registry is configured properly in Docker ...
Checking if required ports are available ...
Checking if OpenShift client is configured properly ...
Checking if image openshift/origin-control-plane:v3.11 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11 ...
I0120 12:03:11.429059 2287 config.go:40] Running "create-master-config"
I0120 12:03:13.167195 2287 config.go:46] Running "create-node-config"
I0120 12:03:14.264675 2287 flags.go:30] Running "create-kubelet-flags"
I0120 12:03:14.851766 2287 run_kubelet.go:49] Running "start-kubelet"
I0120 12:03:15.036655 2287 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I0120 12:03:36.048578 2287 interface.go:26] Installing "kube-proxy" ...
I0120 12:03:36.048609 2287 interface.go:26] Installing "kube-dns" ...
I0120 12:03:36.048618 2287 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I0120 12:03:36.048626 2287 interface.go:26] Installing "openshift-apiserver" ...
I0120 12:03:36.048655 2287 apply_template.go:81] Installing "kube-proxy"
I0120 12:03:36.048662 2287 apply_template.go:81] Installing "kube-dns"
I0120 12:03:36.048660 2287 apply_template.go:81] Installing "openshift-apiserver"
I0120 12:03:36.048691 2287 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I0120 12:03:38.051961 2287 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
I0120 12:06:14.074492 2287 run_self_hosted.go:242] openshift-apiserver available
I0120 12:06:14.074939 2287 interface.go:26] Installing "openshift-controller-manager" ...
I0120 12:06:14.074961 2287 apply_template.go:81] Installing "openshift-controller-manager"
I0120 12:06:16.003356 2287 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding web-console ...
Adding registry ...
Adding router ...
Adding sample-templates ...
Adding persistent-volumes ...
Adding centos-imagestreams ...
I0120 12:06:16.018994 2287 interface.go:26] Installing "openshift-web-console-operator" ...
I0120 12:06:16.019019 2287 interface.go:26] Installing "openshift-image-registry" ...
I0120 12:06:16.019027 2287 interface.go:26] Installing "openshift-router" ...
I0120 12:06:16.019035 2287 interface.go:26] Installing "sample-templates" ...
I0120 12:06:16.019042 2287 interface.go:26] Installing "persistent-volumes" ...
I0120 12:06:16.019050 2287 interface.go:26] Installing "centos-imagestreams" ...
I0120 12:06:16.019101 2287 apply_list.go:67] Installing "centos-imagestreams"
I0120 12:06:16.019327 2287 apply_template.go:81] Installing "openshift-web-console-operator"
I0120 12:06:16.019487 2287 interface.go:26] Installing "sample-templates/sample pipeline" ...
I0120 12:06:16.019498 2287 interface.go:26] Installing "sample-templates/mysql" ...
I0120 12:06:16.019506 2287 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I0120 12:06:16.019514 2287 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I0120 12:06:16.019523 2287 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0120 12:06:16.019530 2287 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I0120 12:06:16.019538 2287 interface.go:26] Installing "sample-templates/rails quickstart" ...
I0120 12:06:16.019547 2287 interface.go:26] Installing "sample-templates/mongodb" ...
I0120 12:06:16.019554 2287 interface.go:26] Installing "sample-templates/mariadb" ...
I0120 12:06:16.019561 2287 interface.go:26] Installing "sample-templates/postgresql" ...
I0120 12:06:16.019570 2287 interface.go:26] Installing "sample-templates/django quickstart" ...
I0120 12:06:16.019578 2287 apply_list.go:67] Installing "sample-templates/mysql"
I0120 12:06:16.019606 2287 apply_list.go:67] Installing "sample-templates/django quickstart"
I0120 12:06:16.019745 2287 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
I0120 12:06:16.019896 2287 apply_list.go:67] Installing "sample-templates/dancer quickstart"
I0120 12:06:16.020016 2287 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
I0120 12:06:16.020029 2287 apply_list.go:67] Installing "sample-templates/sample pipeline"
I0120 12:06:16.020157 2287 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
I0120 12:06:16.020219 2287 apply_list.go:67] Installing "sample-templates/rails quickstart"
I0120 12:06:16.020340 2287 apply_list.go:67] Installing "sample-templates/mongodb"
I0120 12:06:16.020346 2287 apply_list.go:67] Installing "sample-templates/mariadb"
I0120 12:06:16.020463 2287 apply_list.go:67] Installing "sample-templates/postgresql"
I0120 12:06:22.590203 2287 interface.go:41] Finished installing "sample-templates/sample pipeline" "sample-templates/mysql" "sample-templates/cakephp quickstart" "sample-templates/dancer quickstart" "sample-templates/jenkins pipeline ephemeral" "sample-templates/nodejs quickstart" "sample-templates/rails quickstart" "sample-templates/mongodb" "sample-templates/mariadb" "sample-templates/postgresql" "sample-templates/django quickstart"
I0120 12:06:42.755148 2287 interface.go:41] Finished installing "openshift-web-console-operator" "openshift-image-registry" "openshift-router" "sample-templates" "persistent-volumes" "centos-imagestreams"
Login to server ...
Creating initial project "myproject" ...
Server Information ...
OpenShift server started.
The server is accessible via web console at: https://okd.example.com:8443
You are logged in as:
User: developer
Password: <any value>
To login as administrator:
oc login -u system:admin
[root@openshiftserver ~]#
[root@openshiftserver ~]# rm -rf .kube/
[root@openshiftserver ~]#
[root@openshiftserver ~]# oc cluster up --public-hostname=okd.example.com
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11 is available ...
Checking type of volume mount ...
Determining server IP ...
Checking if OpenShift is already running ...
Checking for supported Docker version (=>1.22) ...
Checking if insecured registry is configured properly in Docker ...
Checking if required ports are available ...
Checking if OpenShift client is configured properly ...
Checking if image openshift/origin-control-plane:v3.11 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11 ...
I0120 12:03:11.429059 2287 config.go:40] Running "create-master-config"
I0120 12:03:13.167195 2287 config.go:46] Running "create-node-config"
I0120 12:03:14.264675 2287 flags.go:30] Running "create-kubelet-flags"
I0120 12:03:14.851766 2287 run_kubelet.go:49] Running "start-kubelet"
I0120 12:03:15.036655 2287 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I0120 12:03:36.048578 2287 interface.go:26] Installing "kube-proxy" ...
I0120 12:03:36.048609 2287 interface.go:26] Installing "kube-dns" ...
I0120 12:03:36.048618 2287 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I0120 12:03:36.048626 2287 interface.go:26] Installing "openshift-apiserver" ...
I0120 12:03:36.048655 2287 apply_template.go:81] Installing "kube-proxy"
I0120 12:03:36.048662 2287 apply_template.go:81] Installing "kube-dns"
I0120 12:03:36.048660 2287 apply_template.go:81] Installing "openshift-apiserver"
I0120 12:03:36.048691 2287 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I0120 12:03:38.051961 2287 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
I0120 12:06:14.074492 2287 run_self_hosted.go:242] openshift-apiserver available
I0120 12:06:14.074939 2287 interface.go:26] Installing "openshift-controller-manager" ...
I0120 12:06:14.074961 2287 apply_template.go:81] Installing "openshift-controller-manager"
I0120 12:06:16.003356 2287 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding web-console ...
Adding registry ...
Adding router ...
Adding sample-templates ...
Adding persistent-volumes ...
Adding centos-imagestreams ...
I0120 12:06:16.018994 2287 interface.go:26] Installing "openshift-web-console-operator" ...
I0120 12:06:16.019019 2287 interface.go:26] Installing "openshift-image-registry" ...
I0120 12:06:16.019027 2287 interface.go:26] Installing "openshift-router" ...
I0120 12:06:16.019035 2287 interface.go:26] Installing "sample-templates" ...
I0120 12:06:16.019042 2287 interface.go:26] Installing "persistent-volumes" ...
I0120 12:06:16.019050 2287 interface.go:26] Installing "centos-imagestreams" ...
I0120 12:06:16.019101 2287 apply_list.go:67] Installing "centos-imagestreams"
I0120 12:06:16.019327 2287 apply_template.go:81] Installing "openshift-web-console-operator"
I0120 12:06:16.019487 2287 interface.go:26] Installing "sample-templates/sample pipeline" ...
I0120 12:06:16.019498 2287 interface.go:26] Installing "sample-templates/mysql" ...
I0120 12:06:16.019506 2287 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I0120 12:06:16.019514 2287 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I0120 12:06:16.019523 2287 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0120 12:06:16.019530 2287 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I0120 12:06:16.019538 2287 interface.go:26] Installing "sample-templates/rails quickstart" ...
I0120 12:06:16.019547 2287 interface.go:26] Installing "sample-templates/mongodb" ...
I0120 12:06:16.019554 2287 interface.go:26] Installing "sample-templates/mariadb" ...
I0120 12:06:16.019561 2287 interface.go:26] Installing "sample-templates/postgresql" ...
I0120 12:06:16.019570 2287 interface.go:26] Installing "sample-templates/django quickstart" ...
I0120 12:06:16.019578 2287 apply_list.go:67] Installing "sample-templates/mysql"
I0120 12:06:16.019606 2287 apply_list.go:67] Installing "sample-templates/django quickstart"
I0120 12:06:16.019745 2287 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
I0120 12:06:16.019896 2287 apply_list.go:67] Installing "sample-templates/dancer quickstart"
I0120 12:06:16.020016 2287 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
I0120 12:06:16.020029 2287 apply_list.go:67] Installing "sample-templates/sample pipeline"
I0120 12:06:16.020157 2287 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
I0120 12:06:16.020219 2287 apply_list.go:67] Installing "sample-templates/rails quickstart"
I0120 12:06:16.020340 2287 apply_list.go:67] Installing "sample-templates/mongodb"
I0120 12:06:16.020346 2287 apply_list.go:67] Installing "sample-templates/mariadb"
I0120 12:06:16.020463 2287 apply_list.go:67] Installing "sample-templates/postgresql"
I0120 12:06:22.590203 2287 interface.go:41] Finished installing "sample-templates/sample pipeline" "sample-templates/mysql" "sample-templates/cakephp quickstart" "sample-templates/dancer quickstart" "sample-templates/jenkins pipeline ephemeral" "sample-templates/nodejs quickstart" "sample-templates/rails quickstart" "sample-templates/mongodb" "sample-templates/mariadb" "sample-templates/postgresql" "sample-templates/django quickstart"
I0120 12:06:42.755148 2287 interface.go:41] Finished installing "openshift-web-console-operator" "openshift-image-registry" "openshift-router" "sample-templates" "persistent-volumes" "centos-imagestreams"
Login to server ...
Creating initial project "myproject" ...
Server Information ...
OpenShift server started.
The server is accessible via web console at: https://okd.example.com:8443
You are logged in as:
User: developer
Password: <any value>
To login as administrator:
oc login -u system:admin
[root@openshiftserver ~]#
The default route https:/:8443/ will still bring you to 127.0.0.1.
The route https:/:8443/console/ will bring you to the dashboard.
Credits:
https://github.com/openshift/origin/issues/20726
0 Response to "Openshift Console redirects to 127.0.0.1 (Localhost)"
Post a Comment