I came across an interesting situation yesterday with OpenShift Express.  I was trying to register a new domain using rhc-create-app  and received this cryptic error message:

There was a problem communicating with the server.
Response message: getaddrinfo: Servname not supported for ai_socktype
If you were disconnected it is possible the operation finished withoutbeing able to report success.
You can use rhc-user-info and rhc-ctl-app to learn about the statusof your user and application(s).

After a bit of rooting around and troubleshooting with the always helpful people on #openshift on irc.freenode.net, in this case Mike McGrath, we discovered that I had an http proxy set in my shell variables. One way to troubleshoot this error message is to review all the variables set in your session and look for something like this:

$ export | grep -E 'prox|http'

And look what we found:

declare -x HTTP_PROXY="http://localhost:8080/"
declare -x http_proxy="http://localhost:8080/"
declare -x no_proxy="localhost,"

I’m told the rhc tools have difficulty communicating over a proxy, but that a bug has been filed and is scheduled to be fixed.

This appears to be symptomatic of the way that switching web proxies with the ProxySwitchy! plug-in in google-chrome affects all desktop proxy settings.  A quick look at System → Preferences → Network Proxy shows that this setting has been made at a global level for the Gnome Desktop which I know I did not do.  I’m running RHEL 6.1.

Also interesting that this problem is limited to gnome-terminal.  Terminator does not import the global proxy variables the same way gnome-terminal does and in this case that is good.

It seems the best work-around if you not need a web proxy is to unset the http proxy variables or use Terminator.