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. I’ve 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 can’t think of how the native provider would be changing. It’s 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 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.

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

查看所有标签

猜你喜欢:

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

口碑

口碑

[美] David Meerman Scott / 高游、郭成钢、薛松 / 人民邮电出版社 / 2010-10 / 25.00

Web 2.0时代,怎样让你的产品或创意风靡一时,为百万大众喜闻乐道?本书将为你揭开其中的奥秘。作者将理论创新与实务操作相结合,总结出了利用Web 2.0营销手段制造网络狂欢效应的六条金科玉律,并介绍了一个个生动鲜活的成功范例,如:哈利?波特魔法公园如何策划一场小型活动,达到引爆网络热潮的效果;贝克?霍尔克拉夫特如何通过网络发布音乐作品,从默默无闻成长为全球炙手可热的明星;看似平淡无奇的电子书,如......一起来看看 《口碑》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

MD5 加密
MD5 加密

MD5 加密工具