Update:
It looks like the culprit is the external node classifier: This
is the error from the server:
err: Could not find node '
client.dev.domain.com'; cannot compile
err: Failed to find
client.dev.domain.com via exec: Execution of '/etc/
puppet/external_node.rb
client.dev.domain.com' returned 1: /usr/lib/
ruby/1.8/net/http.rb:2022:in `read_status_line': wrong status line: "<!
DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN
\">" (Net::HTTPBadResponse)
from /usr/lib/ruby/1.8/net/http.rb:2009:in `read_new'
from /usr/lib/ruby/1.8/net/http.rb:1050:in `request'
from /etc/puppet/external_node.rb:14
from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
from /usr/lib/ruby/1.8/net/http.rb:440:in `start'
from /etc/puppet/external_node.rb:13
err: Could not find node '
client.dev.domain.com'; cannot compile
This is the Node Classifier:
#!/bin/ruby
# a simple script which fetches external nodes from Foreman
# you can basically use anything that knows how to get http data, e.g.
wget/curl etc.
# Foreman url
foreman_url="
http://server:443"
require 'net/http'
foreman_url += "/node/#{ARGV[0]}?format=yml"
url = URI.parse(foreman_url)
req = Net::HTTP::Get.new(foreman_url)
res = Net::HTTP.start(url.host, url.port) { |http|
http.request(req)
}
case res
when Net::HTTPOK
puts res.body
else
$stderr.puts "Error retrieving node %s: %s" % [ARGV[0], res.class]
What node classifier do you guys use with Apache/Passenger config?
Thanks,
On Jul 27, 11:13 am, CraftyTech <
hmmed...@gmail.com> wrote:
> So this is where I'm at now:
>
> Step 3)
> From Server:
> RAILS_ENV=production rake db:migrate; RAILS_ENV=production rake
> puppet:import:hosts_and_facts; rake puppet:import:puppet_classes --
> trace RAILS_ENV=production
>
> from client's command line:
> Step 2)
> curl -khttps://server/node/
client.dev.domain.com?format=yml
> ---
> parameters:
> puppetmaster: puppet
> domainname:
dev.domain.com
> classes:
> - basic
> environment: production
>
> Step 3)
>
> puppetd -t
> notice: Ignoring --listen on onetime run
> err: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Could not find node '
client.dev.domain.com'; cannot compile
> warning: Not using cache on failed catalog
> err: Could not retrieve catalog; skipping run
>
> The crazy thing is that with webrick, I just point the node classifier
> to server:port and it works just fine. The issue is the passenger/
> apache config, which yields a result when queried via curl command..
> so I'm at a lost here... can anyone think of a way to trace the apache/
> passenger interaction to see where it dies out? right now I have the
> foreman_url pointed to "
https://server" ( I also triedhttps://server:443
> andhttp://server:443).