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

查看所有标签

猜你喜欢:

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

阿里巴巴

阿里巴巴

邓肯·克拉克 (Duncan Clark) / 中信出版社 / 2016-8-22 / CNY 58.00

阿里巴巴的故事在中国已是家喻户晓,马云的个人魅力和非凡的商业头脑也早已声名远扬。而一千个人眼中会有一千个不一样的马云, 一个外国投资人、咨询顾问眼中的马云和阿里巴巴会是什么样的?1994年就来到中国,阿里巴巴创业早期的咨询顾问克拉克先生将阿里巴巴帝国崛起过程中他的见闻、感触和思考结合深入的访谈、研究写成了这本书。 书中既可以读到阿里巴巴艰辛的创业历程、惊心动魄的商业对垒,也不乏有趣好玩儿的背......一起来看看 《阿里巴巴》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

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

HEX CMYK 互转工具