Skip to content

Vagrant Troubleshooting

Lennart Stein edited this page Oct 21, 2015 · 2 revisions

From time to time Vagrant will beat you right into your face. Sometimes there are weird behaviors or random errors and issues. Here are some of the typical issues and their certainly reasons:

Vagrant

Reloading (or just halting) a a machine seems to be running forever

  1. Sometimes a ruby process stuck and you need to get rid of it by killing it in your resource monitor or with your terminal by using the kill command on unix machines.

Box

The download of a box is not working perfectly

  1. The box you set is not available to public on Atlas.
  2. The box's version is not released at Atlas. Fix it by releasing it with the Release-Button in the upper right corner.
  3. The box you set is not uploaded at datagrave.innogames.de or the URL defined in Atlas is not correct.
  4. You don't have permissions to load boxes from datagrave.innogames.de. Ask system administration for any help with datagrave access permissions.

Could not find box for provider xy

  1. You probably used a wrong provider name when using vagrant up --provider. Possible provider names are: virtualbox, vmware_desktop, vmware_fusion, vmware_workstation
  2. The box you are using is not supporting the provider you try to use. Check the supported provider information at the website you have found the box.

Network

Initialization of the network seems to be broken

  1. Using VirtualBox and VMware in parallel is not yet supported by Vagrant and breaks your network. Halt one of the boxes run by VirtualBox or VMware. To do a reboot of your computer would probably the best way to go here.
  2. Maybe the provider section in invade.yml file was missing when generating it. Compare your invade.yml file with the default invade.yml.dist file.

Puppet

The provision is not working proberly

  1. Maybe they are just not up to date. In most cases projects are under heavy development. Especially in the starting phase of a project. Ask your team members for help to update the puppet scripts so it is up to date with the project state.
  2. Since your puppet scripts are synced to the guest machine by a synced folder check your synced folder settings to proof wether the puppet files are existing on the guest machine.
  3. Check your provision.puppet section at invade.yml file wether it is configured properly.

Module could not be found

  1. In most cases this means that a module (extern or intern) is not available. Modules are nothing short of classes. So if it says: Could not find module 'mysql'... then there is no folder called 'mysql' in the defined modules folder. Check the provision.puppet section in invade.yml to preclude a wrong configuration of the puppet provisioner.
  2. You have probably mispelled the module. If you're using r10k to load modules from external sources you have to lable the entry exacly like the name of the module class used inside your scripts. You will find a good example at plugin.r10k section in the default invade.yml file.

NFS

Synced folder doesn't initialize or stuck while reload or up command

  1. You /etc/exports file is broken. sudo rm -f /etc/exports to fix it. No worries NFS will automatically rebuild this file. After deleting this file any box using NFS needs to be reloaded to work again too.
  2. VirtualBox Guest Additions or VMware Tools installed on the box used by vagrant and configured in your Vagrantfile are too old compared to your local VirtualBox and/or Guest Additions or VMware and/or VMware Tools Version. You possibly have to update your box.
  3. In some rare cases on windows machines your NFS service is broken. To fix this kill the process or, what is recommended, restart your computer.

My project data seems not to be synced to the guest machine properly

  1. Your synced folder is probably not configured properly. Check the source and path parameter in your invade.yml. Then validate vagrant invade validate and build a new Vagrantfile with vagrant invade build -f and try again.
    Windows: You can set logging: true in plugin.winnfsd section to get a debug output while using NFS.
  2. In some rare cases NFS service breaks. Just do a vagrant reload. This should fix it in most cases.