Ask Your Question
0

Puppet can't apply; Error: wrong number of arguments (2 for 1)

asked 2016-03-28 23:11:49 -0500

sheshi gravatar image

updated 2016-03-29 01:48:25 -0500

We are running into this error while running our modules on the Puppet 4.3.2. The same module works fine on Puppet 3.7.4. Not sure what is Puppet complaining about? Any help is greatly appreciated.

Our puppet.conf is:

[main]
    # The Puppet log directory.
    # The default value is '$vardir/log'.
    logdir = /var/log/puppet

    # Where Puppet PID files are kept.
    # The default value is '$vardir/run'.
    rundir = /var/run/puppet

    # Where SSL certificates are kept.
    # The default value is '$confdir/ssl'.
    ssldir = $vardir/ssl

    parser = future

    plugsync = true
    trusted_node_data = true
    ordering = manifest
    data_binding_terminus = none

[agent]
    classfile = $vardir/classes.txt
    localconfig = $vardir/localconfig
    environment = development

Error:

2016-03-25 08:40:49 -0500 Puppet (debug): Caching environment 'production' (ttl = 0 sec)
2016-03-25 08:40:49 -0500 Puppet (err): wrong number of arguments (2 for 1) /usr/share/ruby/vendor_ruby/puppet/parser/compiler.rb:19:in `compile'
/usr/local/share/gems/gems/puppet-4.3.2/lib/puppet/indirector/catalog/compiler.rb:93:in `block (2 levels) in compile'
/usr/share/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
/usr/share/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/usr/local/share/gems/gems/puppet-4.3.2/lib/puppet/indirector/catalog/compiler.rb:91:in `block in compile'
/usr/share/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'
/usr/share/ruby/benchmark.rb:296:in `realtime'
/usr/share/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'
/usr/local/share/gems/gems/puppet-4.3.2/lib/puppet/indirector/catalog/compiler.rb:90:in `compile'
/usr/local/share/gems/gems/puppet-4.3.2/lib/puppet/indirector/catalog/compiler.rb:50:in `find'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
/usr/share/ruby/vendor_ruby/puppet/application/apply.rb:222:in `block in main'
/usr/share/ruby/vendor_ruby/puppet/context.rb:64:in `override'
/usr/share/ruby/vendor_ruby/puppet.rb:246:in `override'
/usr/share/ruby/vendor_ruby/puppet/application/apply.rb:198:in `main'
/usr/share/ruby/vendor_ruby/puppet/application/apply.rb:159:in `run_command'
/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in `block (2 levels) in run'
/usr/share/ruby/vendor_ruby/puppet/application.rb:507:in `plugin_hook'
/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in `block in run'
/usr/share/ruby/vendor_ruby/puppet/util.rb:496:in `exit_on_fail'
/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in `run'
/usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:146:in `run'
/usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:92:in `execute'
/usr/bin/puppet:8:in `<main>'
edit retag flag offensive close merge delete

Comments

Maybe try compiling for that node on the master using puppet master --compile <your_agent_fqdn> --debug. Can you get more information about where in the code it's failing?

Alex Harvey gravatar imageAlex Harvey ( 2016-04-04 09:41:51 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-03-31 14:45:44 -0500

I ran into a similar issue with the azure module recently and the cause turned out to be a dependent ruby gem that had been updated hours before I installed it. The solution there was to remove the gems and reinstall them pinned to a specific version but it's hard to tell from that error output exactly what it's trying to compile

In my instance I was running Puppet Enterprise on Ubuntu 14.04 so I did something like this /opt/puppetlabs/puppet/bin/gem install azure --version='~>0.7.0' --no-ri --no-rdoc

Hope that might be of some help

edit flag offensive delete link more
0

answered 2016-04-04 04:16:04 -0500

run2cmd gravatar image

Check which version Puppet4 is using. Puppet4 come in with it's own ruby, but it might use your local copy. Check which puppet use with ruby version

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-03-28 23:11:49 -0500

Seen: 228 times

Last updated: Mar 31 '16