Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant provisioning fails on nginx build #19

Closed
juyrjola opened this issue Jan 12, 2014 · 4 comments
Closed

vagrant provisioning fails on nginx build #19

juyrjola opened this issue Jan 12, 2014 · 4 comments

Comments

@juyrjola
Copy link

I'm trying to provision a clean vagrant box. The provisioning seems to first fail when it's trying to build nginx from source.

adding module in /opt/rbenv/versions/1.9.3-p484/gems/gems/passenger-4.0.23/ext/nginx
*** The Phusion Passenger support files are not yet compiled. Compiling them for you... ***
*** Running 'rake nginx CACHING=false' in /opt/rbenv/versions/1.9.3-p484/gems/gems/passenger-4.0.23/ext/nginx... ***
STDERR: /usr/lib/ruby/site_ruby/1.8/rubygems.rb:779:in 'report_activate_error': Could not find RubyGem rake (>= 0) (Gem::LoadError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:214:in 'activate'
        from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in 'gem'
        from /opt/chef/embedded/bin/rake:22
---- End output of "bash"  "/tmp/chef-script20140112-3380-byguq0" ----
Ran "bash"  "/tmp/chef-script20140112-3380-byguq0" returned 1

Apparently nginx fails to be built, and the provisioning finally stops at:

[2014-01-12T18:14:24+00:00] INFO: template[nginx.conf] sending reload action to service[nginx] (delayed)                                                                                                
[2014-01-12T18:14:24+00:00] ERROR: Running exception handlers                                       
...
Chef::Exceptions::Service
-------------------------
service[nginx]: unable to locate the init.d script!
@GUI
Copy link
Member

GUI commented Jan 13, 2014

I believe this should be fixed in master. However, there's a new dependency on the vagrant-berkshelf plugin for vagrant, so that will need to be installed first. So to update your current repo, I think you'll need to do something like:

$ git pull # Update your code
$ git submodule update --init --recursive # Update any submodules
$ vagrant plugin install vagrant-berkshelf # Install the berkshelf plugin.
$ vagrant provision # This should pickup with the chef stuff from where it last died.

From there, you should be able to follow the normal setup instructions staring with the vagrant ssh step under Running API Umbrella in the readme.

(Alternatively, you can always do a vagrant destroy and start over with the instructions from the beginning, which might be easier if you hadn't really started yet, but shouldn't strictly be necessary)

For a bit more detail on the fix: I had actually been recently working on moving the Chef dependencies to use Berkshelf. If you're not familiar, Berkshelf is a dependency management tool for Chef. The hope is that it should hopefully make these Chef dependencies a little easier to manage reliably. So the change to the repo is a bit bigger than just fixing this one nginx build issue, but hopefully it should also fix this issue for you. I've been able to successfully provision new VMs from scratch a couple times using the new setup, so I think everything's working now, but since this is a larger change, don't hesitate to reach out if you run into any further issues.

Thanks for the bug report!

@GUI GUI closed this as completed Jan 13, 2014
@juyrjola
Copy link
Author

Just to confirm: it does indeed work now. Thanks! If I try to point my browser at /admin, however, it redirects to http://api.vagrant which does not exist, but that I guess is another matter. =)

@juyrjola
Copy link
Author

Adding this /etc/hosts entry solved the problem:

10.10.10.2      api.vagrant

@GUI
Copy link
Member

GUI commented Feb 3, 2014

Sorry for the delay in following up. Glad you were able to find the /etc/hosts fix. I've updated the README setup instructions to reflect this. However, ideally, I don't actually want this to be a requirement, so I've added a new ticket to fix this at some point: #20.

GUI added a commit that referenced this issue Sep 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants