Bug 823854 - Fail to port forward the app port in win7 and Mac.
Summary: Fail to port forward the app port in win7 and Mac.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-22 10:12 UTC by yquan
Modified: 2015-05-15 01:54 UTC (History)
4 users (show)

Fixed In Version: rhc-0.93.13-1+
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-08 17:59:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yquan 2012-05-22 10:12:38 UTC
Description of problem:
Fail to forward the app port in win7, and will return the error message like below:

C:\Users\window7>rhc-port-forward -a php2 -p xx
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/bin/rhc-port-forward:122:in `bloc

k (2 levels) in <top (required)>': undefined method `each' for "127.0.250.1:3306

\n127.0.250.1:8080\n":String (NoMethodError)

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/session.rb:326:in `call'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/session.rb:326:in `block (3 levels) in exec'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/channel.rb:568:in `call'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/channel.rb:568:in `do_data'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/session.rb:556:in `channel_data'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/session.rb:456:in `dispatch_incoming_packets'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/session.rb:213:in `preprocess'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/session.rb:197:in `process'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/session.rb:161:in `block in loop'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/session.rb:161:in `loop'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/session.rb:161:in `loop'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/channel.rb:269:in `wait'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/conne

ction/session.rb:355:in `exec!'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/bin/rhc-port-forward

:103:in `block in <top (required)>'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh.rb:19

3:in `start'

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/bin/rhc-port-forward

:101:in `<top (required)>'

        from c:/Ruby193/bin/rhc-port-forward:23:in `load'

        from c:/Ruby193/bin/rhc-port-forward:23:in `<main>'

Version-Release number of selected component (if applicable):
devenv_1785
rhc-0.93.3
ruby-1.9.3
How reproducible:
always

Steps to Reproduce:
1.create an app
2.embed the mysql to the app
3.use command "rhc-port-forward -a $appname" or "rhc port-forward -a $appname"
  
Actual results:
It will fail to forward the port, and return the message like above.

Expected results:
It should forward the app's port successfully.

Additional info:

Comment 1 yquan 2012-05-23 05:01:33 UTC
It's fixed in rhc-9.3.6.

Comment 2 yquan 2012-05-23 05:04:48 UTC
(In reply to comment #1)
> It's fixed in rhc-9.3.6.


It's fixed in rhc-0.93.6.

Comment 3 yquan 2012-05-23 05:25:02 UTC
I tested it again.
It still can't port-forward in rhc-0.93.6, and it will return messages like below.


c:\Users\window7>rhc port-forward -a php4
Password: **

Checking available ports...

Binding httpd -> 127.0.250.1:8080
mysqld -> 127.0.250.1:3306...
Use ctl + c to stop

Error trying to forward ports. You can try to forward manually by running:

ssh -N -L 127.0.250.1:3306
127.0.250.1:8080:127.0.250.1:3306
127.0.250.1:8080 368ded717f0a46599cb57fcc32312549.rhcloud.
com

Comment 4 yquan 2012-05-23 05:45:11 UTC
I tested in Mac os.
Environment:
ruby-1.8.7
gem-1.3.5
rhc-0.93.6

The output of the test is like below:

OpenShiftmatoMacBook-Pro:~ root# rhc port-forward -a php4
Password: **

Checking available ports...
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh.rb:195:in `start': 368ded717f0a46599cb57fcc32312549 (Net::SSH::AuthenticationFailed)
	from /Library/Ruby/Gems/1.8/gems/rhc-0.93.6/bin/rhc-port-forward:101
	from /usr/bin/rhc-port-forward:19:in `load'
	from /usr/bin/rhc-port-forward:19

Comment 5 Fabiano Franz 2012-05-29 22:12:21 UTC
Fixed on rhc-0.93.13-1+.

Comment 6 Meng Bo 2012-05-30 10:49:59 UTC
still not fixed.
Mac:
bash-3.2$ rhc port-forward -a php1 -d
Password: ******

Submitting form:
debug: true
rhlogin: bmeng
Contacting https://int.openshift.redhat.com
Checking available ports...
Using 5bbaf54393164061883c9c0c76e0e1a0.rhcloud.com...

Binding httpd -> 127.5.31.1:8080...
Binding mysqld -> 127.5.31.1:3306...
Use ctl + c to stop

Can't assign requested address - bind(2)
Error trying to forward ports. You can try to forward manually by running:

ssh -N -L 127.5.31.1:3306:127.5.31.1:3306 -L 127.5.31.1:8080:127.5.31.1:8080 5bbaf54393164061883c9c0c76e0e1a0.rhcloud.com


Windows:
rhc port-forward -a php1 -d
Password: ******

Submitting form:
debug: true
rhlogin: bmeng
Contacting https://int.openshift.redhat.com
Checking available ports...
Using 5bbaf54393164061883c9c0c76e0e1a0.rhcloud.com...

Binding httpd -> 127.5.31.1:8080...
Binding mysqld -> 127.5.31.1:3306...
Use ctl + c to stop

unintialized constant Net::SSH::KnownHosts::SUPPORTED_TYPE
Error trying to forward ports. You can try to forward manually by running:

ssh -N -L 127.5.31.1:3306:127.5.31.1:3306 -L 127.5.31.1:8080:127.5.31.1:8080 5bbaf54393164061883c9c0c76e0e1a0.rhcloud.com

Comment 7 Fabiano Franz 2012-05-30 15:33:08 UTC
On the Mac platform I think the issue is the one specified in 4.4.1.1. below. In that case it's a known issue, not a bug, and there is a workaround:

http://docs.redhat.com/docs/en-US/OpenShift/2.0/html/User_Guide/sect-User_Guide-Application_Maintenance_Monitoring_and_Troubleshooting-Performing_Application_Maintenance_from_Your_Workstation.html

Regarding Windows could you please specify which version of Windows and RubyInstaller? It's working fine with Windows XP and latest RubyInstaller here.

Comment 8 yquan 2012-05-31 06:39:19 UTC
It still exist on ruby-1.9 ,rhc-0.93.16.

output:


C:\Users\window7>rhc port-forward -a jboss0
Password: **

Checking available ports...
c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh.rb:200:in `start':
 d91994d106b040248c391d05c967ebe2 (Net::SSH::AuthenticationFailed)
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.16/bin/rhc-port-forwar
d:107:in `<top (required)>'
        from c:/Ruby193/bin/rhc-port-forward:23:in `load'
        from c:/Ruby193/bin/rhc-port-forward:23:in `<main>'

Comment 9 Xiaoli Tian 2012-05-31 11:48:30 UTC
(In reply to comment #8)
> It still exist on ruby-1.9 ,rhc-0.93.16.
> 
> output:
> 
> 
> C:\Users\window7>rhc port-forward -a jboss0
> Password: **
> 
> Checking available ports...
> c:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh.rb:200:in
> `start':
>  d91994d106b040248c391d05c967ebe2 (Net::SSH::AuthenticationFailed)
>         from
> c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.16/bin/rhc-port-forwar
> d:107:in `<top (required)>'
>         from c:/Ruby193/bin/rhc-port-forward:23:in `load'
>         from c:/Ruby193/bin/rhc-port-forward:23:in `<main>'

It works for me on windows 7 x86_64 with ruby 1.9.3 p194 and rhc-0.93.16

C:\Users\Administrator>rhc port-forward --app scalejboss2 -p 1
Checking available ports...

Binding haproxy -> 127.0.251.129:8080...
Binding haproxy -> 127.0.251.130:8080...
Binding java -> 127.0.252.1:3528...
Binding java -> 127.0.252.1:4447...
Binding java -> 127.0.252.1:5445...
Binding java -> 127.0.252.1:5455...
Binding java -> 127.0.252.1:8080...
Binding java -> 127.0.252.1:9990...
Binding java -> 127.0.252.1:9999...
Binding java -> 127.0.253.129:3528...
Binding java -> 127.0.253.129:4447...
Binding java -> 127.0.253.129:5445...
Binding java -> 127.0.253.129:5455...
Binding java -> 127.0.253.129:8080...
Binding java -> 127.0.253.129:9990...
Binding java -> 127.0.253.129:9999...
Use ctl + c to stop


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