[Puppet - Bug #2509] (Unreviewed) err: Could not retrieve catalog from remote server: Error 502 on SERVER: Proxy Error

109 views
Skip to first unread message

red...@reductivelabs.com

unread,
Aug 6, 2009, 6:28:06 PM8/6/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been reported by Robin Bowes.

Bug #2509: err: Could not retrieve catalog from remote server: Error 502 on SERVER: Proxy Error

  • Author: Robin Bowes
  • Status: Unreviewed
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version:
  • Complexity: Unknown
  • Affected version: 0.25.0rc1
  • Keywords:

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

red...@reductivelabs.com

unread,
Aug 6, 2009, 7:42:14 PM8/6/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been updated by James Turnbull.
  • Status changed from Unreviewed to Needs more information
  • Target version set to 0.25.0

Hi Robin - what was the syntax error?

  • Author: Robin Bowes
  • Status: Needs more information
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Aug 6, 2009, 7:56:40 PM8/6/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been updated by Robin Bowes.

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.

  • Author: Robin Bowes
  • Status: Needs more information
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Aug 6, 2009, 7:57:50 PM8/6/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been updated by James Turnbull.
  • Status changed from Needs more information to Accepted

Thanks Robin!

  • Author: Robin Bowes
  • Status: Accepted
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Aug 7, 2009, 5:02:35 PM8/7/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been updated by Brice Figureau.

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?

  • Author: Robin Bowes
  • Status: Accepted
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Aug 8, 2009, 7:18:27 AM8/8/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been updated by Robin Bowes.

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.

  • Author: Robin Bowes
  • Status: Accepted
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Aug 10, 2009, 12:40:34 AM8/10/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been updated by Luke Kanies.

Anyone have a simple mongrel setup in place they can use to test this?

It works fine with webrick, ftr.

  • Author: Robin Bowes
  • Status: Accepted
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Aug 11, 2009, 10:14:20 PM8/11/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com, Mar...@reality.com
Issue #2509 has been updated by Markus Roberts.
  • Assigned to set to Markus Roberts
  • Author: Robin Bowes
  • Status: Accepted
  • Priority: Normal
  • Assigned to: Markus Roberts
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Aug 13, 2009, 6:05:49 PM8/13/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been updated by Markus Roberts.
  • Status changed from Accepted to Needs more information
  • Assigned to deleted (Markus Roberts)

I believe there are two things going on here:

  1. That the delay between the syntax error being fixed and the modified file being picked up (due to the normal file cache time out) is confusing the issue by making it appear that the error "hangs around" briefly after having been fixed; this is simply normal latency.
  2. That some configuration issue with the proxy is causing the error to be reported in a less than useful fashion.

From the information provided I've not been able to diagnose it further, nor have I been able to reproduce it.

  • Author: Robin Bowes
  • Status: Needs more information
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Aug 18, 2009, 7:39:09 AM8/18/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been updated by James Turnbull.

Without any more information I'm going to close to bump this if it can't be reproduced. Robin?

  • Author: Robin Bowes
  • Status: Needs more information
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Aug 18, 2009, 7:51:05 AM8/18/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been updated by Robin Bowes.

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.

  • Author: Robin Bowes
  • Status: Needs more information
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Aug 19, 2009, 1:08:13 PM8/19/09
to and...@reductivelabs.com, puppe...@googlegroups.com, robin-...@robinbowes.com
Issue #2509 has been updated by Luke Kanies.
  • Status changed from Needs more information to Closed

Closing, as James threatened.

  • Author: Robin Bowes
  • Status: Closed
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0

red...@reductivelabs.com

unread,
Mar 4, 2010, 6:20:09 PM3/4/10
to ja...@lovedthanlost.net, peter...@immerda.ch, r...@devco.net, robin-...@robinbowes.com, puppe...@googlegroups.com
Issue #2509 has been updated by Adam Stephens.
  • Affected version changed from 0.25.0rc1 to 0.25.4

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)

  • Author: Robin Bowes
  • Status: Closed
  • Priority: Normal
  • Assigned to:
  • Category: usability
  • Target version: 0.25.0
  • Affected version: 0.25.4
  • Keywords:
  • Branch:
Reply all
Reply to author
Forward
0 new messages