Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Chef infra ArgumentError UTF-8中的字节序列无效,致命:Chef::Exceptions::ChildConvergeError:Chef运行进程退出失败(退出代码1)_Chef Infra - Fatal编程技术网

Chef infra ArgumentError UTF-8中的字节序列无效,致命:Chef::Exceptions::ChildConvergeError:Chef运行进程退出失败(退出代码1)

Chef infra ArgumentError UTF-8中的字节序列无效,致命:Chef::Exceptions::ChildConvergeError:Chef运行进程退出失败(退出代码1),chef-infra,Chef Infra,在使用命令chef-client在节点计算机中执行以下代码时,我遇到了“ArgumentError UTF-8中的无效字节序列”这个错误 以下是我的示例代码: my_secret_key = Chef::EncryptedDataBagItem.load_secret("/tmp/secret") my_secret_databag = Chef::EncryptedDataBagItem.load(“userdata”,”xyz”, my_secret_key) user 'devops'

在使用命令chef-client在节点计算机中执行以下代码时,我遇到了“ArgumentError UTF-8中的无效字节序列”这个错误

以下是我的示例代码:

my_secret_key = Chef::EncryptedDataBagItem.load_secret("/tmp/secret")
my_secret_databag = Chef::EncryptedDataBagItem.load(“userdata”,”xyz”, my_secret_key)

user 'devops' do
  comment 'devops user' 
  uid 101
  home '/home/devops'
  shell '/bin/bash'
  password my_secret_databag['password']
end

哪一行引发了异常?在下面的几行中,my_secret\u key=Chef::EncryptedDataBagItem.load\u secret(/tmp/secret)my_secret\u databag=Chef::EncryptedDataBagItem.load(“userdata”,“xyz”,my_secret\u key)仍然是两行。您是如何生成密钥的?我们通常使用base64端编码的随机数据,但听起来你只是使用二进制随机性?