0

我对openshift有点新,我试图尝试一下。 在运行rhc port-forward -a命令时遵循this教程。我收到了权限被拒绝的错误。任何想法我做错了什么?当试图在openshift中转发端口时,权限被拒绝

问题不在于密码。如果你输入了错误的密码,你会得到一个不同的错误信息

感谢

C:\development\infra\appServer\apache-tomcat-7.0.27\bin>rhc port-forward -a <My WebApp> 
Password: ***** 

Checking available ports... 
Forwarding ports 
C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/net-ssh-2.6.3/lib/net/ssh/service/forward.rb:68:in `initialize': Permission denied - bind(2) (Errno::EAC 
CES) 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/net-ssh-2.6.3/lib/net/ssh/service/forward.rb:68:in `new' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/net-ssh-2.6.3/lib/net/ssh/service/forward.rb:68:in `local' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/rhc-1.2.7/lib/rhc/commands/port-forward.rb:133:in `block (3 levels) in run' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/rhc-1.2.7/lib/rhc/commands/port-forward.rb:127:in `each' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/rhc-1.2.7/lib/rhc/commands/port-forward.rb:127:in `block (2 levels) in run' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/net-ssh-2.6.3/lib/net/ssh.rb:193:in `start' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/rhc-1.2.7/lib/rhc/commands/port-forward.rb:125:in `block in run' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/net-ssh-2.6.3/lib/net/ssh.rb:193:in `start' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/rhc-1.2.7/lib/rhc/commands/port-forward.rb:88:in `run' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/rhc-1.2.7/lib/rhc/commands.rb:138:in `block (3 levels) in to_commander' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:180:in `call' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:180:in `call' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:155:in `run' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:402:in `run_active_command' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/rhc-1.2.7/lib/rhc/command_runner.rb:54:in `run!' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/delegates.rb:11:in `run!' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/rhc-1.2.7/lib/rhc/cli.rb:40:in `start' 
     from C:/development/infra/buildtools/RubyInstaller193/lib/ruby/gems/1.9.1/gems/rhc-1.2.7/bin/rhc:21:in `<top (required)>' 
     from C:/development/infra/buildtools/RubyInstaller193/bin/rhc:23:in `load' 
     from C:/development/infra/buildtools/RubyInstaller193/bin/rhc:23:in `<main>' 

回答

1

看起来你正在运行的RHC客户端工具(1.2.7)的旧版本。更新客户端工具(gem update rhc)后请再试一次。

该错误表明您的主机无法绑定特定的本地端口,可能会导致它正在使用中。最新的rhc客户端通过绑定到下一个打开的端口进行响应。如果您在更新后仍然遇到问题,请告知我们。

+0

它实际上工作。谢谢:) – special0ne 2013-03-24 17:56:44

+0

我在最新的rhc,但它仍然不适合我! – endless 2016-05-24 04:01:32

+0

尝试使用'rhc setup'。它必须是ssh密钥问题。该命令将帮助您上传和更新密钥 – dellasavia 2016-06-29 01:52:59