breinero-zz / MongoDB_Spark_Course

Code materials for the MongoDB Spark Course
14 stars 7 forks source link

vagrantfile provision isnt doing what it supose to do #2

Open diegodorado opened 7 years ago

diegodorado commented 7 years ago

The provisioning fails... i have no service named mongod, and with that mongoimport fails also

diegodorado commented 7 years ago

It seems it had something to do with java version... I updated the provision script with these lines

sudo echo oracle-java9-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections

sudo apt-get -y -q install oracle-java9-installer

sudo update-java-alternatives -s java-9-oracle

sudo apt-get install -y mongodb-org git sbt

... actually, i didnt reprovision... i did it from terminal..... updated java to 9, removed mongo, reinstalled it and now i got it working all right

thomasmodeneis commented 7 years ago

I'm also having problems with this Vagrant file. First I got issues with the memory:

Stderr: VBoxManage: error: Invalid RAM size: 8192 MB (must be in range [4, 3584] MB)

Then I fixed this and run once again, and endup with:

$ vagrant up --provider=virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 27017 (guest) => 27017 (host) (adapter 1)
    default: 8080 (guest) => 8080 (host) (adapter 1)
    default: 7077 (guest) => 7077 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "2736b43a-00a4-45d2-be10-93f99eb63f5a", "--type", "headless"]

Stderr: VBoxManage: error: The virtual machine 'resources_default_1493199411512_73127' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

Any ideas ?