[SERVER-2317] puppetserver ca fails with a traceback when the service is not running Created: 2018/09/19  Updated: 2018/12/19  Resolved: 2018/12/13

Status: Closed
Project: Puppet Server
Component/s: CLI
Affects Version/s: None
Fix Version/s: SERVER 6.1.0

Type: Improvement Priority: Normal
Reporter: Thomas Kishel Assignee: Justin Stoller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance Criteria:

The puppetserver ca command fails gracefully/prescriptively when the puppetserver service is not running.

Team: Server
Release Notes: Enhancement
Release Notes Summary: The `puppetserver ca` command will now error gracefully on connection issues and return helpful debugging information.
QA Risk Assessment: Needs Assessment

 Description   

The puppetserver ca command fails with a traceback when the puppetserver service is not running:

[root@pe-20190nightly-master ~]# puppetserver ca list --all
Traceback (most recent call last):
	14: from /opt/puppetlabs/server/apps/puppetserver/cli/apps/ca:5:in `<main>'
	13: from /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/puppetserver-ca-1.0.0/lib/puppetserver/ca/cli.rb:89:in `run'
	12: from /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/puppetserver-ca-1.0.0/lib/puppetserver/ca/action/list.rb:60:in `run'
	11: from /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/puppetserver-ca-1.0.0/lib/puppetserver/ca/action/list.rb:113:in `get_all_certs'
	10: from /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/puppetserver-ca-1.0.0/lib/puppetserver/ca/certificate_authority.rb:215:in `get_certificate_statuses'
	 9: from /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/puppetserver-ca-1.0.0/lib/puppetserver/ca/certificate_authority.rb:253:in `get'
	 8: from /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/puppetserver-ca-1.0.0/lib/puppetserver/ca/utils/http_client.rb:41:in `with_connection'
	 7: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:609:in `start'
	 6: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:909:in `start'
	 5: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
	 4: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:935:in `connect'
	 3: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
	 2: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
	 1: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:936:in `block in connect'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:939:in `rescue in block in connect': Failed to open TCP connection to pe-20190nightly-master.puppetdebug.vlan:8140 (Connection refused - connect(2) for "pe-20190nightly-master.puppetdebug.vlan" port 8140) (Errno::ECONNREFUSED)

 


Generated at Wed Jul 17 05:29:39 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.