ConservationInternational / COA001

COASST Database App & API
0 stars 0 forks source link

Can't boot machine #2

Closed seansu4you87 closed 9 years ago

seansu4you87 commented 9 years ago

Hey @d-g-h I got a little bit confused by the README. I added the COA001 box as specified in the first line of the instructions. However, I don't understand the rest.

mkdir COA001DB
vagrant box add COA001 COA001.box 
vagrant init
vagrant up

We make a new direction COA001DB, we add the box. If we vagrant init and vagrant up immediately after, it tries to build a base box and fails. I noticed the Vagrantfile in this repo specifies the COA001 box so I tried vagrant up from this repo. It failed with the following message:

~/Development/github.com/RadishLab/COA001 master vagrant up
Bringing machine 'stack' up with 'virtualbox' provider...
==> stack: Importing base box 'COA001'...
==> stack: Matching MAC address for NAT networking...
==> stack: Setting the name of the VM: COA001_stack_1422593739338_67338
==> stack: Fixed port collision for 5432 => 5432. Now on port 2200.
==> stack: Clearing any previously set network interfaces...
==> stack: Preparing network interfaces based on configuration...
    stack: Adapter 1: nat
    stack: Adapter 2: hostonly
    stack: Adapter 3: hostonly
==> stack: Forwarding ports...
    stack: 80 => 8080 (adapter 1)
    stack: 8000 => 8000 (adapter 1)
    stack: 5432 => 2200 (adapter 1)
    stack: 22 => 2227 (adapter 1)
==> stack: Running 'pre-boot' VM customizations...
==> stack: Booting VM...
==> stack: Waiting for machine to boot. This may take a few minutes...
    stack: SSH address: 127.0.0.1:2227
    stack: SSH username: vagrant
    stack: SSH auth method: private key
    stack: Warning: Connection timeout. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
    stack: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
~/Development/github.com/RadishLab/COA001 master

Can you edit the README to make to a bit clearer for me? Thanks!

d-g-h commented 9 years ago

In the above error, above the private keys are not matching.

The machine is active, you can't connect to it via SSH via your key (which was created by the COA001 config).

We are using the packaging box config from dropbox. That has a different Vagrantfile, and key

I will update the instructions now. Please ignore the provisioning instructions as they are for me.

seansu4you87 commented 9 years ago

Ok I just quickly tried it again and got the same error. I had to modify the instructions a little bit. Here is exactly what I did.

# From COA001 repo, I made a COA001DB folder
~/Development/github.com/RadishLab/COA001 master mkdir COA001DB
~/Development/github.com/RadishLab/COA001 master cd COA001DB/

# Add the box (using --force option to override my previous COA001 box)
~/Development/github.com/RadishLab/COA001/COA001DB master vagrant box add --force COA001 ~/Downloads/COA001.box
==> box: Adding box 'COA001' (v0) for provider:
    box: Downloading: file:///Users/yu/Downloads/COA001.box
==> box: Successfully added box 'COA001' (v0) for 'virtualbox'!

# Init a Vagrantfile
~/Development/github.com/RadishLab/COA001/COA001DB master vagrant init
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

# Edit Vagrant file.  Changed line 15 as specified.
~/Development/github.com/RadishLab/COA001/COA001DB master vim Vagrantfile

# Make private key path, and copy the private key from the repo
# Instructions here weren't as clear, so perhaps this isn't right?
~/Development/github.com/RadishLab/COA001/COA001DB master mkdir ./vagrant
~/Development/github.com/RadishLab/COA001/COA001DB master mkdir ./vagrant/machines
~/Development/github.com/RadishLab/COA001/COA001DB master mkdir ./vagrant/machines/default
~/Development/github.com/RadishLab/COA001/COA001DB master mkdir ./vagrant/machines/default/virtualbox/
~/Development/github.com/RadishLab/COA001/COA001DB master cp ../private_key ./vagrant/machines/default/virtualbox/
~/Development/github.com/RadishLab/COA001/COA001DB master ls -la ./vagrant/machines/default/virtualbox/
total 8
drwxr-xr-x  3 yu  yu   102B Jan 30 09:35 .
drwxr-xr-x  3 yu  yu   102B Jan 30 09:34 ..
-rw-r--r--  1 yu  yu   1.6K Jan 30 09:35 private_key

# Boot the COA001 box
~/Development/github.com/RadishLab/COA001/COA001DB master vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'COA001'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: COA001DB_default_1422639329211_62549
==> default: Fixed port collision for 5432 => 5432. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 => 8080 (adapter 1)
    default: 8000 => 8000 (adapter 1)
    default: 5432 => 2200 (adapter 1)
    default: 22 => 2227 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2227
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
~/Development/github.com/RadishLab/COA001/COA001DB master