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

Localhost:8888 won't connect to server on Mac running Yosemite #258

Open luishestres opened 9 years ago

luishestres commented 9 years ago

I'm 99% sure I followed Appendix A to the letter (it's somewhat confusing in places) and when I tried to load localhost:8888 I get this error message: "Safari can't open the page "localhost:8888" because Safari can't connect to the server "localhost". It's not clear from Appendix A if I need to clone the GitHub code before trying to connect to locahost:8888 or after (it's not clear if one needs to install Git or not, for that matter). Here is a pastebin link to my terminal's code:

http://pastebin.com/iP7uiBDg

The solution may already be in another thread but not in any form I can understand. I have next to 0 experience with Python and virtual development environments so please ELI5. I'm on a Macbook Pro running Yosemite, using Vagrant 1.7.2 and VirtualBox 4.3.20.

ptwobrussell commented 9 years ago

Did you watch the video as well? The log does look a little bit different than I would have expected. It shows you using a precise32 box, and it doesn't show that any of the configuration with Chef kicked off, which is almost certainly because you aren't running the "vagrant up" from within the code repository checkout's working directory where the Vagrantfile I provide is located.

On Sat, Feb 7, 2015 at 3:41 PM, luishestres notifications@github.com wrote:

I'm 99% sure I followed Appendix A to the letter (it's somewhat confusing in places) and when I tried to load localhost:8888 I get this error message: "Safari can't open the page "localhost:8888" because Safari can't connect to the server "localhost". It's not clear from Appendix A if I need to clone the GitHub code before trying to connect to locahost:8888 or after (it's not clear if one needs to install Git or not, for that matter). Here is a pastebin link to my terminal's code:

http://pastebin.com/iP7uiBDg

The solution may already be in another thread but not in any form I can understand. I have next to 0 experience with Python and virtual development environments so please ELI5. I'm on a Macbook Pro running Yosemite, using Vagrant 1.7.2 and VirtualBox 4.3.20.

— Reply to this email directly or view it on GitHub https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition/issues/258 .

luishestres commented 9 years ago

I don't remember having the option anywhere of changing the precision32 box to 64 during installation, even though my system is 64-bit. Anyway, I'm going to uninstall everything and start from scratch to make 100% I'm following the Appendix/video exactly right and will report back.

luishestres commented 9 years ago

Went through the installation process from scratch after removing everything and still not working. This time when I try localhost:8888 the browser says "no data received". During installation I had to use the https git clone link because the git@github... wouldn't work...something about a public key. See Terminal code:

http://pastebin.com/ecDutBGZ

I think this time it got closer but still not there. Thanks.

Cornellio commented 9 years ago

You might have the wrong configuraiton file. You should not be seeing any attempt to use the hashicorp/precise32 vagrant box.

Start over with a fresh copy from Github like this:

git clone https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition MiningSocialWeb
Cloning into 'MiningSocialWeb'...
remote: Counting objects: 1725, done.
remote: Total 1725 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1725/1725), 29.72 MiB | 3.87 MiB/s, done.
Resolving deltas: 100% (850/850), done.
Checking connectivity... done.

Change into the directory containing the files from Github:

cd MiningSocialWeb/

There's a Vagrantfile there that configures everything using the precise64 vagrant box.

Type cat Vagrantfile to look at it. You should see a reference to precise64 and a section on running Chef at the end.

Running vagrant up inside that directory will configure everything.

Also, there's an issue with Vagrant 1.7.2. You should uninstall and reinstall Vagrant version 1.7.1.

luishestres commented 9 years ago

Thanks Cornellio. Uninstalled & reinstalled everything (Vagrant 1.7.1 this time) and followed your instructions. Same result. Terminal output here: http://pastebin.com/VuXdBmgX

Anything else I can try? Thanks.

Cornellio commented 9 years ago

Oh, I had a similar problem with a bad path in my VM. Ssh into your VM and make a symlink for Python:

vagrant up
vagrant ssh

Make the symlink from inside the VM:

sudo ln -s /usr/bin/python /bin/python

Then exit the VM and provision the machine again:

vagrant reload
vagrant provision
luishestres commented 9 years ago

When I typed vagrant reload I got this message:

vagrant@precise64:~$ vagrant reload

The program 'vagrant' is currently not installed. You can install it by typing:

sudo apt-get install vagrant

But clearly Vagrant is installed. Should I run this command anyway?


Luis E. Hestres, Ph.D. More about me at luishestres.com

On Mon, Feb 9, 2015 at 1:04 PM, Pete Cornell notifications@github.com wrote:

Oh, I had a similar problem with a bad path in my VM. Ssh into your VM and make a symlink for Python:

vagrant up vagrant ssh

Make the symlink from inside the VM:

sudo ln -s /usr/bin/python /bin/python

Then exit the VM provision the machine again:

vagrant reload vagrant provision

— Reply to this email directly or view it on GitHub https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition/issues/258#issuecomment-73568633 .

Cornellio commented 9 years ago

Run the vagrant commands on your Mac, not inside the VM.

Pete

On Feb 9, 2015, at 3:44 PM, luishestres notifications@github.com wrote:

When I typed vagrant reload I got this message:

vagrant@precise64:~$ vagrant reload

The program 'vagrant' is currently not installed. You can install it by typing:

sudo apt-get install vagrant

But clearly Vagrant is installed. Should I run this command anyway?


Luis E. Hestres, Ph.D. More about me at luishestres.com

On Mon, Feb 9, 2015 at 1:04 PM, Pete Cornell notifications@github.com wrote:

Oh, I had a similar problem with a bad path in my VM. Ssh into your VM and make a symlink for Python:

vagrant up vagrant ssh

Make the symlink from inside the VM:

sudo ln -s /usr/bin/python /bin/python

Then exit the VM provision the machine again:

vagrant reload vagrant provision

— Reply to this email directly or view it on GitHub https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition/issues/258#issuecomment-73568633 .

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

luishestres commented 9 years ago

That did the trick! Thank you!!!


Luis E. Hestres, Ph.D. More about me at luishestres.com

On Mon, Feb 9, 2015 at 6:04 PM, Pete Cornell notifications@github.com wrote:

Run the vagrant commands on your Mac, not inside the VM.

Pete

On Feb 9, 2015, at 3:44 PM, luishestres notifications@github.com wrote:

When I typed vagrant reload I got this message:

vagrant@precise64:~$ vagrant reload

The program 'vagrant' is currently not installed. You can install it by typing:

sudo apt-get install vagrant

But clearly Vagrant is installed. Should I run this command anyway?


Luis E. Hestres, Ph.D. More about me at luishestres.com

On Mon, Feb 9, 2015 at 1:04 PM, Pete Cornell notifications@github.com wrote:

Oh, I had a similar problem with a bad path in my VM. Ssh into your VM and make a symlink for Python:

vagrant up vagrant ssh

Make the symlink from inside the VM:

sudo ln -s /usr/bin/python /bin/python

Then exit the VM provision the machine again:

vagrant reload vagrant provision

— Reply to this email directly or view it on GitHub < https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition/issues/258#issuecomment-73568633

.

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

— Reply to this email directly or view it on GitHub https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition/issues/258#issuecomment-73618316 .