26 Oct 2012, 15:23
Generic-user-small

Aaron mcLeod (13 posts)

When i run the rake task on page 143, i get the following errors:

rake aborted! torquebox /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/net-ssh-2.6.1/lib/net/ssh.rb:200:in start’ /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/torquebox-remote-deployer-0.1.1/lib/torquebox/remote_deploy_utils.rb:127:in ssh_exec' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/torquebox-remote-deployer-0.1.1/lib/torquebox/remote_deploy_utils.rb:108:in cleanup_stage’ /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/torquebox-remote-deployer-0.1.1/lib/torquebox/remote_deploy_utils.rb:14:in stage' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/torquebox-remote-deployer-0.1.1/lib/torquebox/remote_deploy_utils.rb:122:in with_config’ org/jruby/RubyArray.java:1612:in each' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/torquebox-remote-deployer-0.1.1/lib/torquebox/remote_deploy_utils.rb:121:in with_config’ /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/torquebox-remote-deployer-0.1.1/lib/torquebox/remote_deploy_utils.rb:11:in stage' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/torquebox-remote-deployer-0.1.1/lib/torquebox/rake/tasks/remote.rb:11:in (root)’ org/jruby/RubyProc.java:249:in call' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/task.rb:205:in execute’ org/jruby/RubyArray.java:1612:in each' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/task.rb:200:in execute’ /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/task.rb:158:in invoke_with_call_chain' /Users/aaron.mcleod/.rvm/rubies/jruby-1.7.0/lib/ruby/1.9/monitor.rb:211:in mon_synchronize’ /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/task.rb:151:in invoke_with_call_chain' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/task.rb:144:in invoke’ /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:116:in invoke_task' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:94:in top_level’ org/jruby/RubyArray.java:1612:in each' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:94:in top_level’ /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:88:in top_level’ /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:66:in run' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling’ /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:63:in run' /Users/aaron.mcleod/Sites/twitalytics/vendor/bundle/jruby/1.9/gems/rake-0.9.2.2/bin/rake:33:in (root)’ org/jruby/RubyKernel.java:1045:in load' /Users/aaron.mcleod/.rvm/gems/jruby-1.7.0@global/bin/rake:1:in (root)’ org/jruby/RubyKernel.java:1065:in eval' /Users/aaron.mcleod/.rvm/gems/jruby-1.7.0/bin/ruby_noexec_wrapper:14:in (root)’ Tasks: TOP => torquebox:remote:stage `

I realize I”m using 1.7 as supposed to 1.6.7, but that’s because in previous chapters i ran into issues with 1.6.7 and openssl.

Now, i figure the ssh issue is because there’s no password specified in the config/torquebox_remote.rb file. If I try to ssh into the box directly via

ssh -p 2222 torquebox@localhost

I do get prompted with a password. I imagine puppet manages the password stuff behind the scenes for you, but the torquebox configure block would still require it I believe. Anyone else run into this?

26 Oct 2012, 16:36
Jruby-conf-profile-mug_pragsmall

Joe Kutner (81 posts)

Do you have the private key in your config/torquebox_remote.rb? That’s how vagrant/puppet avoid needing the password.

26 Oct 2012, 16:38
Jruby-conf-profile-mug_pragsmall

Joe Kutner (81 posts)

Also, if you upgrade to a newer version of torquebox-remote-deployer, it will give you a more meaningful error message :)

26 Oct 2012, 17:46
Generic-user-small

Aaron mcLeod (13 posts)

Updating to 0.1.2.pre2 definitely gave a better message as you stated. I also specified the private key as you had stated in the book: https://github.com/agmcleod/twitalytics/blob/f56c694ef863e0c99b0338db1ae4a21437063ef3/config/torquebox_remote.rb

Now, the only thing I can think of is that the private key there is probably different from my home machine where I created the base-jruby.box file, and that might cause an issue. If that’s the case, I wonder if there’s a way to get around the private key, as I’m hoping to setup my own rails app with the vagrant file + box, so others can get a relatively quick development setup going.

26 Oct 2012, 19:47
Generic-user-small

Aaron mcLeod (13 posts)

Quick update. As i went through the grueling process of creating my own torquebox user manually and epic failing at that, I changed the torquebox_remote.rb file to use the vagrant user instead. That got me a bit further ahead. Still having some permission file issues, but i think that’s just a matter of configuring the puppet stuff a bit differently.

29 Oct 2012, 12:35
Jruby-conf-profile-mug_pragsmall

Joe Kutner (81 posts)

Yea, between puppet and vagrant the permissions can get tricky. But that will change from system to system anyways.

As far as creating a reusable box, you could configure the OS to allow login without a key or password. The torquebox_remote.rb doesn’t support a password prop, but it easily could be enhanced to do so: https://github.com/jkutner/torquebox-remote-deployer/blob/master/lib/torquebox/remote_deploy_utils.rb#L185

  You must be logged in to comment