gcloud - td-agent 不验证谷歌云服务帐户凭据
问题描述
尝试使用 td-agent 和 fluent-google-cloud 插件配置 fluentd 输出。插件和所有依赖项都已加载,但 fluentd 没有输出到谷歌云日志和 td-agent 日志状态error="Unable to read the credential file specified by GOOGLE_APPLICATION_CREDENTIALS: file /home/$(whoami)/.config/gcloud/service_account_credentials.json does not exist"
。但是,当我转到文件路径时,该文件确实存在,并且 $GOOGLE_APPLICATION_CREDENTIALS 变量也设置为文件路径。我应该怎么做才能解决这个问题?
解决方案
假设错误和您都是正确的,我怀疑(!)您正在使用您的用户帐户( == whoami
)并/home/$(whoami)/.config/gcloud
在代理以 root 身份运行(在systemctl
?)时发现并且没有在那里找到凭据文件(也许/root/.config/gcloud
。
如果您提供有关您所做工作的更多详细信息以便我们更好地理解该问题,将会很有帮助。
推荐阅读
- c# - 如何在winforms中将嵌套列表绑定到datagridview
- python - 如何在python中将子列表和字符串结合起来列出
- javascript - 在我的所有代码都应该完成之后执行的 Javascript 代码
- python - 名单中的棋子宣布获胜者
- quill - 需要一种使用自定义按钮切换段落(块)类的方法
- java - 内容解析器无法在平板设备上运行
- list - 选择 Dropdown Googlesheets 脚本后从列表中删除项目
- node.js - 从 node_modules 位置以外的位置解析 nodejs 模块,有可能吗?
- visual-studio-code - 如何诊断为什么使用 Docker 容器运行的 VS 代码没有在容器中安装扩展
- javascript - 如何在 Electron 应用程序中配置 Chart.js?