puppet-rabbitmq icon indicating copy to clipboard operation
puppet-rabbitmq copied to clipboard

Autoload error that sometimes occurs on Puppet Enterprise 2017.2.2

Open pietervogelaar opened this issue 7 years ago • 18 comments

Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Virtual Query, Could not autoload puppet/type/rabbitmq_plugin: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/rabbitmq_plugin'. Set at unknown location at /etc/puppetlabs/code/environments/tst/modules/rabbitmq/manifests/init.pp:310:35 on node stackstorm-rabbitmq-02t.

pietervogelaar avatar Sep 05 '17 13:09 pietervogelaar

Everything used to run fine on Puppet Enterprise 2016.4.0.

pietervogelaar avatar Sep 05 '17 13:09 pietervogelaar

Just wondering, which version of the module are you running? And if an older version, does current master fix anything?

We're hoping to release 6.0.0 soon, first release under Voxpupuli.

Also, which version of RabbitMQ are you running, and on what platform?

wyardley avatar Sep 05 '17 21:09 wyardley

I'm using module: mod 'puppetlabs/rabbitmq', '5.6.0'

The YUM rabbitmq-server package is version 3.6.2 on RHEL 7.4 (selinux enabled).

pietervogelaar avatar Sep 06 '17 06:09 pietervogelaar

If it's at all possible, could you test against current master, and see if it exhibits the same behavior (in a test environment, if doing that would be disruptive)?

A quick web search also suggests that pluginsync needs to be enabled, though I'm assuming it is? Maybe ask on IRC or Slack and see if the error message rings a bell for anyone?

wyardley avatar Sep 06 '17 06:09 wyardley

Is the current master compatible with major version 5? Or is it code what will soon be released as 6? What I mean to say, are there breaking changes? :-)

pietervogelaar avatar Sep 06 '17 06:09 pietervogelaar

@pietervogelaar yes, there are some breaking changes coming. Big change is the switch to datatypes, and changing the 'UNSET' pattern to true undef. There are also some changes to the way repos and installation work, though they likely wouldn't affect you if the package is already installed.

wyardley avatar Sep 06 '17 06:09 wyardley

I have this issue too. RHEL 7.4, PM it 2017.2.0,

bostrowski13 avatar Sep 06 '17 17:09 bostrowski13

@bostrowski13 I am guessing you're seeing this with current git master (6.0.0-rc0) too?

wyardley avatar Sep 06 '17 18:09 wyardley

For anyone on RHEL / CentOS, does /usr/lib/rabbitmq/bin/rabbitmq-plugins exist? I don't think it's the same issue as #566 but just curious. #570 is a proposed "fix" for this if anyone wants to try.

wyardley avatar Sep 06 '17 18:09 wyardley

i have rabbitmq-plugins in that location, even on the installation that fails in https://github.com/voxpupuli/puppet-rabbitmq/issues/611#issuecomment-327565166

bostrowski13 avatar Sep 06 '17 18:09 bostrowski13

@wyardley yes, I've seen this too.

bostrowski13 avatar Sep 06 '17 18:09 bostrowski13

@hunner pointed me in the direction of https://tickets.puppetlabs.com/browse/PUP-7466, FWIW

wyardley avatar Sep 06 '17 18:09 wyardley

@wyardley I am also having this issue on our puppet enterprise instance randomly

TraGicCode avatar Sep 14 '17 22:09 TraGicCode

I wonder if it could have to do with the fact that some of the plugins have provider => 'rabbitmqplugins' explicitly spelled out (that does seem to be the right provider name, though I don't think it's necessary).

Can folks post what code lines up with the line number given in the error in the version they're seeing this error with?

wyardley avatar Sep 15 '17 04:09 wyardley

Here's the error I see...

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Virtual Query, Could not autoload puppet/type/rabbitmq_plugin: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/rabbitmq_plugin'. Set at unknown location at /etc/puppetlabs/code/environments/production/modules/rabbitmq/manifests/init.pp:394:33 on node server1.domain.com

and the associated line number....

  # Make sure the various providers have their requirements in place.
  Class['rabbitmq::install'] -> Rabbitmq_plugin<| |>

bostrowski13 avatar Sep 15 '17 12:09 bostrowski13

i'm also using this version of the module puppet-rabbitmq (v6.0.1-rc0)

bostrowski13 avatar Sep 15 '17 13:09 bostrowski13

Tried out solving this with v7.0.0 of the module and still seeing the same error randomly on my test server (4 times today). It happens on 7 of our CentOS 7 RabbitMQ servers. Happening at the exact same line as bostrowski13 mentioned. We are using using PE 2016.4.2.

I faintly remember this starting when I had to run puppet generate types to solve another module's upgrade issue. Running that command puts files into .resource_types in whatever environment the command is ran for.

My next test will be to against our production version of the RabbitMQ module and remove those as at the time they weren't needed for the RabbitMQ module. Usually get at least 1 hit of the error in 24 hours.

rgeniesse avatar Sep 27 '17 03:09 rgeniesse

So after 5 days, removing my_environment/.resource_types/rabbitmq_plugin.pp ensured the error didn't happen. I added it back today and got 2 of the errors about 2 hours after. That supports my theory that it started after running puppet generate types in my case.

With the file back, I also tried to manage some of the RabbitMQ plugins with the module to see if something was "empty" and it having a value would get passed the error. My first noop try with that showed the error, so I don't believe it is that is a work around.

Will take me some time to dig into what rabbitmq_plugin.pp is doing.

rgeniesse avatar Oct 05 '17 00:10 rgeniesse