Puppet 茶包解題 resource type 不見了「Error while evaluating a Virtual Query, Could not auto...

栏目: 服务器 · 发布时间: 6年前

内容简介:最近升級 Elasticsearch 的版本到 6.3.0 後開始偶爾會出現 Error 500 的陌生訊息:一開始去嘗試了一下 puppetserver 重啟

最近升級 Elasticsearch 的版本到 6.3.0 後開始偶爾會出現 Error 500 的陌生訊息:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Virtual Query, Could not autoload puppet/type/elasticsearch_user_file: Could not autoload puppet/provider/elasticsearch_user_file/shield: no such file to load  puppet/provider/elastic_parsedfile at /etc/puppetlabs/code/modules/elasticsearch/manifests/init.pp:545:6 on node

一開始去 elastic/puppet-elasticsearch 這邊找到類似的問題「 Regression? Could not autoload puppet/provider/elasticsearch_plugin/elasticsearch_plugin 」,有人說到該問題是 Puppet 既有的問題,並且 workaround 是重啟 puppetserver。

The unfortunate reality (and why I link directly to the upstream Puppet issue tracker) is that this seems endemic to Puppet. I usually observe problems when a native provider is updated or otherwise changes which seems to trigger the behavior as well. The most reliable remediation seems to be restarting either the master or agent, as you mention.

嘗試了一下 puppetserver 重啟 不一定 能夠解決問題,而且該問題是 偶發 出現,並不是每次都會錯,看起來在官方沒有想解這個問題,然後 workaround 也不是很好 …

The odd thing is that sometimes I restart the puppetserver service and the same issue crops up immediately. Ive pushed version 6.2.2 of this module out to all of my environments and it has been that way for quite some time, I cant think of how the native provider would be changing. Its a pretty frustrating issue as it causes the entire agent run to bail.

由於看起來不是單一 module 的情況,所以只好轉戰其他 module 看看是否有類似的問題,結果在 voxpupuli/puppet-rabbitmq 看到也有人反應「 Autoload error that sometimes occurs on Puppet Enterprise 2017.2.2 」,這邊有談到是因為 puppet types 的問題:

So after 5 days, removing my_environment/.resource_types/rabbitmq_plugin.pp ensured the error didnt 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 dont believe it is that is a work around.

實際測試使用 puppet generate types 去重新產生 resource types 可以正常的解決問題,但是每次 puppetserver restart 都需要這個動作

所以最後的解決辦法就是在 CD 加上 puppet generate types 讓 resource types 重新產生,記得要在 puppetserver start 之後,搞定。


以上所述就是小编给大家介绍的《Puppet 茶包解題 resource type 不見了「Error while evaluating a Virtual Query, Could not auto...》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

黑客与画家

黑客与画家

[美] Paul Graham / 阮一峰 / 人民邮电出版社 / 2011-4 / 49.00元

本书是硅谷创业之父Paul Graham 的文集,主要介绍黑客即优秀程序员的爱好和动机,讨论黑客成长、黑客对世界的贡献以及编程语言和黑客工作方法等所有对计算机时代感兴趣的人的一些话题。书中的内容不但有助于了解计算机编程的本质、互联网行业的规则,还会帮助读者了解我们这个时代,迫使读者独立思考。 本书适合所有程序员和互联网创业者,也适合一切对计算机行业感兴趣的读者。一起来看看 《黑客与画家》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具