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

FATAL: Chef::Exceptions::ChildConvergeError #309

Open ShawnFuller opened 7 years ago

ShawnFuller commented 7 years ago

I have tried both the main branch and the following fork to resolve problems with chef on Mac OS https://github.com/rreben/Mining-the-Social-Web-2nd-Edition.git However, I am getting the errors below when I run vagrant up:

Versions: VirtualBox-5.1.6-110634-OSX.dmg vagrant_1.8.5 OSX 10.11.6 (El Capitan)

==> default: [2016-09-17T03:15:01+00:00] INFO: Running queued delayed notifications before re-raising exception ==> default: ==> default: Running handlers: ==> default: [2016-09-17T03:15:01+00:00] ERROR: Running exception handlers ==> default: Running handlers complete ==> default: ==> default: [2016-09-17T03:15:01+00:00] ERROR: Exception handlers complete ==> default: Chef Client failed. 60 resources updated in 14 minutes 48 seconds ==> default: [2016-09-17T03:15:01+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out ==> default: [2016-09-17T03:15:01+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report ==> default: [2016-09-17T03:15:01+00:00] ERROR: python_pip[boilerpipe](mtsw2e::default line 163) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' ==> default: ---- Begin output of pip install boilerpipe==1.2.0.0 ---- ==> default: STDOUT: Collecting boilerpipe==1.2.0.0 ==> default: Downloading boilerpipe-1.2.0.0.tar.gz (1.3MB) ==> default: Complete output from command python setup.py egg_info: ==> default: Traceback (most recent call last): ==> default: File "", line 1, in ==> default: File "/tmp/pip-build-VFP3SA/boilerpipe/setup.py", line 27, in ==> default: download_jars(datapath=DATAPATH) ==> default: File "/tmp/pip-build-VFP3SA/boilerpipe/setup.py", line 21, in download_jars ==> default: tar = tarfile.open(tgz_name, mode='r:gz') ==> default: File "/usr/lib/python2.7/tarfile.py", line 1678, in open ==> default: return func(name, filemode, fileobj, **kwargs) ==> default: File "/usr/lib/python2.7/tarfile.py", line 1730, in gzopen ==> default: raise ReadError("not a gzip file") ==> default: tarfile.ReadError: not a gzip file ==> default:
==> default: ---------------------------------------- ==> default: STDERR: /usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning. ==> default: SNIMissingWarning ==> default: /usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. ==> default: InsecurePlatformWarning ==> default: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-VFP3SA/boilerpipe/ ==> default: ---- End output of pip install boilerpipe==1.2.0.0 ---- ==> default: Ran pip install boilerpipe==1.2.0.0 returned 1 ==> default: [2016-09-17T03:15:01+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.

rreben commented 7 years ago

This is a log from the original repo, or from the fork? If you use my fork, please start from a clean state. I would recommend that you use vagrant destroy to destroy all virtual mashines and start from scratch. Vagrant is working in a way to reuse virtual mashines, and these might interfere. Versions of vagrant, virtualbox and OSX are all right. Did you change anything in the vagrant files?

ShawnFuller commented 7 years ago

I tried the vagrant destroy but the results were the same. I cloned from your fork of the original. I needed to change the ports in the vagrant file because I already have a web server running on 8888

# IPython Notebook
override.vm.network :forwarded_port, host: 8778, guest: 8778

But apart from that I kept it the same.

rreben commented 7 years ago

I found a hardwired connection of ipython notebook to port 8888 in the default recipe.

in File deploy/cookbooks/mtsw2e/recipes/default.rb right at the end of the file. Don't know whether this helps. But you might try to edit this recipe as well.

Otherwise try to disable your webserver (just for checking) and rerun vagrant without any changes.

Hope this helps.

ShawnFuller commented 7 years ago

Thank you for the suggestions! I tried changing the default.rb: no success. Then I set that and the vagrant file back to 8888. Still the same message:

==> default: STDERR: /usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning. ==> default: SNIMissingWarning ==> default: /usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. ==> default: InsecurePlatformWarning ==> default: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-OEHmVm/boilerpipe/ ==> default: ---- End output of pip install boilerpipe==1.2.0.0 ---- ==> default: Ran pip install boilerpipe==1.2.0.0 returned 1 ==> default: [2016-10-04T00:52:26+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

rreben commented 7 years ago

ok, port forwarding seems not to be the issue.

I saw similar problems / issues with matplotlib, which I was not able to circumvent. That is the reason that matplotlib is excluded from my fork.

Are you on a Windows machine? Which version? I guess that you have a non-standard ssl-stack on your guest machine that "causes" the problem. This might something not easy to fix (other than resetting the guest machine).

So you might want to try to increase the version number of the python version. You can do so by manipulating the settings in the attributes of the corresponding chef script. However even if this leads to a machine that can be provisioned, it might lead to all kind of incompatibilities.

I believe that the whole stack that comes with the original vagrant file / chef recipes (as well as in the rreben-repo) may just be to old for your guest machine.

There is the Anaconda project that aims at providing a consistent python stack for data science. Anaconda also provides jupyter instead of the iPython-notebooks. You might try to install Anaconda directly on your guest machine.

I am working on a vagrant / chef configuration that is based on Anaconda in order to use the work that has already been done in the Anaconda project to provide consistent versions of the various frameworks. And do so in a way that is easier to maintain.

You might start to work on this. https://github.com/rreben/learn-how-to-code However be warned: This is still work in progress. And the learn-to-code repo is focused on basic python, for instance mongo-db is (still) not included. If this turns out to be helpful, please let me know. I could then extend on this approach.

I would be very interested to hear if you find a way to get this up and running.

ShawnFuller commented 7 years ago

I'm going to try out your learn-how-to-code. But just curious: what version of vagrant were you using with the fork? I'm using Mac OS with VirtualBox 5.1.6

rreben commented 7 years ago

vagrant 1.8.5 virtual box 5.1.2 macOS 10.12 (sierra)

please let me know if you succeed with vagrant/chef/anaconda

rreben commented 7 years ago

It might be worthwhile to try Virtualbox 5.1.2 instead of 5.1.6

ShawnFuller commented 7 years ago

I tried 1.8.5 and 5.1.2. Perhaps there is a problem with my OS environment. Although I thought VirtualBox and Vagrant were supposed to be decoupled from the resident OS environment.

PS. I am enjoying your learn-how-to-code. That seems to be working.

rreben commented 7 years ago

Well there is some coupling needed for the port forwarding as well as for sharing the directories. Especially python/pip access the network to install python modules. This is done via ssh for security reasons. The guest machine has to use the network from your host machine. Here seems to be the problem. The old python/pip install skripts use some ssl-machinery, that is rejected from your host machine for some reason (most probably security reasons, due to too old ssl protocols).

PS. Nice to hear your are finding the learn-how-to-code platform of some value.

Giving a "star" on github would be cool.

You should be able to use a lot of the recipes (just copy paste) on this platform. Pls give me a hint what might be missing, so I could add it to the platform via some chef skripts.

andresfchamorro commented 7 years ago

I'm having the exact same error, running on OS X 10.11.3 (Capitan), Vagrant 1.8.5, and VirtualBox 5.1.2. Will this keep me from running the ipython notebook, or can I start it without having installed boilerpipe? Any other ways to get started with Mining the Social Web?

rreben commented 7 years ago

It is hard to be up-to-date with the various configs. You might want to start with: https://github.com/rreben/learn-how-to-code This installs a complete anaconda / python / jupyter stack in the same way as mining the social web does. However some modules are not installed (e.g. mongo db, ...). you might start from this and tell what it is missing.

If I have some time I will merge this to my fork of mining the social web.

mjamal commented 7 years ago

Running into similar issues with learn-how-to-code. Any thoughts?

==> default: System Info: ==> default: ------------ ==> default: chef_version=13.0.118 ==> default: platform=ubuntu ==> default: platform_version=16.04 ==> default: ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] ==> default: program_name=chef-solo worker: ppid=1958;start=21:45:16; ==> default: executable=/opt/chef/bin/chef-solo ==> default: ==> default: ==> default: Running handlers: ==> default: [2017-05-27T21:45:21+00:00] ERROR: Running exception handlers ==> default: Running handlers complete ==> default: [2017-05-27T21:45:21+00:00] ERROR: Exception handlers complete ==> default: Chef Client failed. 0 resources updated in 05 seconds ==> default: [2017-05-27T21:45:21+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out ==> default: [2017-05-27T21:45:21+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report ==> default: [2017-05-27T21:45:21+00:00] ERROR: undefined method `anaconda' for # ==> default: [2017-05-27T21:45:21+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.

rreben commented 7 years ago

With the current version of Chef (13.x), Chef will not tolerate some form of syntax. This lead to the compile errors in the skripts. As a quick fix force vagrant to use an older version of Chef (12.9.x).

Do so with adding the following:

config.vm.provision :chef_solo do |chef|
chef.version = '12.19.36'
      chef.json = ...

See https://github.com/rreben/basket4py/issues/1 for more details.

mjamal commented 7 years ago

That did the trick. Thanks!

mjamal commented 7 years ago

I'm now trying to use Mining-the-Social-Web-2nd-Edition notebooks with the learn-how-to-code image.