I'm using puppetmaster with mongrel/apache.
I had a syntax error in a manifest and got this error:
err: Could not retrieve catalog from remote server: Error 502 on SERVER: Proxy Error
Further, when I fixed the syntax error, it doesn't always work first run, eg:
Syntax OK:
[root@a001 puppet]# puppetd --test info: Caching catalog for a001.private.statcounter.com info: Applying configuration version '1249597134' notice: Finished catalog run in 1.12 seconds
Introduce an error:
[root@a001 puppet]# vi /etc/puppet/modules/core/manifests/firewall.pp [root@a001 puppet]# puppetd --test err: Could not retrieve catalog from remote server: Error 502 on SERVER: Proxy Error notice: Using cached catalog info: Applying configuration version '1249597134' notice: Finished catalog run in 1.15 seconds
Fix the error and retry. Notice the configuration version is the old one for the first two tries.
[root@a001 puppet]# vi /etc/puppet/modules/core/manifests/firewall.pp [root@a001 puppet]# puppetd --test err: Could not retrieve catalog from remote server: Error 502 on SERVER: Proxy Error notice: Using cached catalog info: Applying configuration version '1249597134' notice: Finished catalog run in 1.26 seconds [root@a001 puppet]# puppetd --test err: Could not retrieve catalog from remote server: Error 502 on SERVER: Proxy Error notice: Using cached catalog info: Applying configuration version '1249597134' notice: Finished catalog run in 1.14 seconds [root@a001 puppet]# puppetd --test info: Caching catalog for a001.private.statcounter.com info: Applying configuration version '1249597175' notice: Finished catalog run in 1.45 seconds
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account
Hi Robin - what was the syntax error?
The original one was using "if $foo = 'bar'" instead of "if $foo == 'bar'"
However, I simulated the same error by just typing "zzz" as the first line of the class. Or was it "xxx" - I forget ;)
R.
Thanks Robin!
Robin Bowes wrote:
I'm using puppetmaster with mongrel/apache.
I had a syntax error in a manifest and got this error:
err: Could not retrieve catalog from remote server: Error 502 on SERVER: Proxy Error
Further, when I fixed the syntax error, it doesn't always work first run, eg:
Syntax OK: [...]
Introduce an error: [...]
Fix the error and retry. Notice the configuration version is the old one for the first two tries. [...]
Can you provide your apache error log, just to see what kind of error it reports?
Brice,
I'm afraid I've had to drop back to 0.24.8 as I was having too many problems with 0.25 and I needed to deliver something.
I may move to 0.25 at some stage in the near future, but I'm sticking with 0.24.8 for now.
R.
Anyone have a simple mongrel setup in place they can use to test this?
It works fine with webrick, ftr.
I believe there are two things going on here:
From the information provided I've not been able to diagnose it further, nor have I been able to reproduce it.
Without any more information I'm going to close to bump this if it can't be reproduced. Robin?
I'm unlikely to get change to test 0.25 again in the near future so go ahead and close. I'll re-open/raise a new bug if/when I see the same thing again.
Closing, as James threatened.
I just ran across this on 0.25.4 due to a syntax error in a template file. I had failed to terminate a tag on an if statement. Luckily this bug existed, but looks like it has never been fixed. I should be able to reproduce this easily in a test environment.
root@puppet /etc/puppet# puppetd -t info: Retrieving plugin warning: Fact syncing is deprecated as of 0.25 -- use 'pluginsync' instead info: Retrieving fact info: Loading facts in hugepagesize info: Loading facts in hugepagesize info: Loading facts in hugepagesize info: Loading facts in hugepagesize err: Could not retrieve catalog from remote server: Error 502 on SERVER: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>502 Bad Gateway</title> </head><body> <h1>Bad Gateway</h1> <p>The proxy server received an invalid response from an upstream server.<br /> </p> <hr> <address>Apache/2.2.3 (Red Hat) Server at puppet.private Port 8140</address> </body></html>
root@puppet /etc/puppet/environments/production/modules/puppet/templates# erb -x -T '-' puppet.conf.erb | ruby -c
-:28: unknown regexp options - lb
-:29: unknown regexp options - lb
-:32: syntax error
<% if fqdn != "puppet.public"
^
-:32: syntax error
<% if fqdn != "puppet.public"
^
-:36: syntax error
apache error_log:
[Thu Mar 04 18:04:53 2010] [warn] proxy: bad HTTP/1.1 header returned by /production/catalog/puppet.public (GET)