hashbangcode / vlad

Vlad - Vagrant LAMP Ansible Drupal
173 stars 53 forks source link

Mailcatcher fails to run on vagrant up #81

Closed philipnorton42 closed 10 years ago

philipnorton42 commented 10 years ago

I now get the following 2 errors when I run vagrant up on a vm that's already been provisioned and MailCatcher is enabled in settings:

==> pnet: TASK: [MailCatcher | kill mailcatcher] ****************************************
==> pnet: failed: [192.168.100.103] => {"changed": true, "cmd": ["curl", "-s", "-i", "-v", "-X", "DELETE", "http://127.0.0.1:1080"], "delta": "0:00:00.008312", "end": "2014-09-08 12:42:30.713547", "rc": 7, "start": "2014-09-08 12:42:30.705235"}
==> pnet: stderr: * About to connect() to 127.0.0.1 port 1080 (#0)
==> pnet: *   Trying 127.0.0.1... Connection refused
==> pnet: * couldn't connect to host
==> pnet: * Closing connection #0
==> pnet: ...ignoring
==> pnet:
==> pnet: TASK: [MailCatcher | run MailCatcher with no ip address restrictions] *********
==> pnet: failed: [192.168.100.103] => {"changed": true, "cmd": ["bash", "-lc", "mailcatcher --ip=0.0.0.0"], "delta": "0:00:00.005659", "end": "2014-09-08 12:42:31.434469", "rc": 127, "start": "2014-09-08 12:42:31.428810"}
==> pnet: stderr: bash: mailcatcher: command not found
==> pnet:
==> pnet: FATAL: all hosts have already failed -- aborting

The first error get's ignored as you can see - I'm unsure if this is expected or not. The second error causes the play to fail.

I have a funny feeling I may have introduced this bug through the recent move from RVM to rbenv. Can anyone help debug this?


philipnorton42 commented 10 years ago

Seems happy following the fix recently committed to dev :)


Original Comment By: Dan Bohea

philipnorton42 commented 10 years ago

Is this ready to close now?


Original Comment By: Philip Norton

philipnorton42 commented 10 years ago

Marvellous - appreciate the rapid response!


Original Comment By: Dan Bohea

philipnorton42 commented 10 years ago

Oh, the first error is because the system is trying to connect to a non-existent service as it doesn't exist. Once mailcatcher is up and running both of the commands run fine.


Original Comment By: Philip Norton

philipnorton42 commented 10 years ago

Hi Dan, All that was needed was to run the mailcatcher command as the vagrant user (and not as sudo). This is because root doesn't know what mailcatcher is. I've applied a fix for this in dev.


Original Comment By: Philip Norton