The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #15383

[enterprise installer] pe-httpd: bad user name www-data

Added by Eric Hayes almost 2 years ago. Updated 11 months ago.

Status:Merged - Pending ReleaseStart date:07/05/2012
Priority:NormalDue date:
Assignee:Moses Mendoza% Done:

0%

Category:installer
Target version:Commercial edition - PE Lance
Keywords:installer, pe-httpd, apache, enterprise, www-data Affected URL:
Branch: Affected PE version:2.5.1

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

I get the following error when installing puppet enterprise (puppet -V reports 2.7.12 (Puppet Enterprise 2.5.1)):

   ...
   key_length: 1024
   
   # The "inventory service" allows you to connect to a puppet master to retrieve and node facts
   enable_inventory_service: true
   
   # Hostname of the inventory server.
   inventory_server: 'puppet.psm.local'
   
   # Port for the inventory server.
   inventory_port: 8140
   
   # This should be true to allow the console to display diffs of files
   # archived in the filebucket.
   use_file_bucket_diffs: true
   
   # Hostname of the file bucket server.
   file_bucket_server: 'puppet.psm.local'
   
   # Port for the file bucket server.
   file_bucket_port: 8140
   
   # Amount of time in seconds since last report before a node is considered no longer reporting
   no_longer_reporting_cutoff: 3600
   
   # How many days of history to display on the "Daily Run Status" graph
   daily_run_history_length: 30
   use_external_node_classification: true
   
   # Uncomment the following line to set a local time zone.  Run
   # "rake time:zones:local" for the name of your local time zone.
   #time_zone: 'Pacific Time (US & Canada)'
   
   # Look at http://ruby-doc.org/core/classes/Time.html#M000298 for the strftime formatting
   datetime_format: '%Y-%m-%d %H:%M %Z'
   date_format: '%A, %B %e, %Y'
   
   # Set this to the URL of an image. The image will be scaled to 155x23 pixels.
   #custom_logo_url: 'http://www.puppetlabs.com/images/puppet-short.png'
   
   # A future version will deprecate the use of
   # "http://consoleserver.domain.com/reports" as the puppet master's reporturl.
   # Set this to 'true' once you have changed all your puppet masters to send
   # reports to "http://consoleserver.domain.com/reports/upload"
   disable_legacy_report_upload_url: false
   
   # Disables the UI and controller actions for editing nodes, classes, groups and reports.  Report submission is still allowed
   enable_read_only_mode: false
   
   # Time (24-hour) at which a new day begins for compliance reports.
   baseline_day_end: 2100
   
   #===[ fin ]=============================================================

** cp -a /etc/puppetlabs/puppet-dashboard/settings.yml /etc/puppetlabs/puppet-dashboard/settings.yml.20120705T150323.bak
** /opt/puppet/bin/erb -T - './erb/console_auth_db_config.yml.erb' > '/etc/puppetlabs/console-auth/database.yml'
** chmod 440 /etc/puppetlabs/console-auth/database.yml
** chown pe-auth:puppet-dashboard /etc/puppetlabs/console-auth/database.yml
** /opt/puppet/bin/erb -T - './erb/console_auth_config.yml.erb' > '/etc/puppetlabs/console-auth/config.yml'
** chmod 600 /etc/puppetlabs/console-auth/config.yml
** chown pe-auth:pe-auth /etc/puppetlabs/console-auth/config.yml
** /opt/puppet/bin/erb -T - './erb/rubycas_config.yml.erb' > '/etc/puppetlabs/rubycas-server/config.yml'
** chmod 600 /etc/puppetlabs/rubycas-server/config.yml
** chown pe-auth:pe-auth /etc/puppetlabs/rubycas-server/config.yml
** /opt/puppet/bin/erb -T - './erb/cas_client_config.yml.erb' > '/etc/puppetlabs/console-auth/cas_client_config.yml'
** chmod 640 '/etc/puppetlabs/console-auth/cas_client_config.yml'
** chown pe-auth:puppet-dashboard /etc/puppetlabs/console-auth/cas_client_config.yml
** mkdir -p /var/log/pe-console-auth
** touch /var/log/pe-console-auth/cas.log
** touch /var/log/pe-console-auth/auth.log
** chmod 770 /var/log/pe-console-auth
** chmod 660 /var/log/pe-console-auth/auth.log
** touch /var/log/pe-console-auth/cas_client.log
** chmod 660 /var/log/pe-console-auth/cas_client.log
** chown -R pe-auth:puppet-dashboard /var/log/pe-console-auth
** chown puppet-dashboard:puppet-dashboard /opt/puppet/share/live-management/config.ru
** chown pe-auth:pe-auth /opt/puppet/share/console-auth/config.ru
** chown pe-auth:pe-auth /opt/puppet/share/rubycas-server/config.ru
** service pe-httpd start
 * Starting web server pe-httpd                                                                                                                                                                                                               install: invalid user `www-data'
pe-httpd: bad user name www-data
Action 'start' failed.
The Apache error log may have more information.
                                                                                                                                                                                                                                       [fail]

==============================================================================================================================================================================================================================================

!! ERROR: Cancelling installation

When I try to start the service manually I get this:

root@:/opt/puppet/bin# ./puppet -V
2.7.12 (Puppet Enterprise 2.5.1)
root@pal-lnx-dev1:/opt/puppet/bin# /etc/init.d/pe-httpd start
 * Starting web server pe-httpd                                                                                                                                                                                                               install: invalid user `www-data'
pe-httpd: bad user name www-data
Action 'start' failed.
The Apache error log may have more information.

The default apache user on my system is apache instead of www-data

History

#1 Updated by Matthaus Owens almost 2 years ago

  • Status changed from Unreviewed to Accepted
  • Assignee set to Will Hopper

The correct solution here is to add the pe-apache user/group and make sure that pe-httpd uses that user and group in its configs. That way we don’t stomp on system users and guarantee that the user exists for PE.

#2 Updated by Eric Hayes almost 2 years ago

I get a similar error when installing puppet-dashboard

$ sudo apt-get update
$ sudo apt-get install puppet-dashboard
...
Unpacking libdbd-mysql-ruby (from .../libdbd-mysql-ruby_0.4.4-1_all.deb) ...
Selecting previously deselected package libhttpclient-ruby1.8.
Unpacking libhttpclient-ruby1.8 (from .../libhttpclient-ruby1.8_2.1.5.2-2_all.deb) ...
Selecting previously deselected package puppet-dashboard.
Unpacking puppet-dashboard (from .../puppet-dashboard_1.2.9-1puppetlabs1_all.deb) ...
Processing triggers for ureadahead ...
Setting up libdeprecated-ruby1.8 (2.0.1-2) ...
Setting up libdbi-ruby1.8 (0.4.3-2) ...
Setting up libdbd-mysql-ruby1.8 (0.4.4-1) ...
Setting up libdbd-mysql-ruby (0.4.4-1) ...
Setting up libhttpclient-ruby1.8 (2.1.5.2-2) ...
Setting up puppet-dashboard (1.2.9-1puppetlabs1) ...
chown: invalid user: `www-data:www-data'
dpkg: error processing puppet-dashboard (--configure):
 subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

#3 Updated by Will Hopper almost 2 years ago

  • Status changed from Accepted to In Topic Branch Pending Review

#4 Updated by Will Hopper almost 2 years ago

Pull requests updated to handle the stopping of the pe-httpd service for both package removal and upgrade.

#5 Updated by Will Hopper over 1 year ago

  • Assignee changed from Will Hopper to Moses Mendoza

#6 Updated by Nigel Kersten over 1 year ago

Did this get merged?

#7 Updated by Matthaus Owens over 1 year ago

  • Target version changed from PE 2.5.x to PE 2.7.0

This seemed like to large a change for a bugfix release, so it is not merged yet. It will get reviewed this week.

#8 Updated by Matthaus Owens over 1 year ago

  • Target version changed from PE 2.7.0 to PE 2.x

#9 Updated by Matthaus Owens 11 months ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version changed from PE 2.x to PE Lance

Also available in: Atom PDF