Question

I am having issue with Vagrant where Puppet is failing to start Apache. Please see the below log.

gerald@the-proud-dad:foxvdd$ vagrant up --provision
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise32'...
...

Guest Additions Version: 4.2.0
VirtualBox Version: 4.3
...
[default] Running provisioner: puppet...
Running Puppet with site.pp...
stdin: is not a tty
warning: Could not retrieve fact fqdn
notice: /Stage[main]/Undine_sendmail/Package[sendmail]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_apt/Exec[apt-update]/returns: executed successfully
notice: /Stage[main]/Undine_apt/Package[python-software-properties]/ensure: ensure changed 'purged' to 'present'
...
notice: /Stage[main]/Undine_apache/Package[apache2]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/envvars]/content: content changed '{md5}0fbcabe747a6f6c596797b843bc05395' to '{md5}5c129ad1dcf17da9b10ba938238fd16e'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/envvars]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/envvars]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/apache2.conf]/content: content changed '{md5}8f5c4e0629a7c10aead1bf839cc57c72' to '{md5}1b9506a674770016b3da11b26c084409'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/apache2.conf]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/apache2.conf]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/httpd.conf]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/httpd.conf]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_xhprof/Undine_apache::Misc_conf_file[/etc/php53/conf.d/xhprof.ini]/File[/etc/php53/conf.d/xhprof.ini]/mode: mode changed '0664' to '0640'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default-ssl]/content: content changed '{md5}bf4746bf3b38bdbbd82ba21b3933ba10' to '{md5}3dc0da4778e6537b7fa28e53d5caddc2'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default-ssl]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default-ssl]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-enabled/000-default-ssl]/ensure: created
notice: /Stage[main]/Undine_apache/File[/etc/apache2/ports.conf]/content: content changed '{md5}38b31d20326f3640a8dfbe1ff5d1c4ad' to '{md5}484e9a1120aa767e5268702d608d8bc4'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/ports.conf]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/ports.conf]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default]/content: content changed '{md5}b38ca5a963f52930ede3f4e1958f3275' to '{md5}35419eb6feb10286bcafb1f8b3b1ec78'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-enabled/000-default]/target: target changed '../sites-available/default' to '/etc/apache2/sites-available/default'
notice: /Stage[main]/Undine_memcached::Package/Undine_apt::Ppa[travis-ci/memcached-sasl]/Exec[add-ppa-travis-ci-memcached-sasl]/returns: executed successfully
notice: /Stage[main]/Undine_memcached::Package/Package[php5-memcache]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_rewrite]/Exec[/usr/sbin/a2enmod rewrite]/returns: executed successfully
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_rewrite]/File[/etc/apache2/mods-available/rewrite.load]/mode: mode changed '0644' to '0640'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_rewrite]/File[/etc/apache2/mods-enabled/rewrite.load]/target: target changed '../mods-available/rewrite.load' to '/etc/apache2/mods-available/rewrite.load'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/Exec[/usr/sbin/a2enmod ssl]/returns: executed successfully
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/File[/etc/apache2/mods-available/ssl.conf]/content: content changed '{md5}31f28d4e82635d2393210b424369674b' to '{md5}b2b8866626d972f493bea85f61129b38'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/File[/etc/apache2/mods-available/ssl.conf]/mode: mode changed '0644' to '0640'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/File[/etc/apache2/mods-enabled/ssl.conf]/target: target changed '../mods-available/ssl.conf' to '/etc/apache2/mods-available/ssl.conf'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/File[/etc/apache2/mods-available/ssl.load]/mode: mode changed '0644' to '0640'
notice: /Stage[main]/Undine_memcached::Service/Service[memcached]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Undine_apache/File[/var/lock/apache2]/owner: owner changed 'www-data' to 'vagrant'
notice: /Stage[main]/Undine_curl/Package[curl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_varnish/Exec[import-key]/returns: executed successfully
notice: /Stage[main]/Undine_varnish/File[varnish.repo]/ensure: created
notice: /Stage[main]/Undine_varnish/Exec[varnish-update-sources-file]/returns: executed successfully
notice: /Stage[main]/Undine_varnish/Package[varnish]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_varnish/File[/etc/varnish/default.vcl]/content: content changed '{md5}c17afde2e09436173bdcf9dce319c5a4' to '{md5}53080d4cfa89bb81f6d5f6e3b05a3971'
notice: /Stage[main]/Undine_varnish/File[/etc/varnish/default.vcl]/mode: mode changed '0644' to '0444'
notice: /Stage[main]/Undine_apache_php/Package[libapache2-mod-php53]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_xdebug/Package[php53-xdebug]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_apache_php/Undine_apache::Httpd_mod[php53]/Exec[/usr/sbin/a2enmod php53]/returns: executed successfully
notice: /Stage[main]/Undine_apache_php/Undine_apache::Httpd_mod[php53]/File[/etc/apache2/mods-available/php53.load]/mode: mode changed '0644' to '0640'
notice: /Stage[main]/Undine_apache_php/Undine_apache::Httpd_mod[php53]/File[/etc/apache2/mods-available/php53.conf]/mode: mode changed '0644' to '0640'
err: /Stage[main]/Undine_apache/Service[apache2]/ensure: change from stopped to running failed: Could not start Service[apache2]: Execution of '/etc/init.d/apache2 start' returned 1:  at /tmp/vagrant-puppet-1/modules-0/undine_apache/manifests/init.pp:108
notice: /Stage[main]/Undine_apache/Service[apache2]: Triggered 'refresh' from 10 events
notice: /Stage[main]/Undine_apache_php/Undine_apache::Httpd_mod[php53]/File[/etc/apache2/mods-enabled/php53.conf]/target: target changed '../mods-available/php53.conf' to '/etc/apache2/mods-available/php53.conf'
notice: /Stage[main]/Undine_apache_php/Undine_apache::Httpd_mod[php53]/File[/etc/apache2/mods-enabled/php53.load]/target: target changed '../mods-available/php53.load' to '/etc/apache2/mods-available/php53.load'
notice: /Stage[main]/Undine_varnish/File[/etc/default/varnish]/content: content changed '{md5}189f82b61ddefb8fe0f0eb238f6ca239' to '{md5}14285af4e0f3e521f61c6bc7874dc971'
notice: /Stage[main]/Undine_varnish/File[/etc/default/varnish]/mode: mode changed '0644' to '0444'
notice: /Stage[main]/Undine_varnish/Service[varnish]: Triggered 'refresh' from 4 events
notice: /Stage[main]/Undine_percona/Exec[percona-source-list-update]/returns: executed successfully
notice: /Stage[main]/Undine_percona/Exec[percona-source-list-update]: Triggered 'refresh' from 2 events
notice: /Stage[main]/Undine_percona/Package[percona-server-server-5.5]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_percona/File[/etc/mysql/my.cnf]/ensure: defined content as '{md5}389f4ceb81a82df35f069e64de56e334'
notice: /Stage[main]/Undine_percona/Exec[percona-resize-innodb-logs]/returns: executed successfully
notice: /Stage[main]/Undine_percona/Service[mysql]: Triggered 'refresh' from 2 events
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/File[/etc/apache2/mods-enabled/ssl.load]/target: target changed '../mods-available/ssl.load' to '/etc/apache2/mods-available/ssl.load'
notice: /Stage[main]/Undine_git/Undine_apt::Ppa[git-core/ppa]/Exec[apt-update-ppa-git-core-ppa]/returns: executed successfully
notice: /Stage[main]/Undine_git/Undine_apt::Ppa[git-core/ppa]/Exec[apt-update-ppa-git-core-ppa]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Undine_git/Package[git]/ensure: created
notice: /Stage[main]/Undine_xhprof/Package[graphviz]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine/File[/etc/motd]: Dependency Service[apache2] has failures: true
warning: /Stage[main]/Undine/File[/etc/motd]: Skipping because of failed dependencies
notice: /Stage[main]/Undine/Package[nfs-common]: Dependency Service[apache2] has failures: true
warning: /Stage[main]/Undine/Package[nfs-common]: Skipping because of failed dependencies
notice: /Stage[main]/Undine/Package[portmap]: Dependency Service[apache2] has failures: true
warning: /Stage[main]/Undine/Package[portmap]: Skipping because of failed dependencies
notice: Finished catalog run in 1294.10 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

FACTER_host_uid='1000' FACTER_host_gid='33' puppet apply --modulepath '/tmp/vagrant-puppet-1/modules-0:/tmp/vagrant-puppet-1/modules-1:/tmp/vagrant-puppet-1/modules-2' --manifestdir /tmp/vagrant-puppet-1/manifests --detailed-exitcodes /tmp/vagrant-puppet-1/manifests/site.pp || [ $? -eq 2 ]

Stdout from the command:

warning: Could not retrieve fact fqdn
notice: /Stage[main]/Undine_sendmail/Package[sendmail]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_apt/Exec[apt-update]/returns: executed successfully
notice: /Stage[main]/Undine_apt/Package[python-software-properties]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_git/Undine_apt::Ppa[git-core/ppa]/Exec[add-ppa-git-core-ppa]/returns: executed successfully
notice: /Stage[main]/Undine_percona/Exec[percona-add-apt-key]/returns: executed successfully
notice: /Stage[main]/Undine_ssh/File[/root/.ssh]/ensure: created
notice: /Stage[main]/Undine_xhprof/Undine_apt::Ppa[skettler/php]/Exec[add-ppa-skettler-php]/returns: executed successfully
notice: /Stage[main]/Undine_xhprof/Undine_apt::Ppa[skettler/php]/File[/etc/apt/sources.list.d/skettler-php-xhprof-precise.list]/ensure: created
notice: /Stage[main]/Undine_xhprof/Undine_apt::Ppa[skettler/php]/Exec[apt-update-ppa-skettler-php]/returns: executed successfully
notice: /Stage[main]/Undine_xhprof/Undine_apt::Ppa[skettler/php]/Exec[apt-update-ppa-skettler-php]: Triggered 'refresh' from 2 events
notice: /Stage[main]/Undine_percona/File[/etc/apt/sources.list.d/percona.list]/ensure: defined content as '{md5}afe701dc8c6d46f6eb051b395d6e71da'
notice: /Stage[main]/Undine_xhprof/Package[php53-xhprof]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_xhprof/File[/var/log/php53-xhprof]/owner: owner changed 'www-data' to 'vagrant'
notice: /Stage[main]/Undine_xhprof/File[/var/log/php53-xhprof]/group: group changed 'www-data' to 'vagrant'
notice: /Stage[main]/Undine_xhprof/File[/var/log/php53-xhprof]/mode: mode changed '0770' to '0755'
notice: /Stage[main]/Undine_vim/Package[vim]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_php/Undine_apt::Ppa[aoe/php]/Exec[add-ppa-aoe-php]/returns: executed successfully
notice: /Stage[main]/Undine_apache/Package[apache2]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_apache/File[/var/www]/mode: mode changed '0777' to '0775'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/envvars]/content: content changed '{md5}0fbcabe747a6f6c596797b843bc05395' to '{md5}5c129ad1dcf17da9b10ba938238fd16e'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/envvars]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/envvars]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/apache2.conf]/content: content changed '{md5}8f5c4e0629a7c10aead1bf839cc57c72' to '{md5}1b9506a674770016b3da11b26c084409'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/apache2.conf]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/apache2.conf]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/httpd.conf]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/httpd.conf]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_xhprof/Undine_apache::Misc_conf_file[/etc/php53/conf.d/xhprof.ini]/File[/etc/php53/conf.d/xhprof.ini]/content: content changed '{md5}c25afc2a7dafe22d28132b1f574a6b8f' to '{md5}c87f7adefc274754076c582bd70ffed6'
notice: /Stage[main]/Undine_xhprof/Undine_apache::Misc_conf_file[/etc/php53/conf.d/xhprof.ini]/File[/etc/php53/conf.d/xhprof.ini]/mode: mode changed '0664' to '0640'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default-ssl]/content: content changed '{md5}bf4746bf3b38bdbbd82ba21b3933ba10' to '{md5}3dc0da4778e6537b7fa28e53d5caddc2'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default-ssl]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default-ssl]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-enabled/000-default-ssl]/ensure: created
notice: /Stage[main]/Undine_apache/File[/etc/apache2/ports.conf]/content: content changed '{md5}38b31d20326f3640a8dfbe1ff5d1c4ad' to '{md5}484e9a1120aa767e5268702d608d8bc4'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/ports.conf]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/ports.conf]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default]/content: content changed '{md5}b38ca5a963f52930ede3f4e1958f3275' to '{md5}35419eb6feb10286bcafb1f8b3b1ec78'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default]/group: group changed 'root' to 'vagrant'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-available/default]/mode: mode changed '0644' to '0777'
notice: /Stage[main]/Undine_apache/File[/etc/apache2/sites-enabled/000-default]/target: target changed '../sites-available/default' to '/etc/apache2/sites-available/default'
notice: /Stage[main]/Undine_memcached::Package/Undine_apt::Ppa[travis-ci/memcached-sasl]/Exec[add-ppa-travis-ci-memcached-sasl]/returns: executed successfully
notice: /Stage[main]/Undine_memcached::Package/Package[php5-memcache]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_rewrite]/Exec[/usr/sbin/a2enmod rewrite]/returns: executed successfully
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_rewrite]/File[/etc/apache2/mods-available/rewrite.load]/mode: mode changed '0644' to '0640'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_rewrite]/File[/etc/apache2/mods-enabled/rewrite.load]/target: target changed '../mods-available/rewrite.load' to '/etc/apache2/mods-available/rewrite.load'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/Exec[/usr/sbin/a2enmod ssl]/returns: executed successfully
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/File[/etc/apache2/mods-available/ssl.conf]/content: content changed '{md5}31f28d4e82635d2393210b424369674b' to '{md5}b2b8866626d972f493bea85f61129b38'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/File[/etc/apache2/mods-available/ssl.conf]/mode: mode changed '0644' to '0640'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/File[/etc/apache2/mods-enabled/ssl.conf]/target: target changed '../mods-available/ssl.conf' to '/etc/apache2/mods-available/ssl.conf'
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/File[/etc/apache2/mods-available/ssl.load]/mode: mode changed '0644' to '0640'
notice: /Stage[main]/Undine_memcached::Package/Undine_apt::Ppa[travis-ci/memcached-sasl]/File[/etc/apt/sources.list.d/memcached-ppa-precise.list]/ensure: created
notice: /Stage[main]/Undine_memcached::Package/Undine_apt::Ppa[travis-ci/memcached-sasl]/Exec[apt-update-ppa-travis-ci-memcached-sasl]/returns: executed successfully
notice: /Stage[main]/Undine_memcached::Package/Undine_apt::Ppa[travis-ci/memcached-sasl]/Exec[apt-update-ppa-travis-ci-memcached-sasl]: Triggered 'refresh' from 2 events
notice: /Stage[main]/Undine_memcached::Package/Package[memcached]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_memcached::Service/Service[memcached]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Undine_apache/File[/var/lock/apache2]/owner: owner changed 'www-data' to 'vagrant'
notice: /Stage[main]/Undine_curl/Package[curl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_varnish/Exec[import-key]/returns: executed successfully
notice: /Stage[main]/Undine_varnish/File[varnish.repo]/ensure: created
notice: /Stage[main]/Undine_varnish/Exec[varnish-update-sources-file]/returns: executed successfully
notice: /Stage[main]/Undine_varnish/Package[varnish]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_varnish/File[/etc/varnish/default.vcl]/content: content changed '{md5}c17afde2e09436173bdcf9dce319c5a4' to '{md5}53080d4cfa89bb81f6d5f6e3b05a3971'
notice: /Stage[main]/Undine_varnish/File[/etc/varnish/default.vcl]/mode: mode changed '0644' to '0444'
notice: /Stage[main]/Undine_php/Undine_apt::Ppa[aoe/php]/Exec[apt-update-ppa-aoe-php]/returns: executed successfully
notice: /Stage[main]/Undine_php/Undine_apt::Ppa[aoe/php]/Exec[apt-update-ppa-aoe-php]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Undine_php/Package[php53-pear]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_drush/Exec[/usr/bin/pear channel-discover pear.drush.org]/returns: executed successfully
notice: /Stage[main]/Undine_drush/Exec[/usr/bin/pear install drush/drush]/returns: executed successfully
notice: /Stage[main]/Undine_drush/Exec[/usr/bin/drush]/returns: executed successfully
notice: /Stage[main]/Undine_drush/File[/home/vagrant/.drush]/ensure: created
notice: /Stage[main]/Undine_xdebug/Undine_apache::Misc_conf_file[/etc/php53/conf.d/xdebug.ini]/File[/etc/php53/conf.d/xdebug.ini]/ensure: defined content as '{md5}46a298910616a2b8c1c878763ce0e397'
notice: /Stage[main]/Undine_apache_php/Package[libapache2-mod-php53]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_xdebug/Package[php53-xdebug]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_apache_php/Undine_apache::Httpd_mod[php53]/Exec[/usr/sbin/a2enmod php53]/returns: executed successfully
notice: /Stage[main]/Undine_apache_php/Undine_apache::Httpd_mod[php53]/File[/etc/apache2/mods-available/php53.load]/mode: mode changed '0644' to '0640'
notice: /Stage[main]/Undine_apache_php/Undine_apache::Httpd_mod[php53]/File[/etc/apache2/mods-available/php53.conf]/mode: mode changed '0644' to '0640'
err: /Stage[main]/Undine_apache/Service[apache2]/ensure: change from stopped to running failed: Could not start Service[apache2]: Execution of '/etc/init.d/apache2 start' returned 1:  at /tmp/vagrant-puppet-1/modules-0/undine_apache/manifests/init.pp:108
notice: /Stage[main]/Undine_apache/Service[apache2]: Triggered 'refresh' from 10 events
notice: /Stage[main]/Undine_apache_php/Undine_apache::Httpd_mod[php53]/File[/etc/apache2/mods-enabled/php53.conf]/target: target changed '../mods-available/php53.conf' to '/etc/apache2/mods-available/php53.conf'
notice: /Stage[main]/Undine_apache_php/Undine_apache::Httpd_mod[php53]/File[/etc/apache2/mods-enabled/php53.load]/target: target changed '../mods-available/php53.load' to '/etc/apache2/mods-available/php53.load'
notice: /Stage[main]/Undine_varnish/File[/etc/default/varnish]/content: content changed '{md5}189f82b61ddefb8fe0f0eb238f6ca239' to '{md5}14285af4e0f3e521f61c6bc7874dc971'
notice: /Stage[main]/Undine_varnish/File[/etc/default/varnish]/mode: mode changed '0644' to '0444'
notice: /Stage[main]/Undine_varnish/Service[varnish]: Triggered 'refresh' from 4 events
notice: /Stage[main]/Undine_percona/Exec[percona-source-list-update]/returns: executed successfully
notice: /Stage[main]/Undine_percona/Exec[percona-source-list-update]: Triggered 'refresh' from 2 events
notice: /Stage[main]/Undine_percona/Package[percona-server-server-5.5]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine_percona/File[/etc/mysql/my.cnf]/ensure: defined content as '{md5}389f4ceb81a82df35f069e64de56e334'
notice: /Stage[main]/Undine_percona/Exec[percona-resize-innodb-logs]/returns: executed successfully
notice: /Stage[main]/Undine_percona/Service[mysql]: Triggered 'refresh' from 2 events
notice: /Stage[main]/Undine_apache/Undine_apache::Httpd_mod[mod_ssl]/File[/etc/apache2/mods-enabled/ssl.load]/target: target changed '../mods-available/ssl.load' to '/etc/apache2/mods-available/ssl.load'
notice: /Stage[main]/Undine_git/Undine_apt::Ppa[git-core/ppa]/Exec[apt-update-ppa-git-core-ppa]/returns: executed successfully
notice: /Stage[main]/Undine_git/Undine_apt::Ppa[git-core/ppa]/Exec[apt-update-ppa-git-core-ppa]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Undine_git/Package[git]/ensure: created
notice: /Stage[main]/Undine_xhprof/Package[graphviz]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Undine/File[/etc/motd]: Dependency Service[apache2] has failures: true
warning: /Stage[main]/Undine/File[/etc/motd]: Skipping because of failed dependencies
notice: /Stage[main]/Undine/Package[nfs-common]: Dependency Service[apache2] has failures: true
warning: /Stage[main]/Undine/Package[nfs-common]: Skipping because of failed dependencies
notice: /Stage[main]/Undine/Package[portmap]: Dependency Service[apache2] has failures: true
warning: /Stage[main]/Undine/Package[portmap]: Skipping because of failed dependencies
notice: Finished catalog run in 1294.10 seconds

Stderr from the command:

stdin: is not a tty

The problem in particular is...

err: /Stage[main]/Undine_apache/Service[apache2]/ensure: change from stopped to running failed: Could not start Service[apache2]: Execution of '/etc/init.d/apache2 start' returned 1: at /tmp/vagrant-puppet-1/modules-0/undine_apache/manifests/init.pp:108

Here is the content of Apache init.pp...

# == Class: undine_apache
#
# The undine_apache class is responsible for the package management,
# installation, and configuration of the httpd server used by Undine. This
# includes core apache configuration, ports configuration, default site
# configuration, and Apache module installation and configuration.
#
# It should not be necessary to declare this class directly, as it will be
# declared automatically by the undine class, which all Undine sites should use.
#
# Integration of PHP with Apache is provided in undine_apache_php.
#
class undine_apache {

  # Install package and dependencies.
  package { 'apache2':
    ensure => installed,
  }

  # Manage core configuration files.

  file { '/etc/apache2/httpd.conf':
    path => '/etc/apache2/httpd.conf',
    ensure => file,
    require => Package['apache2'],
    source => 'puppet:///modules/undine_apache/httpd.conf',
  }
  file { '/etc/apache2/apache2.conf':
    path => '/etc/apache2/apache2.conf',
    ensure => file,
    require => Package['apache2'],
    source => 'puppet:///modules/undine_apache/apache2.conf',
  }
  file { '/etc/apache2/envvars':
    path => '/etc/apache2/envvars',
    ensure => file,
    require => Package['apache2'],
    source => 'puppet:///modules/undine_apache/envvars',
  }
  file { '/etc/apache2/ports.conf':
    path => '/etc/apache2/ports.conf',
    ensure => file,
    require => Package['apache2'],
    source => 'puppet:///modules/undine_apache/ports.conf',
  }
  file { '/etc/apache2/sites-available/default':
    path => '/etc/apache2/sites-available/default',
    ensure => file,
    require => Package['apache2'],
    source => 'puppet:///modules/undine_apache/default',
  }
  file { '/etc/apache2/sites-available/default-ssl':
    path => '/etc/apache2/sites-available/default-ssl',
    ensure => file,
    require => Package['apache2'],
    source => 'puppet:///modules/undine_apache/default-ssl',
  }

  # Enable core modules.

  undine_apache::httpd_mod { 'mod_ssl':
    mod_name => 'ssl',
    load_source => 'puppet:///modules/undine_apache/ssl.load',
    conf_source => 'puppet:///modules/undine_apache/ssl.conf',
  }

  undine_apache::httpd_mod { 'mod_rewrite':
    mod_name => 'rewrite',
    load_source => 'puppet:///modules/undine_apache/rewrite.load',
  }

  # Manage enabled site configuration.

  file { '/etc/apache2/sites-enabled/000-default':
    path => '/etc/apache2/sites-enabled/000-default',
    ensure => link,
    target => '/etc/apache2/sites-available/default',
    require => File['/etc/apache2/sites-available/default'],
  }
  file { '/etc/apache2/sites-enabled/000-default-ssl':
    path => '/etc/apache2/sites-enabled/000-default-ssl',
    ensure => link,
    target => '/etc/apache2/sites-available/default-ssl',
    require => File['/etc/apache2/sites-available/default-ssl'],
  }

  # Manage web root.

  file { '/var/www':
    path => '/var/www',
    ensure => directory,
    mode => 0664,
    require => Package['apache2'],
  }

  # Ensure lockfile owned by vagrant.

  file { '/var/lock/apache2':
    ensure => directory,
    owner => 'vagrant',
    require => Package['apache2'],
  }

  service { 'apache2':
    ensure => running,
    enable => true,
    require => File['/var/lock/apache2'],
  }
}

And here is the main init.pp...

# == Class: undine
#
# The undine class is a wrapper for the the other components of the Undine VM,
# in addition to providing other minor system-level configuration (such as using
# a more informative motd).
#
# === Examples
#
# The primary use of the Undine class is to encapuslate basic provisioning for
# the VM. It is intended to be declared in Puppet modules in the ./sites
# directory using the require syntax, typically followed by one or more
# undine::drupal_instance resources.
#
# # sites/mysite/manifests/init.pp
# require undine
# undine::drupal_instance { "mysite":
#   ...
# }
#
class undine {
  require undine_php
  require undine_apache
  require undine_apache_php
  require undine_percona
  require undine_git
  require undine_ssh
  require undine_drush
  require undine_xhprof
  require undine_xdebug
  require undine_curl
  require undine_vim
  require undine_varnish
  require undine_memcached
  require undine_sendmail

  file { "/etc/motd":
    path => '/etc/motd',
    ensure => file,
    source => 'puppet:///modules/undine/motd',
  }

  # NFS configuration for those hosts that choose to use it.
  package { "nfs-common":
    ensure => installed,
  }
  package { "portmap":
    ensure => installed,
  }
}
Was it helpful?

Solution

I found out that there are some missing variables in Apache envvars file.

Before:

# envvars - default environment variables for apache2ctl
# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=vagrant
export APACHE_RUN_GROUP=vagrant
export APACHE_PID_FILE=/var/run/apache2.pid

## The locale used by some modules like mod_dav
export LANG=C
## Uncomment the following line to use the system default locale instead:
#. /etc/default/locale

export LANG

## The command to get the status for 'apache2ctl status'.
## Some packages providing 'www-browser' need '--dump' instead of '-dump'.
#export APACHE_LYNX='www-browser -dump'

After:

# envvars - default environment variables for apache2ctl

# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
  SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
  SUFFIX=
fi

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=vagrant
export APACHE_RUN_GROUP=vagranta
export APACHE_PID_FILE=/var/run/apache2.pid
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

## The locale used by some modules like mod_dav
export LANG=C
## Uncomment the following line to use the system default locale instead:
#. /etc/default/locale

export LANG

## The command to get the status for 'apache2ctl status'.
## Some packages providing 'www-browser' need '--dump' instead of '-dump'.
#export APACHE_LYNX='www-browser -dump'

Error on start:

Action 'start' failed.
The Apache error log may have more information.                  [fail]

error.log:

[Tue May 20 02:54:34 2014] [notice] caught SIGTERM, shutting down
[Tue May 20 02:54:34 2014] [error] (2)No such file or directory: could not open transfer log file /etc/apache2/${APACHE_LOG_DIR}/other_vhosts_access.log.
Unable to open logs
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top