title: Configuring puppet with passenger causing port conflict with apache2
body: <p>I am new to puppet, so this might a simple issue that I am stuck with.
  While installing puppet I needed to use Proxy Certificate Traffic so that the agents can reach the CA master.
  I have Ubuntu <code>14.04 64 bit</code> for server configuration.</p>
  
  <p>Now, based on the documentations at I have started working on it.</p>
  
  <ul>
  <li><a href="https://docs.puppetlabs.com/guides/scaling_multiple_masters.html#option-2-proxy-certificate-traffic" rel="nofollow">https://docs.puppetlabs.com/guides/scaling_multiple_masters.html#option-2-proxy-certificate-traffic</a></li>
  <li><a href="https://docs.puppetlabs.com/guides/passenger.html" rel="nofollow">https://docs.puppetlabs.com/guides/passenger.html</a></li>
  </ul>
  
  <p>After I install the puppet server [puppet enterprise version 3.3.2-ubuntu-14.0amd64], and making sure </p>
  
  <pre><code>puppet agent --verbose --no-daemonize --onetime 
  </code></pre>
  
  <p>is run,  I run the following command:</p>
  
  <pre><code>$ sudo apt-get install apache2 ruby1.8-dev rubygems-integration
  </code></pre>
  
  <p>Once the installation is done I run,</p>
  
  <pre><code>$ sudo a2enmod ssl
  </code></pre>
  
  <p>It says that it is enabling the module <code>ssl</code> and asks to re-start apapche2.</p>
  
  <p>But when I try to restart apache2 it fails saying </p>
  
  <pre><code>* Restarting web server apache2                                                
  (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
  (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443
  </code></pre>
  
  <p>Now I find the reason is pe-httpd is already running on this port</p>
  
  <pre><code>$ sudo netstat -ltnp | grep ':443'
  
  tcp6       0      0 :::443                  :::*                    LISTEN      32622/pe-httpd 
  
  $ sudo netstat -ltnp | grep ':8140'**
  
  tcp6       0      0 :::8140                 :::*                    LISTEN      32622/pe-httpd  
  </code></pre>
  
  <p>I understand <code>WEBrick</code> is probably already running and that is why this conflict is arising.</p>
  
  <p>Now my question is do I need to stop pe-http here. </p>
  
  <p>In documentation towards the end it is mentioned:</p>
  
  <blockquote>
    <p>Ensure that any WEBrick puppet master process is stopped before starting the Apache service</p>
  </blockquote>
  
  <p>but not very clear when this action to be carried out, can I stop it when I am running enabling ssl and headers modules?</p>