rhc端口转发错误 - ruby

时间:2016-02-07 18:24:10

标签: openshift portforwarding

当我尝试连接Ruby错误时,无法在mac上使用rhc port-forward

我在Mac Yosemite 10.10.5上运行

ruby --version
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14]

rhc port-forward显示以下内容:

Service         Local                OpenShift
--------------- --------------- ---- --------------------------------------------------------
haproxy         127.0.0.1:8080   =>  127.11.188.2:8080
haproxy         127.0.0.1:8081   =>  127.11.188.3:8080
node            127.0.0.1:8082   =>  127.11.188.1:8080
node            127.0.0.1:3000   =>  *:3000
s_redis_db_host 127.0.0.1:50681  =>  56a388737628e1252200004b-bartonhammond.rhcloud.com:50681

我运行环回config sudo ifconfig lo0 alias 127.11.188.1

我将浏览器指向127.0.0.1:3000rhc port-forward命令错误:

/Library/Ruby/Gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/ruby_compat.rb:30:in `select': closed stream (IOError)
from /Library/Ruby/Gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/ruby_compat.rb:30:in `io_select'
from /Library/Ruby/Gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:210:in `process'
from /Library/Ruby/Gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `block in loop'
from /Library/Ruby/Gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
from /Library/Ruby/Gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:170:in `loop'
from /Library/Ruby/Gems/2.0.0/gems/rhc-1.38.4/lib/rhc/commands/port_forward.rb:171:in `block (2 levels) in run'
from /Library/Ruby/Gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh.rb:215:in `start'
from /Library/Ruby/Gems/2.0.0/gems/rhc-1.38.4/lib/rhc/commands/port_forward.rb:125:in `block in run'
from /Library/Ruby/Gems/2.0.0/gems/net-ssh-2.9.2/lib/net/ssh.rb:215:in `start'
from /Library/Ruby/Gems/2.0.0/gems/rhc-1.38.4/lib/rhc/commands/port_forward.rb:86:in `run'
from /Library/Ruby/Gems/2.0.0/gems/rhc-1.38.4/lib/rhc/commands.rb:294:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/rhc-1.38.4/lib/rhc/commands.rb:285:in `block (3 levels) in to_commander'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:155:in `run'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/runner.rb:421:in `run_active_command'
from /Library/Ruby/Gems/2.0.0/gems/rhc-1.38.4/lib/rhc/command_runner.rb:72:in `run!'
from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/delegates.rb:8:in `run!'
from /Library/Ruby/Gems/2.0.0/gems/rhc-1.38.4/lib/rhc/cli.rb:37:in `start'
from /Library/Ruby/Gems/2.0.0/gems/rhc-1.38.4/bin/rhc:20:in `<top (required)>'
from /usr/bin/rhc:23:in `load'
from /usr/bin/rhc:23:in `<main>'

1 个答案:

答案 0 :(得分:0)

你不需要做这个部分

I run the loop back config sudo ifconfig lo0 alias 127.11.188.1

运行rhc port-forward命令后,您需要做的就是将浏览器指向127.0.0.1:3000并且它应该可以正常工作