scalingexcellence / scrapybook

Scrapy Book Code

Home Page:http://scrapybook.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows10 and vbox or vagrant

johnscrapetest87 opened this issue · comments

Hello, Read the first part of the book, but chapters 3-5 are tough without running Vagrant. I have windows 10 on a lenovo laptop, all downlloads went ok but vagrant up still not working....was the windows 10 problem ever fixed ? Is there an easier method to run the book examples on my local machine without vagrant ?....thanks -John

Hello, yes - in general it works fine in Win 10. Let's do a TeamViewer session - it usually takes little time to fix. Contact me via e-mail to arrange a suitable time. Cheers!

The laptop has a 2-core processor, so very good idea to use the 32-bit image. Everything worked well but just before it starts the VM it was giving the following error:

vagrant/util/is_port_open.rb:21:in `initialize': The requested
    address is not valid in its context. - connect(2) for
    "0.0.0.0" port 9312 (Errno::EADDRNOTAVAIL)
  from C:/HashiCorp/Vagrant/embedded/gems/gems/
    vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:21:in `new'
  ...
  from C:/HashiCorp/Vagrant/embedded/gems/gems/
    vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:19:in `is_port_open?'

After some googling, it appears to be this. So all I had to do is to add the host_ip: "127.0.0.1", while starting the port-forwarding, as suggested in that thread.

The computer was also running MySQL on 3306 thus there was a conflict causing another error at VM load. I disabled port forwarding for MySQL. Here are the updated settings on Vagrantfile.32:

# Setting up ports
(
	[9200] +                      # ES
	#[6379] +                      # Redis
	#[3306] +                      # MySQL
	[9312] +                      # Web
	[6800] +                      # Scrapyd
[]).each do |port|
	config.vm.network "forwarded_port", host_ip: "127.0.0.1", guest: port, host: port
end

It all worked fine after that.