ptwobrussell / Mining-the-Social-Web-2nd-Edition

The official online compendium for Mining the Social Web, 2nd Edition (O'Reilly, 2013)
http://bit.ly/135dHfs
Other
2.9k stars 1.49k forks source link

need help with vagrant up #115

Closed anandg112 closed 10 years ago

anandg112 commented 10 years ago

I followed the instructions for installing VirtualBox, Vagrant and Git with SSH for Windows. I downloaded the source code from Github and CD into the Mining-the-Social-Web-2nd-Edition and then did vagrant up. Unfortunately, I am getting an error after doing this. This is the error: "Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete." Here is the output from vagrant up (which I copied from the command prompt).

[2013-12-26T21:23:42+00:00] DEBUG: Ran /usr/sbin/update-rc.d mongodb defaults re turned 0 [2013-12-26T21:23:42+00:00] INFO: service[mongodb] enabled [2013-12-26T21:23:42+00:00] INFO: Processing service[mongodb] action start (mtsw 2e::default line 29) [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] falling back to process tabl e inspection [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] attempting to match 'mongodb ' (/mongodb/) against process list [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] running: true [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 6, action stop, pri ority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 5, action start, pr iority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 4, action start, pr iority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 3, action start, pr iority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 2, action start, pr iority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 1, action stop, pri ority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 0, action stop, pri ority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] already running - nothing to do [2013-12-26T21:23:42+00:00] INFO: Processing execute[mongodb_textsearch] action run (mtsw2e::default line 33) [2013-12-26T21:23:42+00:00] INFO: execute[mongodb_textsearch] ran successfully [2013-12-26T21:23:42+00:00] INFO: execute[mongodb_textsearch] sending restart ac tion to servicemongodb [2013-12-26T21:23:42+00:00] INFO: Processing service[mongodb] action restart (mt sw2e::default line 29) [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] falling back to process tabl e inspection [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] attempting to match 'mongodb ' (/mongodb/) against process list [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] running: true [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 6, action stop, pri ority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 5, action start, pr iority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 4, action start, pr iority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 3, action start, pr iority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 2, action start, pr iority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 1, action stop, pri ority 20 [2013-12-26T21:23:42+00:00] DEBUG: service[mongodb] runlevel 0, action stop, pri ority 20 [2013-12-26T21:23:44+00:00] INFO: service[mongodb] restarted [2013-12-26T21:23:44+00:00] INFO: Processing python_pip[numpy==1.7.1] action ins tall (mtsw2e::default line 51) [2013-12-26T21:23:47+00:00] INFO: Installing python_pip[numpy==1.7.1] version la test [2013-12-26T21:25:46+00:00] INFO: Processing python_pip[http://cheeseshop.python .org/packages/source/p/pyparsing/pyparsing-1.5.5.tar.gz] action install (mtsw2e: :default line 51) [2013-12-26T21:25:47+00:00] INFO: Installing python_pip[http://cheeseshop.python .org/packages/source/p/pyparsing/pyparsing-1.5.5.tar.gz] version latest [2013-12-26T21:25:49+00:00] INFO: Processing python_pip[https://fuxi.googlecode. com/hg/layercake-python.tar.bz2] action install (mtsw2e::default line 51) [2013-12-26T21:25:49+00:00] INFO: Installing python_pip[https://fuxi.googlecode. com/hg/layercake-python.tar.bz2] version latest [2013-12-26T21:25:52+00:00] INFO: Processing python_pip[https://pypi.python.org/ packages/source/F/FuXi/FuXi-1.4.1.production.tar.gz] action install (mtsw2e::def ault line 51) [2013-12-26T21:25:53+00:00] INFO: Installing python_pip[https://pypi.python.org/ packages/source/F/FuXi/FuXi-1.4.1.production.tar.gz] version latest [2013-12-26T21:25:53+00:00] INFO: Processing execute[install_requirements] actio n run (mtsw2e::default line 56) [2013-12-26T21:30:49+00:00] INFO: execute[install_requirements] ran successfully

[2013-12-26T21:30:49+00:00] INFO: Processing execute[download_nltkpunkt maxent treebank_pos_tagger maxent_ne_chunker words stopwords] action run (mtsw2e::defau lt line 63)

Error executing action run on resource 'execute[download_nltk_punkt maxent_tre

ebank_pos_tagger maxent_ne_chunker words stopwords]'

Mixlib::ShellOut::CommandTimeout

command timed out: ---- Begin output of python -m nltk.downloader -d /usr/share/nltk_data punkt max ent_treebank_pos_tagger maxent_ne_chunker words stopwords ---- STDOUT: STDERR: ---- End output of python -m nltk.downloader -d /usr/share/nltk_data punkt maxen t_treebank_pos_tagger maxent_ne_chunker words stopwords ----

Resource Declaration:

In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mtsw2e/recipes/default.rb

62: "punkt maxent_treebank_pos_tagger maxent_ne_chunker words stopwords".each_l ine do |data| 63: execute "downloadnltk#{data}" do 64: command "python -m nltk.downloader -d /usr/share/nltk_data #{data}" 65: not_if do 66: ::File.exists?("/usr/share/nltk_data/#{data}") 67: end 68: end 69: end

Compiled Resource:

Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mtsw2e/recipes/default.r

b:63:in `from_file'

execute("download_nltk_punkt maxent_treebank_pos_tagger maxent_ne_chunker words stopwords") do retry_delay 2 returns 0 command "python -m nltk.downloader -d /usr/share/nltk_data punkt maxent_treeba nk_pos_tagger maxent_ne_chunker words stopwords" retries 0 recipe_name "default" action "run" cookbook_name :mtsw2e backup 5 not_if { #code block } end

[2013-12-26T22:37:15+00:00] DEBUG: Re-raising exception: Mixlib::ShellOut::Comma ndTimeout - execute[download_nltk_punkt maxent_treebank_pos_tagger maxent_ne_chu nker words stopwords](mtsw2e::default line 63) had an error: Mixlib::ShellOut:: CommandTimeout: command timed out: ---- Begin output of python -m nltk.downloader -d /usr/share/nltk_data punkt max ent_treebank_pos_tagger maxent_ne_chunker words stopwords ---- STDOUT: STDERR: ---- End output of python -m nltk.downloader -d /usr/share/nltk_data punkt maxen t_treebank_pos_tagger maxent_ne_chunker words stopwords ----

/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shello ut/unix.rb:55:in run_command' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shel lout.rb:222:inrun_command' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/sh ell_out.rb:30:in shell_out' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/sh ell_out.rb:35:inshell_out!' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/provider /execute.rb:62:in action_run' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/wh y_run.rb:63:incall' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/wh y_run.rb:63:in converge!' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/wh y_run.rb:61:ineach' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/wh y_run.rb:61:in converge!' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/provider .rb:136:inconverge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/provider .rb:125:in run_action' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource .rb:593:inrun_action' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.r b:49:in run_action' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.r b:81:inconverge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.r b:81:in each' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.r b:81:inconverge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource _collection.rb:94:in execute_each_resource' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource _collection/stepable_iterator.rb:116:incall' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource _collection/stepable_iterator.rb:116:in call_iterator_block' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource _collection/stepable_iterator.rb:85:instep' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource _collection/stepable_iterator.rb:104:in iterate' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource _collection/stepable_iterator.rb:55:ineach_with_index' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource _collection.rb:92:in execute_each_resource' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.r b:80:inconverge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/client.r b:378:in converge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/client.r b:420:indo_run' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/client.r b:176:in run' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/applicat ion/solo.rb:230:inrun_application' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/applicat ion/solo.rb:218:in loop' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/applicat ion/solo.rb:218:inrun_application' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/applicat ion.rb:70:in run' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/chef-solo:25 /opt/vagrant_ruby/bin/chef-solo:19:inload' /opt/vagrant_ruby/bin/chef-solo:19 [2013-12-26T22:37:15+00:00] ERROR: Running exception handlers [2013-12-26T22:37:15+00:00] ERROR: Exception handlers complete [2013-12-26T22:37:18+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-sta cktrace.out [2013-12-26T22:37:18+00:00] DEBUG: Mixlib::ShellOut::CommandTimeout: execute[dow nload_nltk_punkt maxent_treebank_pos_tagger maxent_ne_chunker words stopwords](mtsw2e::default line 63) had an error: Mixlib::ShellOut::CommandTimeout: command timed out: ---- Begin output of python -m nltk.downloader -d /usr/share/nltk_data punkt max ent_treebank_pos_tagger maxent_ne_chunker words stopwords ---- STDOUT: STDERR: ---- End output of python -m nltk.downloader -d /usr/share/nltk_data punkt maxen t_treebank_pos_tagger maxent_ne_chunker words stopwords ----

/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shello ut/unix.rb:55:in run_command' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shello ut.rb:222:inrun_command' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/shel l_out.rb:30:in shell_out' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/shel l_out.rb:35:inshell_out!' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/provider/e xecute.rb:62:in action_run' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/why_ run.rb:63:incall' /opt/vagrantruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/why run.rb:63:in converge!' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/why_ run.rb:61:ineach' /opt/vagrantruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/why run.rb:61:in converge!' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/provider.r b:136:inconverge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/provider.r b:125:in run_action' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource.r b:593:inrun_action' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.rb: 49:in run_action' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.rb: 81:inconverge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.rb: 81:in each' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.rb: 81:inconverge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_c ollection.rb:94:in execute_each_resource' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_c ollection/stepable_iterator.rb:116:incall' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_c ollection/stepable_iterator.rb:116:in call_iterator_block' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_c ollection/stepable_iterator.rb:85:instep' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_c ollection/stepable_iterator.rb:104:in iterate' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_c ollection/stepable_iterator.rb:55:ineach_with_index' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_c ollection.rb:92:in execute_each_resource' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/runner.rb: 80:inconverge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/client.rb: 378:in converge' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/client.rb: 420:indo_run' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/client.rb: 176:in run' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/applicatio n/solo.rb:230:inrun_application' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/applicatio n/solo.rb:218:in loop' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/applicatio n/solo.rb:218:inrun_application' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/applicatio n.rb:70:in run' /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/chef-solo:25 /opt/vagrant_ruby/bin/chef-solo:19:inload' /opt/vagrant_ruby/bin/chef-solo:19 [2013-12-26T22:37:18+00:00] FATAL: Mixlib::ShellOut::CommandTimeout: execute[dow nload_nltk_punkt maxent_treebank_pos_tagger maxent_ne_chunker words stopwords](mtsw2e::default line 63) had an error: Mixlib::ShellOut::CommandTimeout: command timed out: ---- Begin output of python -m nltk.downloader -d /usr/share/nltk_data punkt max ent_treebank_pos_tagger maxent_ne_chunker words stopwords ---- STDOUT: STDERR: ---- End output of python -m nltk.downloader -d /usr/share/nltk_data punkt maxen t_treebank_pos_tagger maxent_ne_chunker words stopwords ----

Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.

C:\Users\agautam\Mining-the-Social-Web-2nd-Edition>

ptwobrussell commented 10 years ago

Hi Anand -

Thanks for reaching out to me about this issue. I'll do everything I possibly can to help you work through this issue as quickly and painlessly as possible:

My first recommendation would be to run these two commands:

What that should do is just "restart" the bootstrap process for the VM and pick up where it last failed. Assuming the networkd conditions are more favorable, the downloads won't timeout, and everything will finish up ok, and you'll be able to navigate to http://localhost:8888 to access the IPython Notebook user interface.

In the event that it times out again with the same error, we can side-step the issue all together by proceeding as follows:

From the same directory that you ran "vagrant up", run "vagrant ssh" to connect into the VM, which should already be running. And then, run this command to manually start IPython Notebook:

sudo /usr/bin/python /usr/local/bin/ipython notebook --ip=0.0.0.0 --notebook-dir=/vagrant/ipynb --port=8888 --pylab=inline --no-browser

From there, you should be able to open your browser to http://localhost:8888 and access the IPython Notebook UI.

Let me know if this works for you...

PS - I hope to put together a FAQ in the wiki soon, and this will be one of the Q's since it's starting to come up somewhat regularly. I will also put some additional thought into other ways to work around the issue in the Chef recipe...

anandg112 commented 10 years ago

Hi Matt,

Thanks for the quick reply. I actually went through the resolved issues now and saw someone else was having a similar problem. I tried vagrant halt and vagrant provision but it still didn't work. So then I did vagrant ssh and executed the command you gave and now it is working. Are there any implications of not completing the bootstrap process i.e. will I miss out any content from the book? Thanks for your help again.

ptwobrussell commented 10 years ago

Great!

You won't miss out on a thing. Downloading these packages is the last step before starting IPython Notebook.

When you get to the latter chapters that involve NLTK, the example code will download the packages that are timing out as they are needed. In that regard, this problematic piece of configuration is more optional than it is required.

Let's stay in touch. Let me know if there is any other way that I can help...

On Dec 26, 2013, at 7:38 PM, Anand Gautam notifications@github.com wrote:

Hi Matt,

Thanks for the quick reply. I actually went through the resolved issues now and saw someone else was having a similar problem. I tried vagrant halt and vagrant provision but it still didn't work. So then I did vagrant ssh and executed the command you gave and now it is working. Are there any implications of not completing the bootstrap process i.e. will I miss out any content from the book? Thanks for your help again.

— Reply to this email directly or view it on GitHub.