gpt4 book ai didi

linux - 使用数据包对资源 `install` 执行操作 'newrelic_agent_infrastructure[Install]' 时出错

转载 作者:太空宇宙 更新时间:2023-11-04 10:08:59 24 4
gpt4 key购买 nike

我们正在尝试使用第三方说明书安装 New Relic 基础架构代理。但是我们有一个错误:
在资源“newrelic_agent_infrastructure[Install]”上执行操作 install 时出错

我们的 Recipe :

#
# Cookbook:: third-party-newrelic
# Recipe:: infraestructure-agent
#
# Copyright:: 2018, The Authors, All Rights Reserved.

include_recipe 'base::databag'
include_recipe 'newrelic::infrastructure_agent'
# Default Variables
newrelic = decrypt_databag('newrelic')

node.normal['newrelic']['license'] = newrelic['license_key']

记录错误:

Recipe: newrelic::infrastructure_agent
* newrelic_agent_infrastructure[Install] action install

================================================================================
Error executing action `install` on resource 'newrelic_agent_infrastructure[Install]'
================================================================================

RuntimeError
------------
The NewRelic key is required.

Cookbook Trace:
---------------
/var/chef/cache/cookbooks/newrelic/libraries/helpers.rb:15:in `check_license'
/var/chef/cache/cookbooks/newrelic/providers/agent_infrastructure.rb:18:in `block in class_from_file'

Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/newrelic/recipes/infrastructure_agent.rb

8: newrelic_agent_infrastructure 'Install'

Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/newrelic/recipes/infrastructure_agent.rb:8:in `from_file'

newrelic_agent_infrastructure("Install") do
action [:install]
default_guard_interpreter :default
declared_type :newrelic_agent_infrastructure
cookbook_name "newrelic"
recipe_name "infrastructure_agent"
end

System Info:
------------
chef_version=13.8.5
platform=ubuntu
platform_version=16.04
ruby=ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]
program_name=chef-client worker: ppid=101819;start=19:52:27;
executable=/opt/chef/bin/chef-client


Running handlers:
[2018-05-10T19:52:34+00:00] ERROR: Running exception handlers
Running handlers complete
[2018-05-10T19:52:34+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 07 seconds
[2018-05-10T19:52:34+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2018-05-10T19:52:34+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-05-10T19:52:34+00:00] ERROR: newrelic_agent_infrastructure[Install] (newrelic::infrastructure_agent line 8) had an error: RuntimeError: The NewRelic key is required.
[2018-05-10T19:52:34+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

即使使用以下行而不是数据包:

node.default_unless['newrelic']['license'] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

我们已经为这个命令尝试了很多替代方法,但效果不佳。

提前致谢。

最佳答案

相关代码应该可以工作,但您可以尝试:

node.override['newrelic']['application_monitoring']['license'] = 'asdf'

关于linux - 使用数据包对资源 `install` 执行操作 'newrelic_agent_infrastructure[Install]' 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50291622/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com