Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not start Service[gunicorn] #83

Closed
cevaris opened this issue Apr 29, 2014 · 2 comments
Closed

Could not start Service[gunicorn] #83

cevaris opened this issue Apr 29, 2014 · 2 comments

Comments

@cevaris
Copy link

cevaris commented Apr 29, 2014

Getting an gunicorn error with the following puppet script. Using Precise Ubuntu 12.04 LTS with via vagrant.

class { 'python':
  version    => 'system',
  pip => true,
  virtualenv => true,
  gunicorn   => true,
}

Here is the verbose log output.

bcapa55-208-dhcp:puppet-techstack cevaris$ vagrant provision
==> alpha: Installing Puppet modules with Librarian-Puppet...
==> alpha: Running provisioner: puppet...
Running Puppet with web.pp...
stdin: is not a tty
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/concat/lib/facter/concat_basedir.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/firewall/lib/facter/ip6tables_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/firewall/lib/facter/iptables_persistent_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/firewall/lib/facter/iptables_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/python/lib/facter/pip_version.rb
debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does not exist
debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does not exist
debug: Puppet::Type::Package::ProviderAptrpm: file rpm does not exist
debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info does not exist
debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist
debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist
debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does not exist
debug: Puppet::Type::Package::ProviderSun: file /usr/bin/pkginfo does not exist
debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox does not exist
debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
debug: Puppet::Type::Package::ProviderYum: file yum does not exist
debug: Puppet::Type::Package::ProviderPorts: file /usr/local/sbin/pkg_deinstall does not exist
debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not exist
debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
debug: Puppet::Type::Package::ProviderPortupgrade: file /usr/local/sbin/pkg_deinstall does not exist
debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
debug: Puppet::Type::Package::ProviderPacman: file /usr/bin/pacman does not exist
debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not exist
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/python/lib/facter/python_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/python/lib/facter/virtualenv_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/stdlib/lib/facter/facter_dot_d.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/stdlib/lib/facter/pe_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/stdlib/lib/facter/puppet_vardir.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/stdlib/lib/facter/root_home.rb
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n python'
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/init.pp' in environment production
debug: Automatically imported python from python into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/install.pp' in environment production
debug: Automatically imported python::install from python/install into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/config.pp' in environment production
debug: Automatically imported python::config from python/config into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/pip.pp' in environment production
debug: Automatically imported python::pip from python/pip into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/requirements.pp' in environment production
debug: Automatically imported python::requirements from python/requirements into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/virtualenv.pp' in environment production
debug: Automatically imported python::virtualenv from python/virtualenv into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/gunicorn.pp' in environment production
debug: Automatically imported python::gunicorn from python/gunicorn into production
debug: Adding relationship from Class[Python::Install] to Class[Python::Config] with 'before'
debug: Puppet::Type::Service::ProviderSystemd: file /bin/systemctl does not exist
debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not exist
debug: Puppet::Type::Service::ProviderRedhat: file /sbin/chkconfig does not exist
debug: Puppet::Type::Service::ProviderOpenrc: file /sbin/rc-service does not exist
debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not exist
debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not exist
debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist
debug: Creating default schedules
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Failed to load library 'shadow' for feature 'libshadow'
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/run]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/log]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet]
debug: Finishing transaction 70026358272520
debug: Loaded state in 0.00 seconds
debug: Loaded state in 0.00 seconds
info: Applying configuration version '1398793070'
debug: /Stage[main]/Python::Install/before: requires Class[Python::Config]
debug: /Schedule[daily]: Skipping device resources because running on a host
debug: /Schedule[monthly]: Skipping device resources because running on a host
debug: /Schedule[hourly]: Skipping device resources because running on a host
debug: /Schedule[never]: Skipping device resources because running on a host
debug: /Schedule[weekly]: Skipping device resources because running on a host
debug: Prefetching apt resources for package
debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n''
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n''
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n python-dev'
debug: Service[gunicorn](provider=upstart): Could not find gunicorn.conf in /etc/init
debug: Service[gunicorn](provider=upstart): Could not find gunicorn.conf in /etc/init.d
debug: Service[gunicorn](provider=upstart): Could not find gunicorn in /etc/init
debug: Service[gunicorn](provider=upstart): Executing 'ps -ef'
debug: Service[gunicorn](provider=upstart): Executing '/etc/init.d/gunicorn start'
err: /Stage[main]/Python::Config/Service[gunicorn]/ensure: change from stopped to running failed: Could not start Service[gunicorn]: Execution of '/etc/init.d/gunicorn start' returned 1:  at /tmp/vagrant-puppet-2/modules-0/python/manifests/config.pp:36
debug: /Schedule[puppet]: Skipping device resources because running on a host
debug: Finishing transaction 70026357405600
debug: Storing state
debug: Stored state in 0.01 seconds
notice: Finished catalog run in 0.34 seconds
debug: Finishing transaction 70026358894500
debug: Received report to process from alpha.int.colorado.edu
debug: Processing report from alpha.int.colorado.edu with processor Puppet::Reports::Store
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

puppet apply --verbose --debug --modulepath '/tmp/vagrant-puppet-2/modules-0:/etc/puppet/modules' --manifestdir /tmp/vagrant-puppet-2/manifests --detailed-exitcodes /tmp/vagrant-puppet-2/manifests/web.pp || [ $? -eq 2 ]

Stdout from the command:

info: Loading facts in /tmp/vagrant-puppet-2/modules-0/concat/lib/facter/concat_basedir.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/firewall/lib/facter/ip6tables_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/firewall/lib/facter/iptables_persistent_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/firewall/lib/facter/iptables_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/python/lib/facter/pip_version.rb
debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does not exist
debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does not exist
debug: Puppet::Type::Package::ProviderAptrpm: file rpm does not exist
debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info does not exist
debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist
debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist
debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does not exist
debug: Puppet::Type::Package::ProviderSun: file /usr/bin/pkginfo does not exist
debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox does not exist
debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
debug: Puppet::Type::Package::ProviderYum: file yum does not exist
debug: Puppet::Type::Package::ProviderPorts: file /usr/local/sbin/pkg_deinstall does not exist
debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not exist
debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
debug: Puppet::Type::Package::ProviderPortupgrade: file /usr/local/sbin/pkg_deinstall does not exist
debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
debug: Puppet::Type::Package::ProviderPacman: file /usr/bin/pacman does not exist
debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not exist
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/python/lib/facter/python_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/python/lib/facter/virtualenv_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/stdlib/lib/facter/facter_dot_d.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/stdlib/lib/facter/pe_version.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/stdlib/lib/facter/puppet_vardir.rb
info: Loading facts in /tmp/vagrant-puppet-2/modules-0/stdlib/lib/facter/root_home.rb
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n python'
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/init.pp' in environment production
debug: Automatically imported python from python into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/install.pp' in environment production
debug: Automatically imported python::install from python/install into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/config.pp' in environment production
debug: Automatically imported python::config from python/config into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/pip.pp' in environment production
debug: Automatically imported python::pip from python/pip into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/requirements.pp' in environment production
debug: Automatically imported python::requirements from python/requirements into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/virtualenv.pp' in environment production
debug: Automatically imported python::virtualenv from python/virtualenv into production
debug: importing '/tmp/vagrant-puppet-2/modules-0/python/manifests/gunicorn.pp' in environment production
debug: Automatically imported python::gunicorn from python/gunicorn into production
debug: Adding relationship from Class[Python::Install] to Class[Python::Config] with 'before'
debug: Puppet::Type::Service::ProviderSystemd: file /bin/systemctl does not exist
debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not exist
debug: Puppet::Type::Service::ProviderRedhat: file /sbin/chkconfig does not exist
debug: Puppet::Type::Service::ProviderOpenrc: file /sbin/rc-service does not exist
debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not exist
debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not exist
debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist
debug: Creating default schedules
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Failed to load library 'shadow' for feature 'libshadow'
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/run]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/log]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet]
debug: Finishing transaction 70026358272520
debug: Loaded state in 0.00 seconds
debug: Loaded state in 0.00 seconds
info: Applying configuration version '1398793070'
debug: /Stage[main]/Python::Install/before: requires Class[Python::Config]
debug: /Schedule[daily]: Skipping device resources because running on a host
debug: /Schedule[monthly]: Skipping device resources because running on a host
debug: /Schedule[hourly]: Skipping device resources because running on a host
debug: /Schedule[never]: Skipping device resources because running on a host
debug: /Schedule[weekly]: Skipping device resources because running on a host
debug: Prefetching apt resources for package
debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n''
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n''
debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n python-dev'
debug: Service[gunicorn](provider=upstart): Could not find gunicorn.conf in /etc/init
debug: Service[gunicorn](provider=upstart): Could not find gunicorn.conf in /etc/init.d
debug: Service[gunicorn](provider=upstart): Could not find gunicorn in /etc/init
debug: Service[gunicorn](provider=upstart): Executing 'ps -ef'
debug: Service[gunicorn](provider=upstart): Executing '/etc/init.d/gunicorn start'
err: /Stage[main]/Python::Config/Service[gunicorn]/ensure: change from stopped to running failed: Could not start Service[gunicorn]: Execution of '/etc/init.d/gunicorn start' returned 1:  at /tmp/vagrant-puppet-2/modules-0/python/manifests/config.pp:36
debug: /Schedule[puppet]: Skipping device resources because running on a host
debug: Finishing transaction 70026357405600
debug: Storing state
debug: Stored state in 0.01 seconds
notice: Finished catalog run in 0.34 seconds
debug: Finishing transaction 70026358894500
debug: Received report to process from alpha.int.colorado.edu
debug: Processing report from alpha.int.colorado.edu with processor Puppet::Reports::Store


Stderr from the command:

stdin: is not a tty

bcapa55-208-dhcp:puppet-techstack cevaris$ 
@cevaris
Copy link
Author

cevaris commented Apr 29, 2014

Fixed...had to update the apt repo first.

exec { 'apt-update':
  command => 'apt-get update',
  path    => '/usr/bin'
}

class { 'python':
  version    => 'system',
  pip => true,
  virtualenv => true,
  gunicorn   => true,
}

@igalic
Copy link
Contributor

igalic commented Aug 11, 2014

usually you'd use apt::update, but it's not documented, MODULES-1259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants