Apache has failed to install correctly on every initial vagrant up. Apache does install correctly on first vagrant reload.
Excerpt of output of vagrant up with debug option on puppet set.
debug: Service[httpd](provider=redhat): Executing '/sbin/service httpd status'
debug: Puppet::Type::Service::ProviderRedhat: Executing '/sbin/chkconfig httpd'
debug: Service[httpd](provider=redhat): Executing '/sbin/service httpd start'
err: /Stage[main]//Service[httpd]/ensure: change from stopped to running failed: Could not start Service[httpd]: Execution of '/sbin/service httpd start' returned 1: at /tmp/vagrant-puppet/manifests/manifests.pp:37
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q tomcat6-webapps --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}
'
debug: Package[tomcat6-webapps](provider=yum): Ensuring => present
debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -d 0 -e 0 -y install tomcat6-webapps'
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q tomcat6-webapps --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}
'
notice: /Stage[main]//Package[tomcat6-webapps]/ensure: created
debug: /Stage[main]//Package[tomcat6-webapps]: The container Class[Main] will propagate my refresh event
debug: Exec[disable_iptable1](provider=posix): Executing 'iptables stop'
debug: Executing 'iptables stop'
notice: /Stage[main]//Exec[disable_iptable1]/returns: executed successfully
debug: /Stage[main]//Exec[disable_iptable1]: The container Class[Main] will propagate my refresh event
notice: /Stage[main]//File[/bin/lein]/mode: mode changed '0644' to '0755'
debug: /Stage[main]//File[/bin/lein]: The container Class[Main] will propagate my refresh event
debug: /Schedule[never]: Skipping device resources because running on a host
err: /Stage[main]//File[/var/www/html/vagrant]/ensure: change from absent to link failed: Could not set 'link on ensure: No such file or directory - /var/www/html at /tmp/vagrant-puppet/manifests/manifests.pp:67
Command line output of vagrant ssh and checking the /sbin commands are correct. /sbin/service httpd start fails but sudo /sbin/service httpd start succeeds.
Gregs-MacBook-Pro:minus gregelin$ vagrant ssh
Last login: Tue Jul 10 22:56:01 2012 from 10.0.2.2
[vagrant@localhost ~]$ ls /var/www//html/
index.html
[vagrant@localhost ~]$ ls /sbin/service
/sbin/service
[vagrant@localhost ~]$ /sbin/service httpd status
httpd is stopped
[vagrant@localhost ~]$ /sbin/service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[vagrant@localhost ~]$ sudo /sbin/service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
[ OK ]
Finally everything works fine with vagrant reload (even without intermediary vagrant ssh and starting the service.
vagrant reload
debug: /Stage[main]//Exec[disable_iptable2]: The container Class[Main] will propagate my refresh event
debug: Service[httpd](provider=redhat): Executing '/sbin/service httpd status'
debug: Puppet::Type::Service::ProviderRedhat: Executing '/sbin/chkconfig httpd'
debug: Service[httpd](provider=redhat): Executing '/sbin/service httpd start'
debug: Puppet::Type::Service::ProviderRedhat: Executing '/sbin/chkconfig httpd'
debug: Puppet::Type::Service::ProviderRedhat: Executing '/sbin/chkconfig httpd on'
notice: /Stage[main]//Service[httpd]/ensure: ensure changed 'stopped' to 'running'
notice: /Stage[main]//File[/var/www/html/vagrant]/ensure: created
debug: /Stage[main]//File[/var/www/html/vagrant]: The container Class[Main] will propagate my refresh event
Could issue be with needing fully qualified domain name in /etc/hosts file, like below? Maybe hosts file is eventually getting change on completion of initial vagrant up or at start of vagrant reload?
Apache has failed to install correctly on every initial
vagrant up
. Apache does install correctly on firstvagrant reload
.Excerpt of output of
vagrant up
withdebug
option on puppet set.Command line output of
vagrant ssh
and checking the /sbin commands are correct./sbin/service httpd start
fails butsudo /sbin/service httpd start
succeeds.Finally everything works fine with
vagrant reload
(even without intermediaryvagrant ssh
and starting the service.Could issue be with needing fully qualified domain name in /etc/hosts file, like below? Maybe hosts file is eventually getting change on completion of initial
vagrant up
or at start ofvagrant reload
?This is what my vagrant instance /etc/hosts/ file looks like after
vagrant reload
.