webdevops/vagrant-docker-vm

Errors during vagrant up

hirnschmalz opened this issue · 3 comments

Hi there,

I tried now several times to create a new Vagrant Docker VM without success.

  • At first I had to make sure that gnupg-curl is installed to get rid of gpgkeys: protocol https' not supported"]` errors.
  • The next step was to make sure that DNS works. I did this by creating a customization/etc/dnsmasq.d/server with the content server=9.9.9.9

Currently I get the following errors during a vagrant provision

    default: TASK [docker : Fix AppArmor profile] *******************************************
    default: fatal: [localhost]: FAILED! => {"changed": false, "msg": "Destination /etc/apparmor.d/docker does not exist !", "rc": 257}
    default: fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["/usr/local/bin/ct", "system:startup", ">", "/dev/null"], "delta": "0:00:00.089411", "end": "2018-12-21 23:25:22.034072", "msg": "non-zero return code", "rc": 1, "start": "2018-12-21 23:25:21.944661", "stderr": "\n                                                          \n  [Symfony\\Component\\Console\\Exception\\RuntimeException]  \n  Too many arguments, expected arguments \"command\".       \n                                                          \n\nsystem:startup", "stderr_lines": ["", "
                                   ", "  [Symfony\\Component\\Console\\Exception\\RuntimeException]  ", "  Too many arguments, expected arguments \"command\".       ", "
                             ", "", "system:startup"], "stdout": "", "stdout_lines": []}

Also the samba service inside the Vagrant box isn't running

vagrant@DEV-VM ~ % sudo systemctl status samba.service
● samba.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)

Would be great if someone else could try to set up a new Vagrant Docker VM to make sure that's not a problem on my local machine.

Markus

Here are all the errors as they appear during a vagrant up after a vagrant destroy

    default: TASK [disk : Stop services] ****************************************************
    default: failed: [localhost] (item=docker) => {"changed": true, "cmd": ["service", "docker", "stop"], "delta": "0:00:00.213211", "end": "2018-12-22 06:12:37.376318", "item": "docker", "msg": "non-zero return code", "rc": 5, "start": "2018-12-22 06:12:37.163107", "stderr": "Failed to stop docker.service: Unit docker.service not loaded.", "stderr_lines": ["Failed to stop docker.service: Unit docker.service not loaded."], "stdout": "", "stdout_lines": []}
    default: TASK [disk : Start services] ***************************************************
    default: fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["service", "docker", "restart"], "delta": "0:00:00.012820", "end": "2018-12-22 06:12:39.759019", "msg": "non-zero return code", "rc": 5, "start": "2018-12-22 06:12:39.746199", "stderr": "Failed to restart docker.service: Unit docker.service not found.", "stderr_lines": ["Failed to restart docker.service: Unit docker.service not found."], "stdout": "", "stdout_lines": []}
    default: TASK [docker : Fix AppArmor profile] *******************************************
    default: fatal: [localhost]: FAILED! => {"changed": false, "msg": "Destination /etc/apparmor.d/docker does not exist !", "rc": 257}
    default: TASK [user : Fix permissions] **************************************************
    default: failed: [localhost] (item={u'path': u'/home/vagrant/.ssh/config', u'state': u'file', u'mode': u'0600'}) => {"changed": false, "item": {"mode": "0600", "path": "/home/vagrant/.ssh/config", "state": "file"}, "msg": "file (/home/vagrant/.ssh/config) is absent, cannot continue", "path": "/home/vagrant/.ssh/config", "state": "absent"}
    default: failed: [localhost] (item={u'path': u'/home/vagrant/.ssh/known_hosts', u'state': u'file', u'mode': u'0644'}) => {"changed": false, "item": {"mode": "0644", "path": "/home/vagrant/.ssh/known_hosts", "state": "file"}, "msg": "file (/home/vagrant/.ssh/known_hosts) is absent, cannot continue", "path": "/home/vagrant/.ssh/known_hosts", "state": "absent"}
    default: changed: [localhost] => (item={u'path': u'/home/vagrant/.subversion/', u'state': u'directory', u'mode': u'0700'})
    default: RUNNING HANDLER [clitools : Run clitools system startup] ***********************
    default: fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["/usr/local/bin/ct", "system:startup", ">", "/dev/null"], "delta": "0:00:00.111529", "end": "2018-12-22 06:16:41.448192", "msg": "non-zero return code", "rc": 1, "start": "2018-12-22 06:16:41.336663", "stderr": "\n                                                          \n  [Symfony\\Component\\Console\\Exception\\RuntimeException]  \n  Too many arguments, expected arguments \"command\".       \n                                                          \n\nsystem:startup", "stderr_lines": ["", "
                                   ", "  [Symfony\\Component\\Console\\Exception\\RuntimeException]  ", "  Too many arguments, expected arguments \"command\".       ", "
                             ", "", "system:startup"], "stdout": "", "stdout_lines": []}

I tried on a different freshly installed machine with the same results.

The main problem was a network configuration error in the VMware virtual machine. Now everything looks fine - even though the status of the samba service shows dead.