Page MenuHomePhabricator

deployment-puppetmaster puppet failures due to apache trying to start on same port as nginx
Closed, ResolvedPublic

Description

krenair@deployment-puppetmaster:~$ sudo puppet agent -tv
[...]
Error: Could not start Service[apache2]: Execution of '/etc/init.d/apache2 start' returned 1: 
Error: /Stage[main]/Apache/Service[apache2]/ensure: change from stopped to running failed: Could not start Service[apache2]: Execution of '/etc/init.d/apache2 start' returned 1: 
Notice: Finished catalog run in 107.32 seconds
krenair@deployment-puppetmaster:~$ sudo /etc/init.d/apache2 start
 * Starting web server apache2
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
 * 
 * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
krenair@deployment-puppetmaster:~$ sudo fuser 80/tcp
80/tcp:               1265  1266  1267  1268  1269
krenair@deployment-puppetmaster:~$ ps -ef | grep 1265
root      1265     1  0 Mar23 ?        00:00:00 nginx: master process /usr/sbin/nginx

Event Timeline

@Krenair: Thanks for getting to the bottom of this.

I just did the following:

  • removed the aptly class from the instance via the wikitech web interface,
  • ran apt-get remove nginx-*
  • ran puppet agent --test
    • completed successfully.