Project

General

Profile

Actions

Support #21494

closed

Foreman 1.9.3 with Puppet5

Added by jaimin patel over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Puppet integration
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi Support team,

i have been reading lot of about Foreman and puppet integration but i couldn't able to figure out successful install/configuration Foreman 1.9.3 with puppet5.

foreman-installer support puppet4 and i want to use puppet5 in our environment so i installed using rpm method and after many dependency resolve i installed foreman.

now it's up and running.

but i have issue with fetching node definition while running puppet agent -t

puppet agent -t
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 500 on SERVER: Server Error: Failed to find usprdlpup01.domain.com via exec: Execution of '/etc/puppetlabs/puppet/node.rb usprdlpup01.domain.com' returned 1:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node usprdlpup01.domain.com: Failed to find usprdlpup01.domain.com via exec: Execution of '/etc/puppetlabs/puppet/node.rb usprdlpup01.domain.com' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

/etc/puppetlabs/puppet/node.rb usprdlpup01.domain.com
During the fact upload the server responded with: 404 Not Found. Error is ignored and the execution continues.
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.12.1</center>
</body>
</html>
Error retrieving node usprdlpup01.domain.com: Net::HTTPNotFound
Check Foreman's /var/log/foreman/production.log for more information.

this look like issue with foreman.conf in ngninx, i have been following guidline from foreman with nginx and i have same config except passenger_set_cgi_param doesnt work for me

cat /etc/nginx/conf.d/foreman.conf
server {
listen 443;
ssl on;
ssl_certificate /etc/puppetlabs/puppet/ssl/certs/usprdlpup01.domain.com.pem;
ssl_certificate_key /etc/puppetlabs/puppet/ssl/private_keys/usprdlpup01.domain.com.pem;
server_name usprdlpup01.domain.com;
passenger_enabled on;
access_log /var/log/nginx/foreman_access.log;
error_log /var/log/nginx/foreman_error.log debug;
root /usr/share/foreman/public;
passenger_sticky_sessions on; # Verify puppetmaster clients against Puppet CA
ssl_crl /etc/puppetlabs/puppet/ssl/ca/ca_crl.pem;
ssl_client_certificate /etc/puppetlabs/puppet/ssl/certs/ca.pem;
ssl_verify_client optional;
ssl_verify_depth 1; #
#passenger_set_cgi_param HTTPS on;
#passenger_set_cgi_param SSL_CLIENT_S_DN $ssl_client_s_dn;
#passenger_set_cgi_param SSL_CLIENT_VERIFY $ssl_client_verify;
}

i get following errors while running node.rb in nginx foreman_error.log

2017/10/27 11:54:53 [debug] 10417#0: *15 verify:1, error:0, depth:1, subject:"/CN=Puppet CA: usprdlpup01.domain.com", issuer:"/CN=Puppet CA: usprdlpup01.domain.com"
2017/10/27 11:54:53 [debug] 10417#0: *15 verify:1, error:0, depth:0, subject:"/CN=usprdlpup01.domain.com", issuer:"/CN=Puppet CA: usprdlpup01.domain.com"
2017/10/27 11:54:53 [error] 10417#0: *15 open() "/usr/share/foreman/public/foreman/node/usprdlpup01.domain.com" failed (2: No such file or directory), client: 172.16.234.10, server: usprdlpup01.domain.com, request: "GET /foreman/node/usprdlpup01.domain.com?format=yml HTTP/1.1", host: "usprdlpup01.domain.com"
2017/10/27 11:54:53 [debug] 10417#0: *15 http finalize request: 404, "/foreman/node/usprdlpup01.domain.com?format=yml" a:1, c:1
2017/10/27 11:54:53 [debug] 10417#0: *15 http special response: 404, "/foreman/node/usprdlpup01.domain.com?format=yml"

i may be doing something wrong here but looking for guideline to make it work smoothly.

appreciate your help in advance.

Jaiin

Actions #1

Updated by Anonymous over 6 years ago

Puppet 4.x support starts with 1.12, Puppet 5 will be supported by 1.16.

1.9.3 is way too old and completely unsupported by now.

Actions #2

Updated by jaimin patel over 6 years ago

Thanks Michael, i will try with latest version. hopefully that will resolve issue.

Actions #3

Updated by Ivan Necas over 6 years ago

  • Project changed from Foreman Maintain to Foreman
  • Category changed from Procedure to Puppet integration
  • Status changed from New to Resolved

Moving under the foreman project and based on previous comments, marking as resolved for now.

Actions

Also available in: Atom PDF