Member-only story

Openshift 3.x Error Resolution: Solving “error: error upgrading connection: Upgrade request required” error when running “oc port-forward” command

Bryant Jimin Son
1 min readNov 10, 2019

--

When using Openshift, you most likely encountered this issue when you are in the step of running oc login from Openshift, possibly by copying from Openshift’s Copy Login Command and then run the oc port-forward from the command line interface or a terminal window

Similar issue can be found throughout Kubernete and some known websocket or load balancer issues

Nevertheless, the error will likely happen when you run Openshift CLI (oc) command that runs port-forward to Openshift hosted pod. That is, you will see an error like this:

error: error upgrading connection: Upgrade request required

after you make oc port-forward command

In this case, try to find out whether the Openshift you are using is behind a security. Find the correct Openshift URL that is not behind the security and write the URL

Open a text editor and modify the default URL that was copied from oc login command

Your modified URL will be like:

oc port-forward URL_OF_OPENSHIFT_NOT_BEHIND_SECURITY 28017:27017

where 28017 is the arbitrary local port and 27017 is the remote port of your Openshift’s pod that you are trying to connect to.

--

--

Bryant Jimin Son
Bryant Jimin Son

Written by Bryant Jimin Son

A cloud practitioner talking about technology, travels & career tips. But I will sometimes cover financial advises and some random stuffs.

No responses yet