Closed FengChong closed 10 years ago
@FengChong - Sorry that you're experiencing troubles. Rest assured that I'm here to help you the best I can. From the looks of it, the Chef configuration scripts are unable to successfully fetch the following URL: https://pypi.python.org/packages/source/s/setuptools/setupto ols-0.8.tar.gz
This file is one of the essential Python setup tools that is first installed and then used to install many other Python dependencies, so it's no wonder that nothing is running when you manually try to start IPython Notebook, because neither IPython Notebook nor other dependencies ever installed.
However, if I paste that URL in my browser, I can retrieve it, so I know that the file is hosted, and this suggests that there could be a network-related problem -- perhaps a proxy setting. A few questions that would help me to better serve you:
I'm standing by to help you. Let me know about these things, and I'll do all that I can to get you moving along as quickly as possible.
Thanks for your rapid response! 1) I'm in Beijing of China, at home, with a 25Mbps ISP service. I was also wondering if it was caused by network performance. You may know the annoying GreatFireWall of China. -_-! But the URL you listed above can be access manually. The file has been downloaded rapidly. 2) Following your suggestion in comments to others, I tried to use "vagrant provision" several times a moments ago. Unfortunately, it doesn't work yet. Some part of the results are posted as following. 3) Shall I do more "vagrant provision" repeatedly? 4) I plan to go to my office in university tomorrow and have a try on my desktop computer. The Internet-access there will be by CERNET (China Edu and Research NET). Thanks again~
[2014-02-07T14:31:33+00:00] FATAL: Mixlib::ShellOut::CommandTimeout: python_pip[ https://fuxi.googlecode.com/hg/layercake-python.tar.bz2](mtsw2e::default line 5 1) had an error: Mixlib::ShellOut::CommandTimeout: command timed out: ---- Begin output of pip install https://fuxi.googlecode.com/hg/layercake-pytho n.tar.bz2 ---- STDOUT: Downloading/unpacking https://fuxi.googlecode.com/hg/layercake-python.ta r.bz2 STDERR: ---- End output of pip install https://fuxi.googlecode.com/hg/layercake-python. tar.bz2 ----
Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.
FC@FC-PC ~/Mining-the-Social-Web-2nd-Edition (master) $ vagrant ssh Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
149 packages can be updated. 66 updates are security updates.
Welcome to your Vagrant-built virtual machine. Last login: Fri Feb 7 12:07:45 2014 from 10.0.2.2 vagrant@precise64:~$ sudo /usr/bin/python /usr/local/bin/ipython notebook --ip= 0.0.0.0 --notebook-dir=/vagrant/ipynb --port=8888 --pylab=inline --no-browser /usr/bin/python: can't open file '/usr/local/bin/ipython': [Errno 2] No such fil e or directory vagrant@precise64:~$ vagrant provision The program 'vagrant' is currently not installed. You can install it by typing:
sudo apt-get install vagrant vagrant@precise64:~$ logout Connection to 127.0.0.1 closed.
Hmm, your script seems to have progressed beyond the previous errors, so repeated "vagrant provision" commands may actually work so long as you see that the error output is changing each time.
If you are savvy with network profiling tools, I'd be really interested to know what the stats look like while the download is happening. e.g. is there just a really long delay with the connection and a fast download speed, or is there a really slow download speed because the "great firewall" is inspecting all of the packets?
Another option we could consider is that I could make available a Vagrant box that has all of the software pre-installed. It would be a ~1GB download for you. If you would strongly prefer that option, let me know...but I understand if you'd like to get this all working on your own so that you have a repeatable process to deal with these types of issues for a more general purpose (and repeatable) configuration.
1) The current status is as following.No ipython and no notebook in browser. But it seems that the virtual machine is OK.
I found "vagrant provision" always fails on
C:\Users\FC\Mining-the-Social-Web-2nd-Edition>vagrant up Bringing machine 'default' up with 'virtualbox' provider... [default] Clearing any previously set forwarded ports... [default] Clearing any previously set network interfaces... [default] Preparing network interfaces based on configuration... [default] Forwarding ports... [default] -- 22 => 2222 (adapter 1) [default] -- 8888 => 8888 (adapter 1) [default] -- 5000 => 5000 (adapter 1) [default] -- 27017 => 27017 (adapter 1) [default] -- 27018 => 27018 (adapter 1) [default] -- 27019 => 27019 (adapter 1) [default] -- 28017 => 28017 (adapter 1) [default] Running 'pre-boot' VM customizations... [default] Booting VM... [default] Waiting for machine to boot. This may take a few minutes... DL is deprecated, please use Fiddle [default] Machine booted and ready! [default] The guest additions on this VM do not match the installed version of VirtualBox! In most cases this is fine, but in rare cases it can prevent things such as shared folders from working properly. If you see shared folder errors, please make sure the guest additions within the virtual machine match the version of VirtualBox you have installed on your host and reload your VM.
Guest Additions Version: 4.2.0
VirtualBox Version: 4.3
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[default] VM already provisioned. Run vagrant provision
or use --provision
t
o force it
C:\Users\FC\Mining-the-Social-Web-2nd-Edition>vagrant ssh Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
149 packages can be updated. 66 updates are security updates.
Welcome to your Vagrant-built virtual machine. Last login: Fri Feb 7 23:33:38 2014 from 10.0.2.2 vagrant@precise64:~$ sudo /usr/bin/python /usr/local/bin/ipython notebook --ip= 0.0.0.0 --notebook-dir=/vagrant/ipynb --port=8888 --pylab=inline --no-browser /usr/bin/python: can't open file '/usr/local/bin/ipython': [Errno 2] No such fil e or directory vagrant@precise64:~$ logout Connection to 127.0.0.1 closed.
C:\Users\FC\Mining-the-Social-Web-2nd-Edition>vagrant provision [default] Running provisioner: chef_solo... DL is deprecated, please use Fiddle Generating chef JSON and uploading... Running chef-solo... stdin: is not a tty [2014-02-08T00:14:14+00:00] INFO: * Chef 10.14.2 * [2014-02-08T00:14:14+00:00] DEBUG: Building node object for precise64 ***** middle part is omitted by FengChong** resp = self.send(prep, _send_kwargs) File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/sessions.py" , line 486, in send r = adapter.send(request, _kwargs) File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/adapters.py" , line 378, in send raise ConnectionError(e) ConnectionError: HTTPSConnectionPool(host='fuxi.googlecode.com', port=443): Max retries exceeded with url: /hg/layercake-python.tar.bz2 (Caused by <class 'socke t.error'>: [Errno 101] Network is unreachable)
Storing debug log for failure in /root/.pip/pip.log STDERR: ---- End output of pip install https://fuxi.googlecode.com/hg/layercake-python. tar.bz2 ---- Ran pip install https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 returne d 2 Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.
2) I'm not good at net profiling tools.Sorry for non-stats. What I know is that GFW is sensitive for some websites. e.g. I could not access twitter, facebook and youtube if I don't use proxy tools.But for most other world-wide websites, it is rather fast and fluent.
3) I manually download the precise64.box file because of net failure. (By using download tools through mirror-site, it only take <2mins to downlad this >300M file. But the download in command line just keeps fail. ) Then I edited the vagrantfile as override.vm.box_url = "\precise64.box" it seems work well. I wish I didn't make a mistake.
4) I will have a try today using CERNET. But if it doesn't work yet, I wish you could provide an all-in-one vagrant box for me if it doesn't bother you. Thanks again! It is really encouraging to get your suggenstions and help.
Happy to provide a download of a preconfigured VM for you if your CERNET connection doesn't work out. However, as just a heads up, you will still need to be able to access the social web APIs such as api.twitter.com and so forth. Will CERNET or proxies let you do that?
I'm sorry that I be of any help here on the firewall issues, but one workaround I've used in the past with readers is to recommend Wakari, which is a hosted IPython Notebook service with servers based in the U.S. Using Amazon servers is another option that is quite inexpensive if it comes to that.
On Feb 7, 2014, at 6:58 PM, FengChong notifications@github.com wrote:
1) The current status is as following.No ipython and no notebook in browser. But it seems that the virtual machine is OK.
I found "vagrant provision" always fails on "ConnectionError: HTTPSConnectionPool(host='fuxi.googlecode.com', port=443): Max retries exceeded with url: /hg/layercake-python.tar.bz2 (Caused by : [Errno 101] Network is unreachable)"
C:\Users\FC\Mining-the-Social-Web-2nd-Edition>vagrant up Bringing machine 'default' up with 'virtualbox' provider... [default] Clearing any previously set forwarded ports... [default] Clearing any previously set network interfaces... [default] Preparing network interfaces based on configuration... [default] Forwarding ports... [default] -- 22 => 2222 (adapter 1) [default] -- 8888 => 8888 (adapter 1) [default] -- 5000 => 5000 (adapter 1) [default] -- 27017 => 27017 (adapter 1) [default] -- 27018 => 27018 (adapter 1) [default] -- 27019 => 27019 (adapter 1) [default] -- 28017 => 28017 (adapter 1) [default] Running 'pre-boot' VM customizations... [default] Booting VM... [default] Waiting for machine to boot. This may take a few minutes... DL is deprecated, please use Fiddle [default] Machine booted and ready! [default] The guest additions on this VM do not match the installed version of VirtualBox! In most cases this is fine, but in rare cases it can prevent things such as shared folders from working properly. If you see shared folder errors, please make sure the guest additions within the virtual machine match the version of VirtualBox you have installed on your host and reload your VM.
Guest Additions Version: 4.2.0 VirtualBox Version: 4.3 [default] Mounting shared folders... [default] -- /vagrant [default] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks [default] VM already provisioned. Run vagrant provision or use --provision t o force it
C:\Users\FC\Mining-the-Social-Web-2nd-Edition>vagrant ssh Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
Documentation: https://help.ubuntu.com/ 149 packages can be updated. 66 updates are security updates.
Welcome to your Vagrant-built virtual machine. Last login: Fri Feb 7 23:33:38 2014 from 10.0.2.2 vagrant@precise64:~$ sudo /usr/bin/python /usr/local/bin/ipython notebook --ip= 0.0.0.0 --notebook-dir=/vagrant/ipynb --port=8888 --pylab=inline --no-browser /usr/bin/python: can't open file '/usr/local/bin/ipython': [Errno 2] No such fil e or directory vagrant@precise64:~$ logout Connection to 127.0.0.1 closed.
C:\Users\FC\Mining-the-Social-Web-2nd-Edition>vagrant provision [default] Running provisioner: chef_solo... DL is deprecated, please use Fiddle Generating chef JSON and uploading... Running chef-solo... stdin: is not a tty [2014-02-08T00:14:14+00:00] INFO: * Chef 10.14.2 * [2014-02-08T00:14:14+00:00] DEBUG: Building node object for precise64 ***** middle part is omitted by FengChong** resp = self.send(prep, _send_kwargs) File "/usr/local/lib/python2.7/dist-packages/pip/vendor/requests/sessions.py" , line 486, in send r = adapter.send(request, _kwargs) File "/usr/local/lib/python2.7/dist-packages/pip/vendor/requests/adapters.py" , line 378, in send raise ConnectionError(e) ConnectionError: HTTPSConnectionPool(host='fuxi.googlecode.com', port=443): Max retries exceeded with url: /hg/layercake-python.tar.bz2 (Caused by t.error'>: [Errno 101] Network is unreachable)
Storing debug log for failure in /root/.pip/pip.log STDERR: ---- End output of pip install https://fuxi.googlecode.com/hg/layercake-python. tar.bz2 ---- Ran pip install https://fuxi.googlecode.com/hg/layercake-python.tar.bz2 returne d 2 Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.
2) I'm not good at net profiling tools.Sorry for non-stats. What I know is that GFW is sensitive for some websites. e.g. I could not access twitter, facebook and youtube if I don't use proxy tools.But for most other world-wide websites, it is rather fast and fluent.
3) I manually download the precise64.box file because of net failure. (By using download tools through mirror-site, it only take 300M file. But the download in command line just keeps fail. ) Then I edited the vagrantfile as override.vm.box_url = "\precise64.box" it seems work well. I wish I didn't make a mistake.
4) I will have a try today using CERNET. But if it doesn't work yet, I wish you could provide an all-in-one vagrant box for me if it doesn't bother you. Thanks again! It is really encouraging to get your suggenstions and help.
— Reply to this email directly or view it on GitHub.
1) I have got the virtual machine installed on my desktop computer correctedly and smoothly by CERNET connection. Thanks a lot! And I'm considering if I can create a box file and put it on my desktoop computer at home or other computer that have no CERNET connection. I don't know if it's feasible in a few commands? 2) The access of social web APIs are a problem for all Chinese readers of your book. Wakari is a hopeful suggestion and I will have a try. Anyway, we have native social websites and APIs here in China, such as renren, Weibo, wechat, etc. Although the functions and codes may be different, the principles and methods in you book will still be great helpful.
That's great news!
Take a look at Vagrant's documentation for "exporting a box". It will allow you to take your provisioned Virtualbox image and export it as a "base image" that is exactly what you are looking for. Very easy to do...
Please keep me in the loop for your work on social websites in China. Very interested to see if you work up any code you could share out.
On Feb 8, 2014, at 9:16 PM, FengChong notifications@github.com wrote:
1) I have got the virtual machine installed on my desktop computer correctedly and smoothly by CERNET connection. Thanks a lot! And I'm considering if I can create a box file and put it on my desktoop computer at home or other computer that have no CERNET connection. I don't know if it's feasible in a few commands? 2) The access of social web APIs are a problem for all Chinese readers of your book. Wakari is a hopeful suggestion and I will have a try. Anyway, we have native social websites and APIs here in China, such as renren, Weibo, wechat, etc. Although the functions and codes may be different, the principles and methods in you book will still be great helpful.
— Reply to this email directly or view it on GitHub.
Thanks a lot. Sure, I would be very glad to share my experiences on Chinese social websites.
This is a link that you'll need to reference in exporting (packaging) your configured box: https://docs.vagrantup.com/v2/cli/package.html
I'm sure you're savvy enough to figure out ways to use proxies to hit the social web APIs, but in case you need a helpful list as a starting point, this might be useful: http://www.freeproxylists.net/cn.html
I've also been considering setting up a proxy and doing some general purpose research on creative ways to deal with the "great firewall of China" for my readers (as I have now interacted with a few people from China experience troubles at this point.)
Best of luck to you.
Today,when try do deploy the virtual machine, I meet a problem amost like this . so can you give me a hand .I'm sorry to tell you that I'm a university student in ChongQing
我也是最近在看这本书遇到类似的问题,不知道如何将解决发现你说是在中国就问问看能不能帮到我
Thanks for your wonderful book. I read several chapters first and then decide to go with my computer. But when I try to deploy the virtual machine, I can't get the expected results. I think I did follow your instructions in book and screencast. May be I missed something... Thanks a lot if you could tell me how should I put it right.
The host machine is on Win7 (64bit). I have checked the initial steps are fine. All separate commands, including "git", "vagrant", and "ssh", can get normal feedback. Then the "git clone" is fine. Then I try to "vagrant up". The results are as following. I use "vagrant ssh" to know if the guest is running. yeah, I do can log in. But neither "http://localhost:8888" nor "http://127.0.0.1:8888/" can open the notebook. And I try to mannually get the web server run (I find it in your suggestion to other one). But it didn't work. Really frustrating now...