Ask Your Question

ActiveRecord undefined method `verify_active_connections!'

asked 2014-07-14 11:35:50 -0600

jcrawfordor gravatar image

updated 2014-07-16 11:45:06 -0600

When enabling Puppetdb on a previously running machine, clients stopped getting their catalogs with the following error;

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `verify_active_connections!' for ActiveRecord::Base:Class

This machine has Puppet 3.6.2, PuppetDB 2.1.0, and ActiveRecord 4.1.4. I believe these are all the most recent versions available for my platform. I think the problem is that the method has been removed, but I don't know if downgrading ActiveRecord is the right path to take --- and how much else will need to be downgraded.

(Updated to reflect that I updated Puppet and PuppetDB on client and server to the latest version)

Edit: Here is the puppet.conf:

logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $confdir/ssl
environmentpath = /etc/puppet/environments/

environment = production
storeconfigs = true
storeconfig_backend = puppetdb
reports = store,puppetdb

classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
report = true
show_diff = true
environment = production
server = <snip>

And running the puppetmaster with trace:

Error: Cached catalog for <snip> failed: undefined method `verify_active_connections!' for ActiveRecord::Base:Class
/usr/local/share/gems/gems/activerecord-4.1.4/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/usr/share/ruby/vendor_ruby/puppet/rails.rb:29:in `connect'
/usr/share/ruby/vendor_ruby/puppet/rails.rb:78:in `init'
/usr/share/ruby/vendor_ruby/puppet/indirector/active_record.rb:18:in `initialize'
/usr/share/ruby/vendor_ruby/puppet/indirector/catalog/active_record.rb:13:in `initialize'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:334:in `new'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:334:in `make_terminus'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:129:in `terminus'
/usr/share/ruby/vendor_ruby/puppet/indirector/store_configs.rb:6:in `initialize'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:334:in `new'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:334:in `make_terminus'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:129:in `terminus'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:48:in `cache'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:234:in `find_in_cache'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:193:in `find'
/usr/share/ruby/vendor_ruby/puppet/network/http/api/v1.rb:105:in `do_find'
/usr/share/ruby/vendor_ruby/puppet/network/http/api/v1.rb:50:in `block in call'
/usr/share/ruby/vendor_ruby/puppet/context.rb:64:in `override'
/usr/share/ruby/vendor_ruby/puppet.rb:234:in `override'
/usr/share/ruby/vendor_ruby/puppet/network/http/api/v1.rb:49:in `call'
/usr/share/ruby/vendor_ruby/puppet/network/http/route.rb:82:in `block in process'
/usr/share/ruby/vendor_ruby/puppet/network/http/route.rb:81:in `each'
/usr/share/ruby/vendor_ruby/puppet/network/http/route.rb:81:in `process'
/usr/share/ruby/vendor_ruby/puppet/network/http/handler.rb:63:in `block in process'
/usr/share/ruby/vendor_ruby/puppet/util/profiler/none.rb:6:in `profile'
/usr/share/ruby/vendor_ruby/puppet/util/profiler.rb:43:in `profile'
/usr/share/ruby/vendor_ruby/puppet/network/http/handler.rb:61:in `process'
/usr/share ...
edit retag flag offensive close merge delete



can you edit your question and share your `puppet.conf` file? I don't think ActiveRecord is needed anymore if you are using PuppetDB. Also can you run the puppet master with the `--trace` flag. This should show a stack trace where in the code active record is actually called.

Stefan gravatar imageStefan ( 2014-07-14 19:32:27 -0600 )edit

Edited to include that info.

jcrawfordor gravatar imagejcrawfordor ( 2014-07-16 11:45:25 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-16 12:19:09 -0600

Stefan gravatar image

updated 2014-07-16 12:20:54 -0600

The problem here is that instead of storeconfig_backend the configuration key is called storeconfigs_backend (notice the plural in storeconfigs).

When you just use storeconfigs => true the default of storeconfigs_backend is active record (probably due to backward compatibility reasons) and since this backend is deprecated it does not support all versions of the active record library.

So replacing

- storeconfig_backend = puppetdb
+ storeconfigs_backend = puppetdb

in your puppet.conf should do the trick.

edit flag offensive delete link more


Well, that was simple. Thanks!

jcrawfordor gravatar imagejcrawfordor ( 2014-07-16 14:20:21 -0600 )edit

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


Asked: 2014-07-14 11:35:50 -0600

Seen: 939 times

Last updated: Jul 16 '14