How to change Puppet Enterprise web interface port so as not to conflict with my existing Apache web server How to change Puppet Enterprise web interface port so as not to conflict with my existing Apache web server nginx nginx

How to change Puppet Enterprise web interface port so as not to conflict with my existing Apache web server


While I never could figure out how to accomplish this using Puppet Labs suggestion of modifying the hiera.yaml file I have figured out how to do this using the Web Console.

The modifications remove all conflicts with the existing Apache httpd that uses ports 80 and 443.

Access to the PE Web Console will now need to be accessed via port 444

This is the fix:

From the Web Console

  1. Select Configure
  2. Select Classification
  3. Select the + icon labeled "PE Infrastructure" production to display Classes
  4. Select PE Console production link
  5. Select Configuration tab
  6. Under "Classes" section - Add new class
  7. Select "puppet_enterprise::profile::console::proxy::http_redirect" from the list
  8. Select Add class button
  9. Select commit 1 change
  10. New class now shows on the page,
  11. Select parameter name: enable_http_redirect from the list
  12. Set value to false
  13. Add parameter
  14. Select commit 1 change

  15. Select parameter name: ssl_listen_port from the list

  16. Set value to 444
  17. Add parameter
  18. Select commit 1 change

When running puppet agent -t I now get an error as shown below

Duplicate declaration: Class[Puppet_enterprise::Profile::Console::Proxy::Http_redirect] is already declared; cannot redeclare (file: /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/profile/console/proxy.pp, line: 211)

Remove the duplicate declaration from proxy.pp

Edit: /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/profile/console/proxy.pp

#class { 'puppet_enterprise::profile::console::proxy::http_redirect' :#  ssl_listen_port => Integer($ssl_listen_port),#}

Re-run puppet agent -t

puppet agent -t

Console Port(Port 443 change)

From the Web Console

  1. Configure
  2. Classification
  3. Select PE Infrastructure production
  4. Configuration tab
  5. Class: puppet_enterprise::profile::console
  6. Add Parameter
  7. Parameter Name: console_port
  8. Value: 444

Run puppet agent -t and check ports

# puppet agent -t# netstat -tulpn | grep -v tcp6|grep ":443\|:80\|:8090\|:444"tcp        0      0 0.0.0.0:444             0.0.0.0:*               LISTEN      11182/nginx: master 

Start httpd

# systemctl start httpd# netstat -tulpn | grep -v tcp6|grep ":443\|:80\|:8090\|:444"tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      13353/httpd         tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      13353/httpd         tcp        0      0 0.0.0.0:444             0.0.0.0:*               LISTEN      11182/nginx: master 

Accessing the PE Wen Console is now via port 444

https://hostname:444/#/inspect/overview