Permission denied when trying to forward ports in openshift - debugging

I am kinda new to openshift and I am trying to give it a try.
While following this tutorial when running the rhc port-forward -a command. I am getting an Permission Denied error. Any ideas what I am doing wrong?
The problem is not the password. If you enter a wrong password you get a different error message
Thank
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>'

Looks like you're running an older version of the rhc client tools (1.2.7). Please try it again after updating your client tools (gem update rhc).
The error indicates that your host can't bind a particular local port possibly cause it's in use. The latest rhc client responds by binding to the next open port. Let us know if you're still having issues after updating.

Related

I run this code "vagrant up" in Terminal and I get an error of 'No such file or directory' - how to fix this?

I'm trying to install Homestead on my terminal. I was in my home directory and ran the code "vagrant up" but I get an error. This was what I typed in:
MACs-MBP:Homestead MAC$ vagrant up
And this was the error:
/Users/MAC/web/Homestead/scripts/homestead.rb:118:in `read': No such file or directory # rb_sysopen - /Users/MAC/.ssh/id_rsa (Errno::ENOENT)
from /Users/MAC/web/Homestead/scripts/homestead.rb:118:in `block (2 levels) in configure'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/plugins/kernel_v2/config/vm_provisioner.rb:72:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/plugins/kernel_v2/config/vm_provisioner.rb:72:in `add_config'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/plugins/kernel_v2/config/vm.rb:338:in `provision'
from /Users/MAC/web/Homestead/scripts/homestead.rb:115:in `block in configure'
from /Users/MAC/web/Homestead/scripts/homestead.rb:114:in `each'
from /Users/MAC/web/Homestead/scripts/homestead.rb:114:in `configure'
from /Users/MAC/web/Homestead/Vagrantfile:35:in `block in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/config/v2/loader.rb:37:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/config/v2/loader.rb:37:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/config/loader.rb:113:in `block (2 levels) in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/config/loader.rb:107:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/config/loader.rb:107:in `block in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/config/loader.rb:104:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/config/loader.rb:104:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/vagrantfile.rb:28:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/environment.rb:746:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/environment.rb:746:in `vagrantfile'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/environment.rb:492:in `host'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/environment.rb:214:in `block in action_runner'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/action/runner.rb:33:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/action/runner.rb:33:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/environment.rb:479:in `hook'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/environment.rb:728:in `unload'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/bin/vagrant:130:in `ensure in <main>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.3/bin/vagrant:130:in `<main>'
How would I fix this? I am really confused. Thank you for all the help
The first line in your error message indicates that you need to generate an SSH key first.
In your terminal (but outside Homestead interface), type:
ssh-keygen -t rsa
When it asks for the directory to save your key, press Enter for default directory, which is where your Homestead is searching. When it asks for a passphrase, it's good to have one.
Then try vagrant up again.

Can't start rails server - "Failed to watch" error - Bash - Ubuntu - Windows 10

The problem is that the server will not start.
I have set up the following:
Windows 10 build 1607 (Anniversary edition)
Windows subsystem for Linux
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
Ubuntu 14.04.5 LTS \n \l
Rails ver 5.0.0.1
Ruby ver 2.3.1 (using - rbenv)
MySQL 5.5.53
I am very new to Linux and Ruby / Rails so please forgive me if I use incorrect terminology.
After a few days of installing, configuring and debugging, I was able to get everything working (Linux shell, rails, ruby mysql etc.).
I began a tutorial at Lynda called "Ruby on Rails 5 Essential Training" and was able to do the following:
Create a new rails project called Simple CMS
Create MySQL databases for development and test
Create users in MySQL
** When it came time to start the web server (Puma via the 'rails server' command) I received pages of errors as shown. I've searched every stackoverflow, google, Microsoft and GitHub result that had anything to do with "Failed to watch" and the above noted configuration. There were no solutions and the latest result stated that it was not possible to run the server because of the way Windows works.
Before scrapping my installation I wanted to ask here if anyone had run across this and/or had a solution.
Thank you very much in advance for any help and for taking the time to read this.
Mike
Here is the error including the command I used to initiate it:(Sorry its huge)
mike#MIKES-PC:~/sites/simple_cms$ rails server
=> Booting Puma
=> Rails 5.0.0.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Exiting
/home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rb-inotify-0.9.7/lib/rb-inotify/watcher.rb:74:in `initialize': Invalid argument - Failed to watch "/home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/locale": the given event mask contains no legal events; or fd is not an inotify file descriptor. (Errno::EINVAL)
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:190:in `new'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:190:in `watch'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:204:in `watch'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/adapter/linux.rb:32:in `_configure'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/adapter/base.rb:45:in `block in configure'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/adapter/base.rb:40:in `each'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/adapter/base.rb:40:in `configure'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/adapter/base.rb:63:in `start'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/backend.rb:28:in `start'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/listener.rb:67:in `block in <class:Listener>'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/fsm.rb:120:in `instance_eval'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/fsm.rb:120:in `call'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/fsm.rb:91:in `transition_with_callbacks!'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/fsm.rb:57:in `transition' from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/listen-3.0.8/lib/listen/listener.rb:90:in `start' from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/evented_file_update_checker.rb:90:in `boot!'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/evented_file_update_checker.rb:61:in `initialize'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/i18n_railtie.rb:59:in `new'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/i18n_railtie.rb:59:in `initialize_i18n'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/i18n_railtie.rb:15:in `block in <class:Railtie>'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:65:in `block in <module:Finisher>'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
from /home/mike/sites/simple_cms/config/environment.rb:5:in `<top (required)>'
from /home/mike/sites/simple_cms/config.ru:3:in `require_relative'
from /home/mike/sites/simple_cms/config.ru:3:in `block in <main>'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/builder.rb:55:in `instance_eval'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/builder.rb:55:in `initialize' from /home/mike/sites/simple_cms/config.ru:in `new'
from /home/mike/sites/simple_cms/config.ru:in `<main>'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/builder.rb:49:in `eval'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/builder.rb:49:in `new_from_string'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/builder.rb:40:in `parse_file' from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/server.rb:318:in `build_app_and_options_from_config'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/server.rb:218:in `app'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/server.rb:59:in `app'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/server.rb:353:in `wrapped_app'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/server.rb:124:in `log_to_stdout'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/server.rb:77:in `start'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:90:in `block in server'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /home/mike/sites/simple_cms/bin/rails:9:in `require'
from /home/mike/sites/simple_cms/bin/rails:9:in `<top (required)>'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `load'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.0/lib/spring/client/rails.rb:28:in `call'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.0/lib/spring/client/command.rb:7:in `call'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.0/lib/spring/client.rb:30:in `run'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.0/bin/spring:49:in `<top (required)>'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `load'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.0/lib/spring/binstub.rb:31:in `<top (required)>'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/mike/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/mike/sites/simple_cms/bin/spring:14:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Found a solution in #jwsloan's comment on this Github issue:
When creating a new rails app, use --skip-listen to avoid problems with inotify, like so:
rails new myproject --skip-listen
That should allow the server to start - worked for me! :)

OpenShift setup invalid argument

I've been following getting started of openshift, but I am stuck at this error.
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.
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.
Enter the server hostname: |openshift.redhat.com| C:/Ruby193/lib/ruby/gems/1.9.1/gems/highline-1.6.21/lib/highline.rb:86
4:in `gets': Invalid argument - <STDIN> (Errno::EINVAL)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/highline-1.6.21/lib/highline.rb:864:in `get_line'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/highline-1.6.21/lib/highline.rb:885:in `get_response'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/highline-1.6.21/lib/highline.rb:260:in `ask'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/highline_extensions.rb:12:in `block (2 levels) in <c
lass:HighLineExtension>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/wizard.rb:188:in `block in server_stage'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/highline_extensions.rb:190:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/highline_extensions.rb:190:in `section'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/highline_extensions.rb:204:in `paragraph'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/helpers.rb:339:in `block (2 levels) in <module:Helpe
rs>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/wizard.rb:185:in `server_stage'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/wizard.rb:67:in `block in run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/wizard.rb:65:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/wizard.rb:65:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/commands/setup.rb:57:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/commands.rb:294:in `execute'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/commands.rb:285:in `block (3 levels) in to_commander
'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.2.1/lib/commander/command.rb:155:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.2.1/lib/commander/runner.rb:421:in `run_active_command'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/command_runner.rb:72:in `run!'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.2.1/lib/commander/delegates.rb:12:in `run!'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/cli.rb:37:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/bin/rhc:20:in `<top (required)>'
from C:/Ruby193/bin/rhc:23:in `load'
from C:/Ruby193/bin/rhc:23:in `<main>'
I tried reinstalling ruby (and rhc gem) to older version (1.93) as found in a different question. It probably isn't what has been causing my error. I tried using defauld windows commandline and PowerShell 5.0 with the same result.
I am expecting a promp for server hostname, but this stacktrace happens right after entering 'rhc setup'.
I tried everything nothing worked except this which says "change the CMD window properties. Simply select the 'Use Legacy console'" and It really worked
Ruby 2.0 64bit worked for some reason
previously the error was evoked by anything with
raw_answer = #input.gets
I (and people I've asked) have to classify this as 'Windows Magic'. Windows are such a good development enviroment.

Unexpected error while processing request: env missing required key SERVER_PORT

I'm executing this on our staging server to start a Sinatra app:
envdir /etc/sv-env env RUBYLIB=./lib TZ=UTC VERBOSE=yes bundle exec thin --address 0.0.0.0 --port 9293 --environment development --rackup frontend.ru start
And it seems to start thin, but as soon as I GET the address, it shows the following error (on the console):
Unexpected error while processing request: env missing required key SERVER_PORT
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:20:in `assert'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:201:in `block in check_env'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:197:in `each'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:197:in `check_env'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:43:in `_call'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:37:in `call'
/var/lib/gems/1.9.1/gems/thin-1.6.2/lib/thin/connection.rb:86:in `block in pre_process'
/var/lib/gems/1.9.1/gems/thin-1.6.2/lib/thin/connection.rb:84:in `catch'
/var/lib/gems/1.9.1/gems/thin-1.6.2/lib/thin/connection.rb:84:in `pre_process'
/var/lib/gems/1.9.1/gems/thin-1.6.2/lib/thin/connection.rb:53:in `process'
/var/lib/gems/1.9.1/gems/thin-1.6.2/lib/thin/connection.rb:39:in `receive_data'
/var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
/var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
/var/lib/gems/1.9.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
/var/lib/gems/1.9.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
/var/lib/gems/1.9.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
/var/lib/gems/1.9.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
/var/lib/gems/1.9.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
/var/lib/gems/1.9.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
/usr/local/bin/thin:19:in `load'
/usr/local/bin/thin:19:in `<main>'
I'm using thin 1.6.2.
The same command works on my development machine (both dev and staging are running Ubuntu server 12.04 LTS).
But one difference from dev is that staging is proxied through HAProxy.
Any idea?

'Unknown response from agent' from Openshift rhc port-forward

I am trying to run Openshift's rhc port forward command as following:
rhc port-forward -a ligatures -n dawningstreams
but I get the following error message:
Checking available ports ...
C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.7.0/lib/net/ssh/authentication/agent/socket.rb:81:in `negotiate!': unknown response from agent: 1, "\x00\x00\x00-\x01\x00\x00\x00(SSH-2.0-Ruby/Net::SSH_2.7.0 i386-mingw32" (Net::SSH::Authentication::AgentError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.7.0/lib/net/ssh/authentication/agent/socket.rb:48:in `connect'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.7.0/lib/net/ssh/authentication/key_manager.rb:178:in `agent'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.7.0/lib/net/ssh/authentication/key_manager.rb:102:in `each_identity'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.7.0/lib/net/ssh/authentication/methods/publickey.rb:19:in `authenticate'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.7.0/lib/net/ssh/authentication/session.rb:78:in `block in authenticate'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.7.0/lib/net/ssh/authentication/session.rb:65:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.7.0/lib/net/ssh/authentication/session.rb:65:in `authenticate'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ssh-2.7.0/lib/net/ssh.rb:204:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.27.4/lib/rhc/commands/port_forward.rb:85:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.27.4/lib/rhc/commands.rb:294:in `execute'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.27.4/lib/rhc/commands.rb:285:in `block (3 levels) in to_commander'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.2/lib/commander/command.rb:155:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.2/lib/commander/runner.rb:402:in `run_active_command'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.27.4/lib/rhc/command_runner.rb:72:in `run!'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.2/lib/commander/delegates.rb:11:in `run!'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.27.4/lib/rhc/cli.rb:37:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.27.4/bin/rhc:20:in `<top(required)>'
from C:/Ruby193/bin/rhc:23:in `load'
from C:/Ruby193/bin/rhc:23:in `<main>'
I have already performed gem update rhc, but it did not help.
What is this issue and how can I solve it?
From Openshift IRC chat, we determined that it could be related to a known issue solved on a more recent version of net-ssh.
Since my Ruby installation was old, I removed it completely and re-installed it (and reinstalled rhc too). The issue is now gone.

Resources