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:
It's fixed in rhc-9.3.6.
(In reply to comment #1) > It's fixed in rhc-9.3.6. It's fixed in rhc-0.93.6.
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
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
Fixed on rhc-0.93.13-1+.
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
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.
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>'
(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