Bug 1291628 - rhc setup blocks forever on Debian/Ubuntu if installed via dpkg/sudo apt-get install rhc
rhc setup blocks forever on Debian/Ubuntu if installed via dpkg/sudo apt-get ...
Status: CLOSED WONTFIX
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Rory Thrasher
Wei Sun
: UpcomingRelease
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-15 05:24 EST by contato
Modified: 2017-05-31 14:22 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-31 14:22:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1531613 None None None 2016-01-06 17:22 EST

  None (edit)
Description contato 2015-12-15 05:24:10 EST
Following the guide at https://developers.openshift.com/en/getting-started-debian-ubuntu.html
After sudo apt-get install rhc and rhc setup it blocks forever before prompting for credentials:

rhc setup --debug
DEBUG: Using config file /home/macedo/.openshift/express.conf
DEBUG: Running greeting_stage
OpenShift Client Tools (RHC) Setup Wizard

This wizard will help you upload your SSH keys, set your application namespace,
and check that other programs like Git are properly installed.
DEBUG: Running server_stage

If you have your own OpenShift server, you can specify it now. Just hit enter to
use the server for OpenShift Online: openshift.redhat.com.


You can add more servers later using 'rhc server'.
DEBUG: Running login_stage
DEBUG: Connecting to https://openshift.redhat.com/broker/rest/api
DEBUG: Client supports API versions 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7
DEBUG: Created new httpclient
DEBUG: Request GET https://openshift.redhat.com/broker/rest/api
DEBUG:    code 200 6565 ms
DEBUG: Server supports API versions 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7
DEBUG:    Using API version 1.7
DEBUG: Client API version 1.7 is not current. Refetching API
DEBUG: Request GET https://openshift.redhat.com/broker/rest/api
DEBUG:    code 200  513 ms
DEBUG: Getting user info
DEBUG: Request GET https://openshift.redhat.com/broker/rest/user


WAITS FOREVER HERE
Comment 1 Rory Thrasher 2015-12-17 15:16:26 EST
Hello there,

How long did you let the command run before stopping it?

Can you retry this command and make sure it runs for 10-15 minutes to see if it makes it?
Comment 2 contato 2015-12-29 10:09:00 EST
(In reply to Rory Thrasher from comment #1)
> Hello there,
> 
> How long did you let the command run before stopping it?
> 
> Can you retry this command and make sure it runs for 10-15 minutes to see if
> it makes it?

I can confirm it blocks for many hours. Even connecting to diverse vpn around the globe it still blocks like forever / more than an hour.
Comment 3 Rory Thrasher 2016-01-04 10:02:11 EST
Thanks for checking through a VPN - it looks like its not a network issue then.

I was able to successfully run rhc setup on an older ubuntu VM here, so my guess is that there might be a dependency issue with the versions of the software you're running.  Can you give me information on the version of ubuntu, ruby, rubygems, rhc, and git that your system is using?  I'll try to replicate your system as closely as possible to see if I can reproduce this on my end to diagnose.
Comment 4 contato 2016-01-04 11:37:11 EST
lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 15.10
Release:	15.10
Codename:	wily


rhc --version
rhc 0.0.0

ruby --version
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]

gem --version
2.2.2

git --version
git version 2.5.0
Comment 5 contato 2016-01-04 11:54:34 EST
Is there any Docker Image/build script for rhc I could test it ?
Comment 6 Rory Thrasher 2016-01-04 16:49:57 EST
I don't have any tests for rhc, but having a version of 0.0.0 definitely means that something is wrong.


My test on the ubuntu 12 VM I had lying around used rubygems to download rhc 1.38.4 (since the apt-get package wasn't available for ubuntu 12, I wasn't able to test that out).  I'll be setting up an ubuntu 15.10 VM this week hopefully to try and duplicate the issue.


In the meantime, with the rhc version of 0.0.0, I'd guess that perhaps the rhc install went wrong somehow - I would remove rhc and try to reinstall it with apt-get.  If the version is still 0.0.0 and/or the command hangs for more than 30 seconds or so at the same point - then I'd again remove it and use the gem instructions to install rhc and see if that works better.
Comment 7 contato 2016-01-05 12:45:10 EST
After uninstall and install with apt-get I got what could be the real version used:

Preparing to unpack .../archives/rhc_1.35.4-3_all.deb ...
Unpacking rhc (1.35.4-3) ...
Processing triggers for man-db (2.7.4-1) ...
Setting up rhc (1.35.4-3) ...

rhc --version still reports 0.0.0 and the problem persist. I will try the gem way.
Comment 8 Rory Thrasher 2016-01-06 13:24:56 EST
So I've created an ubuntu 15.10 VM and verified that the apt-get rhc repository is out of date (1.35.4-3) and isn't working on this version of ubuntu.  My VM hangs at the same point.

Following the instructions for installation by rubygems was successful, with the exception that the rhc wasn't added to PATH.  I was able to get past the where the script was hanging and actually reach the login section with the rubygem version of rhc.  Note that you may want to add /var/lib/gems/2.1.0/gems to your PATH.



$ /var/lib/gems/2.1.0/gems/rhc-1.38.4/bin/rhc setup --debug
DEBUG: Using config file /home/macedo/.openshift/express.conf
DEBUG: Running greeting_stage
OpenShift Client Tools (RHC) Setup Wizard

This wizard will help you upload your SSH keys, set your application namespace,
and check that other programs like Git are properly installed.
DEBUG: Running server_stage

If you have your own OpenShift server, you can specify it now. Just hit enter to
use the server for OpenShift Online: openshift.redhat.com.


You can add more servers later using 'rhc server'.
DEBUG: Running login_stage
DEBUG: Connecting to https://openshift.redhat.com/broker/rest/api
DEBUG: Client supports API versions 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7
DEBUG: Created new httpclient
DEBUG: Request GET https://openshift.redhat.com/broker/rest/api
DEBUG:    code 200 6565 ms
DEBUG: Server supports API versions 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7
DEBUG:    Using API version 1.7
DEBUG: Client API version 1.7 is not current. Refetching API
DEBUG: Request GET https://openshift.redhat.com/broker/rest/api
DEBUG:    code 200  513 ms
DEBUG: Getting user info
DEBUG: Request GET https://openshift.redhat.com/broker/rest/user

Login to openshift.redhat.com:




Hopefully that should get you up and running.  I'm going to look into the rhc package thats part of the ubuntu repositories and see if I can figure out whats going on there.
Comment 9 Rory Thrasher 2016-01-06 17:22:13 EST
Looks like the package in the ubuntu repo may not have been created correctly.  Opened a bug report on ubuntu's launchpad page.
Comment 10 Rory Thrasher 2016-01-12 16:09:44 EST
We'll keep up to date with the Ubuntu bug report and keep pushing them to fix this.
Comment 11 Mohan 2016-04-05 15:30:45 EDT
Hello Rory,

Plesae do you have any updates on ubuntu repo? I'm running into same issues on Ubuntu 15.10. Even the suggested method is not working.

$ /var/lib/gems/2.1.0/gems/rhc-1.38.4/bin/rhc setup --debug

# /var/lib/gems/2.1.0/gems/rhc-1.38.4/bin/rhc setup --debug
DEBUG: Using config file /home/harshick/.openshift/express.conf
DEBUG: Running greeting_stage
OpenShift Client Tools (RHC) Setup Wizard

This wizard will help you upload your SSH keys, set your application namespace, and check that other programs like Git are properly installed.
DEBUG: Running server_stage

If you have your own OpenShift server, you can specify it now. Just hit enter to use the server for OpenShift Online: openshift.redhat.com.


You can add more servers later using 'rhc server'.
DEBUG: Running login_stage
DEBUG: Connecting to https://openshift.redhat.com/broker/rest/api
DEBUG: Client supports API versions 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7
DEBUG: Created new httpclient
DEBUG: Request GET https://openshift.redhat.com/broker/rest/api
DEBUG:    code 200 1382 ms
DEBUG: Server supports API versions 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7
DEBUG:    Using API version 1.7
DEBUG: Client API version 1.7 is not current. Refetching API
DEBUG: Request GET https://openshift.redhat.com/broker/rest/api
DEBUG:    code 200  379 ms
DEBUG: Getting user info
DEBUG: Request GET https://openshift.redhat.com/broker/rest/user

DEBUG:    code 401 102887 ms

DEBUG: Request GET https://openshift.redhat.com/broker/rest/user
DEBUG:    code 401  590 ms

DEBUG: Request GET https://openshift.redhat.com/broker/rest/user

DEBUG:    code 401  791 ms

DEBUG: Request GET https://openshift.redhat.com/broker/rest/user
DEBUG:    code 401  586 ms

DEBUG: Request GET https://openshift.redhat.com/broker/rest/user
DEBUG:    code 401  576 ms
DEBUG: Response did not include a message from server: invalid character at "HTTP Basic"
Not authenticated
Comment 12 Rory Thrasher 2016-04-05 16:41:10 EDT
Hi Mohan,

Unfortunately I haven't heard much from the Ubuntu folks on this bug.  I'm not sure when it will be fixed or even who is in charge of fixing it.  I would definitely stick with using gem install for rhc.


Your install looks to be a different problem, as its failing to authenticate to https://openshift.redhat.com/broker/rest/user instead of hanging.

I've attempting to recreate your problem in a VM and could not reproduce it.  I tested with ruby 2.1.0 and ruby 2.1.8 and installed rhc with 'gem install rhc'.  When running 'rhc setup --debug', I was successfully getting a 200 response where you were getting a 401 response.

It may have been a temporary connection problem - can you try rhc setup --debug again and see if the issue persists?  You may try a clean install of rhc as well.  If it still persists, then I would open up a new bug for it and include as much information as you can, as it looks to be a different issue.  If you do create a new bug, feel free to assign it to my email <rthrashe@redhat.com>.

Hope that helps,
Rory
Comment 13 Michael Vorburger 2016-05-15 16:10:04 EDT
+1 I've just hit this as well, on latest Ubuntu 16.04.

Proposing to change doc until this is resolved, see https://github.com/openshift/devcenter/pull/457

> haven't heard much from the Ubuntu folks on this bug

If you could link to "this bug" here, we could vote for it there.

I suggest to change the title of this issue from "rhc setup blocks forever" to "rhc setup blocks forever on Debian/Ubuntu if installed via dpkg/sudo apt-get install rhc".
Comment 14 Rory Thrasher 2016-05-16 12:34:19 EDT
Bug title changed to be more specific.

There is a link to the launchpad in the external trackers, but it can also be found here: https://bugs.launchpad.net/ubuntu/+source/rhc/+bug/1531613
Comment 15 Eric Paris 2017-05-31 14:22:11 EDT
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.

Note You need to log in before you can comment on or make changes to this bug.