[SERVER-1998] Bundled ruby throws error on net/http usage with vault gem Created: 2017/10/04  Updated: 2018/04/17  Resolved: 2018/02/20

Status: Closed
Project: Puppet Server
Component/s: Puppet Server
Affects Version/s: SERVER 2.8.0
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Stefan Koop Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: server-ruby-193-compat-issues
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relates to SERVER-1630 Support user configuration of JRuby 1... Closed
relates to ENTERPRISE-1164 Not possible to configure jruby_jar s... Closed
relates to SERVER-2191 Change default JRUBY_JAR to 9k Closed
Method Found: Needs Assessment
QA Risk Assessment: Needs Assessment


OS: Ubuntu 16.04 LTS 64 Bit
Puppet Source: apt.puppetlabs.com (PC1)

puppetserver gem list

*** LOCAL GEMS ***
deep_merge (1.1.1)
fast_gettext (1.1.0)
gettext (3.2.2)
gettext-setup (0.26)
hocon (1.1.3)
jar-dependencies (0.2.6)
jruby-openssl (0.9.16 java)
json (1.8.0 java)
locale (2.1.2)
puppet-strings (1.1.0)
rake (10.1.0)
rdoc (4.1.2)
rgen (0.8.2)
semantic_puppet (0.1.3)
text (1.3.1)
vault (0.10.1)
yard (0.9.9)

Error Output:

2017-10-04 15:56:40,932 ERROR [qtp266666617-77] [puppetserver] Puppet Server Error: Evaluation Error: Error while evaluating a Function Call, undefined method `keep_alive_timeout=' for #<Net::HTTP xxx.xxx:9999 open=true> at /etc/puppetlabs/code/environments/development/manifests/site.pp:2:1 on node xxx

Sample Code Snippet:

  require 'net/http'
  require 'json'
  require 'vault'
  vault = Vault::Client.new
  vault.configure do |config|
    config.address = "https://xxx.xxx:9999"
    config.token = "xxx"
    config.ssl_verify = false
    config.ssl_ciphers = "DEFAULT"
    config.timeout = 30
    config.ssl_timeout  = 5
    config.open_timeout = 5
    config.read_timeout = 30

Comment by Charlie Sharpsteen [ 2017/10/04 ]

Puppet Server 2.x uses JRuby 1.7 which implements Ruby 1.9.3 compatibility. The issue is likely that the 1.9.3 version of Net::HTTP didn't support keep_alive_timeout:


Using Puppet Server 5.x and enabling JRuby 9k might work:


Comment by Moses Mendoza [ 2017/10/09 ]

Hi Stefan Koop, is Charlie Sharpsteen's suggestion viable for you at the moment?

Comment by Stefan Koop [ 2017/10/09 ]

So far we had no time to test the new version of puppetserver 5.x to play with an older 4.x agent version(s).
This is planned during this week.

Comment by Maggie Dreyer [ 2018/02/20 ]

Since this ticket has been inactive for a while, I'm guessing you were able to find a way forward. Please reopen and comment if this was not the case.

Generated at Fri Aug 07 07:57:37 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.