Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 8.10.0
- Ruby: 3.2.0 (bundled with puppet rpm)
- Distribution: Redhat 9.4
- Module version: 10.0.0
- httpd: httpd-2.4.62-1.el9.x86_64
How to reproduce (e.g Puppet code you use)
- Start with a new Redhat 9 machine (no apache installed).
- Added (in this order, running puppet agent each time):
Using Puppet R10K with:
forge 'forge.puppetlabs.com'
# Forge Modules
mod 'puppetlabs/ntp', '10.1.0'
mod 'puppetlabs/stdlib'
mod 'puppetlabs-puppetdb', '8.1.0'
mod 'puppet-puppetboard', '10.0.0'
#deps
mod 'puppetlabs-postgresql', '10.3.0'
mod 'puppetlabs-apt', '9.4.0'
mod 'puppet-systemd', '7.1.0'
mod 'puppetlabs-concat', '9.0.2'
mod 'puppetlabs-inifile', '6.1.1'
mod 'puppetlabs-firewall', '8.1.3'
mod 'puppet-python', '7.4.0'
mod 'puppet-epel', '5.0.0'
mod 'puppetlabs-apache', '12.2.0'
# Configure puppetdb and its underlying database
class { 'puppetdb':
listen_address => $facts['fqdn']
}
# Configure the Puppet master to use puppetdb
class { 'puppetdb::master::config': }
class { 'puppetboard':
manage_virtualenv => true,
secret_key => fqdn_rand_string(32),
python_version => '3.9',
}
# For puppetboard
class { 'apache':
default_vhost => false,
}
# Access Puppetboard from example.com/puppetboard
class { 'puppetboard::apache::conf': }
What are you seeing
Error: /Stage[main]/Apache::Service/Service[httpd]/ensure: change from 'stopped' to 'running' failed: Systemd start for httpd failed!
journalctl log for httpd:
Dec 09 06:57:59 servername.domain systemd[1]: Starting The Apache HTTP Server...
Dec 09 06:57:59 servername.domain httpd[17945]: httpd: Could not open configuration file /etc/httpd/conf/httpd.conf: No such file or directory
Dec 09 06:57:59 servername.domain systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Dec 09 06:57:59 servername.domain systemd[1]: httpd.service: Failed with result 'exit-code'.
Dec 09 06:57:59 servername.domain systemd[1]: Failed to start The Apache HTTP Server.
Dec 09 06:59:03 servername.domain systemd[1]: Starting The Apache HTTP Server...
Dec 09 06:59:03 servername.domain httpd[18043]: Server configured, listening on: port 80
Dec 09 06:59:03 servername.domain systemd[1]: Started The Apache HTTP Server.
Dec 09 06:59:06 servername.domain systemd[1]: Stopping The Apache HTTP Server...
Dec 09 06:59:07 servername.domain systemd[1]: httpd.service: Deactivated successfully.
Dec 09 06:59:07 servername.domain systemd[1]: Stopped The Apache HTTP Server.
Dec 09 07:00:17 servername.domain systemd[1]: Starting The Apache HTTP Server...
Dec 09 07:00:17 servername.domain httpd[18503]: no listening sockets available, shutting down
Dec 09 07:00:17 servername.domain httpd[18503]: AH00015: Unable to open logs
Dec 09 07:00:17 servername.domain systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Dec 09 07:00:17 servername.domain systemd[1]: httpd.service: Failed with result 'exit-code'.
Dec 09 07:00:17 servername.domain systemd[1]: Failed to start The Apache HTTP Server.
Dec 09 07:01:30 servername.domain systemd[1]: Starting The Apache HTTP Server...
Dec 09 07:01:30 servername.domain httpd[18922]: no listening sockets available, shutting down
Dec 09 07:01:30 servername.domain httpd[18922]: AH00015: Unable to open logs
Dec 09 07:01:31 servername.domain systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Dec 09 07:01:31 servername.domain systemd[1]: httpd.service: Failed with result 'exit-code'.
Dec 09 07:01:31 servername.domain systemd[1]: Failed to start The Apache HTTP Server.
# conf file actually exists (readable by root only)
$ ls -l /etc/httpd/conf/httpd.conf
-rw-r--r-- 1 root root 1034 Dec 9 07:00 /etc/httpd/conf/httpd.conf
$ systemctl start httpd
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xeu httpd.service" for details.
Dec 09 07:16:22 servername.domain httpd[19164]: no listening sockets available, shutting down
Dec 09 07:16:22 servername.domain httpd[19164]: AH00015: Unable to open logs
Dec 09 07:16:22 servername.domain systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
# note, Listen is commented out. If uncommented, server starts.
$ grep Listen /etc/httpd/conf/httpd.conf
#Listen 80
Note that re-applying catalog breaks configuration again by commenting out Listen 80
What behaviour did you expect instead
- Apache should start
- Side note: apache module should not create /etc/httpd/conf directory and use conf.d/ files instead.
Output log
Any additional information you'd like to impart
Temporary Workaround
# temporary workaround for https://github.com/voxpupuli/puppet-puppetboard/issues/420
file {'/etc/httpd/conf.d/01-akom.conf':
content => 'Listen 80',
}
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Using Puppet R10K with:
What are you seeing
Note that re-applying catalog breaks configuration again by commenting out
Listen 80What behaviour did you expect instead
Output log
Any additional information you'd like to impart
Temporary Workaround