hiera.yaml and connection refused strange error [closed]

asked 2017-01-26 14:21:13 -0500

I am setting up a new master in RHEL 7. I am facing a strange error, wherein, the sudo puppet agent -t in the puppet server (it runs puppet agent as production environment) returns the following error when i execute it with a valid /etc/puppetlabs/code/hiera.yaml file. If i remove that file and restart puppet server and try sudo puppet agent -t the run works without any issues. Any idea why having the /etc/puppetlabs/code/hiera.yaml file causes issues?

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Internal Server Error: org.jruby.exceptions.RaiseException: (Exception) Connection refused - Connection refused

My /etc/puppetlabs/code/hiera.yaml looks like this:

I use puppet/hiera to manage it.

managed by puppet

- eyaml
- consul
- yaml

:logger: console

  - secure
  - common

:datadir: "/etc/puppetlabs/code/hieradata"
:pkcs7_private_key: "/etc/puppetlabs/puppet/keys/private_key.pkcs7.pem"
:pkcs7_public_key: "/etc/puppetlabs/puppet/keys/public_key.pkcs7.pem"

:port: '8500'
  - "/v1/catalog/service"
  - "/v1/catalog/node"
  - "/v1/kv/application/%{deploy_path}"

  :datadir: "/etc/puppetlabs/code/environments/%{::environment}/hieradata"
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Redsmile
close date 2017-01-31 15:56:17.623245


is consul actually running and accepting connections, and do you have the hiera-consul backend correctly defined/installed into the puppetserver gem set? `puppetserver gem list` to see if it's there

DarylW gravatar imageDarylW ( 2017-01-27 07:10:14 -0500 )edit

Thank you for looking! That was it. Another module took the consul off the catalog and it was failing because of that. the moment Consul was brought back in, hiera stopped complaining. Please add it as an answer, i will accept it.

Redsmile gravatar imageRedsmile ( 2017-01-30 16:04:15 -0500 )edit