Ask Your Question
0

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '}'

asked 2015-04-03 12:01:02 -0500

ravi831 gravatar image

editing my init.pp to add a line to add an error directive for apache. here is my init.pp

class appsapproxy {

ideainfapachehttpd_instance { 'sapProxy':

virtualHosts => {

  'hcmstage.teamcomcast.com:444' =>  {
      proxyPass       =>  [ { path =>  '/', destination =>  'https://hcmstage.g.cable.comcast.com/' } ],
      ssl             =>  'puppet:///modules/app_sap_proxy/hcmstage.teamcomcast.com-444.pem',
      error_document  =>  [ { 'error_code' => '502', 'This is a test'} ],
  },

  'gateway-stg.teamcomcast.com:8447' =>  {
      proxyPass  => [ { path =>  '/',  destination =>  'https://gateway-stg.teamcomcast.com/' } ],
      ssl        => 'puppet:///modules/app_sap_proxy/gateway-stg.teamcomcast.com-8447.pem',
  },

  'hcmstage3.teamcomcast.com:8445' =>  {
      proxyPass => [ { path => '/', destination => 'https://hcmstage3.teamcomcast.com/' } ],
      ssl       => 'puppet:///modules/app_sap_proxy/hcmstage3.teamcomcast.com-8445.pem',
  },

  'edemodev.cable.comcast.com:8500' =>  {
      proxyPass => [ { path => '/', destination => 'https://edemodev.cable.comcast.com/' } ],
      ssl       => 'puppet:///modules/app_sap_proxy/edemodev.cable.comcast.com-8500.pem',
  },

  'hcmstagetm.teamcomcast.com:8446' =>  {
      proxyPass => [ { path => '/', destination => 'https://hcmstage.teamcomcast.com/' } ],
      ssl       => 'puppet:///modules/app_sap_proxy/hcmstagetm.teamcomcast.com-8446.pem',
  },
},

} }

The error i get is this: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '}'; expected ']' at /app/copa/puppet/conf/environments/netoerpsapstaging/modules/appsap_proxy/manifests/init.pp:10 on node <hostname> Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

if i remove line 10 i can run my alacart command on the apache server w/ no errors. been pulling my hair out for 2 days. thinking it could be a puppetmaster issue. errordocument => [ { 'errorcode' => '502', 'This is a test'} ],

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-04-03 14:29:45 -0500

lavaman gravatar image

I assume you are using puppetlabs-apache? If so, I believe what you need is:

error_documents  =>  [ { 'error_code' => '502', 'document' => 'This is a test'} ],

The parse error is because it's expecting an array of hashes and you can't have just a string in there. It needs a key in front.

edit flag offensive delete link more

Comments

OK, so I tried that, this is what i'm getting. Think its the same thing... Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter error_documents on node <hostname> Warning: Not using cache on failed catalog Error: Could not retrieve catalog

ravi831 gravatar imageravi831 ( 2015-04-03 15:07:20 -0500 )edit

I dont have an actual document I'm pointing to, rather, just want to display text so didn't think I needed the 'document' =>

ravi831 gravatar imageravi831 ( 2015-04-03 15:08:33 -0500 )edit
lavaman gravatar imagelavaman ( 2015-04-03 16:53:48 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2015-04-03 12:01:02 -0500

Seen: 855 times

Last updated: Apr 03 '15