| Puppet Version: 6.7 Puppet Server Version: 6.5 puppetserver-6.5.0-1.el7.noarch OS Name/Version: rhel 7 [root@ ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.6 (Maipo) [root@ ~]# uname -r 3.10.0-957.27.2.el7.x86_64 [root@ ~]# Describe your issue in as much detail as possible… Internally developed function uses net-ldap gem to query ldap. Code works on puppetserver5 and on ruby test script outside of jruby, but fails when pointed at a puppetserver6 compiler.
- puppetserver gem list net-ldap
net-ldap (0.16.1) Error on client is: Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, (file: ...../modules/user/manifests/test.pp, line: 2, column: 8) on node orcutt-dev.ccs.ornl.gov Describe steps to reproduce…
- puppetserver v6
- puppetserver gem install net-ldap
- assign class to call following test function:
require 'net/ldap' Puppet::Functions.create_function(:ldaptest) do dispatch :ldaptest do end def ldaptest() user = 'test1 ldap_server = 'ldap.example.com' ldap_base = 'ou=moderate,dc=foo,dc=bar,dc=com' u_ldap_base = "ou=People,#{ldap_base}" u_ldap_filter = "(uid=#{user})" ldap = Net::LDAP.new( { :host => ldap_server, :port => 389, :encryption => :start_tls, :connect_timeout => 2, } ) x = ldap.search( :base => u_ldap_base, :filter => u_ldap_filter ) return "LDAP:<#{x}>" end end run puppet agent on client Desired Behavior: Actual Behavior: [root@]# puppet agent -t -E env1 --server puppetserver1 Info: Using configured environment 'env1' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Retrieving locales Info: Loading facts Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, (file: ..../modules/user/manifests/test.pp, line: 2, column: 8) on node xxx Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run [root@]# Huge stack dump in puppetserver.log. If unable to reproduce with these instructions can arrange more log information. |