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...》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

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

黑客

黑客

Steven Levy / 赵俐、刁海鹏、田俊静 / 机械工业出版社华章公司 / 2011-10-31 / 69.00元

黑客文化和伦理的奠基之作,计算机专业人士必读。 二十五周年新版,涵盖比尔·盖茨、马克·扎克伯格、理查德·斯托曼、史蒂夫·沃兹尼克等著名黑客的最新资料。 多年前,射击游戏之父、Doom游戏的作者约翰·卡马克由于读到本书,坚定了游戏开发的决心。 谷歌首席信息官本·弗里德也是本书的忠实读者。 探寻黑客文化的本质,体会黑客精神的精髓。一起来看看 《黑客》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具