Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.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
Google cloud platform 在GCP上使用fluent插件google cloud时,td代理不工作_Google Cloud Platform_Td Agent - Fatal编程技术网

Google cloud platform 在GCP上使用fluent插件google cloud时,td代理不工作

Google cloud platform 在GCP上使用fluent插件google cloud时,td代理不工作,google-cloud-platform,td-agent,Google Cloud Platform,Td Agent,我在GCP虚拟机上安装了td代理,检查服务是否运行(通过“systemctl status td代理”)。 然后我运行“/usr/sbin/td agent gem install fluent plugin google cloud”来安装stackdriver输出插件。安装成功,但重新启动后td代理不再工作。 系统CTL状态td代理显示: Job for td-agent.service failed because the control process exited with error

我在GCP虚拟机上安装了td代理,检查服务是否运行(通过“systemctl status td代理”)。 然后我运行“/usr/sbin/td agent gem install fluent plugin google cloud”来安装stackdriver输出插件。安装成功,但重新启动后td代理不再工作。 系统CTL状态td代理显示:

Job for td-agent.service failed because the control process exited with error code. See "systemctl status td-agent.service" and "journalctl -xe" for details.
[ei-platform@gw1 ~]$ sudo systemctl status td-agent.service
   td-agent.service - td-agent: Fluentd based data collector for Treasure Data
   Loaded: loaded (/usr/lib/systemd/system/td-agent.service; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Wed 2019-10-16 05:05:46 UTC; 5s ago
     Docs: https://docs.treasuredata.com/articles/td-agent
  Process: 32171 ExecStart=/opt/td-agent/embedded/bin/fluentd --log /var/log/td-agent/td-agent.log --daemon /var/run/td-agent/td-agent.pid $TD_AGENT_OPTIONS (code=exited, status=1/FAILURE)
同样的方法在VMWARE VM上也适用


是否知道它在GCP上失败的原因?

最后我发现谷歌云插件的安装并没有将它添加到td代理插件目录中,所以在启动时没有加载它


插件被放置在/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluent-plugin-google-cloud-0.7.22/lib/fluent/plugin dir中,因此我在/usr/lib/systemd/system/td-agent.service中的-p开关后添加了这个dir,插件被加载并按预期工作。

请按照错误消息文本“查看”journalctl-xe“详细信息”。可能有线索。我发布了journalctl,发现了错误:/opt/td-agent/embedded/lib/ruby/site\u-ruby/2.4.0/rubygems/stub\u-specification.rb:116:“初始化”:权限被拒绝@rb\u-sysopen-/opt/td-agent/embedded/lib/ruby/gems/2.4.0/specifications..所以我运行了chmod,这有助于通过这一点,但它失败了:[错误]:配置错误文件=“/etc/td-agent/td-agent.conf”error\u class=Fluent::ConfigError=“未知输出插件”google\u-cloud”。运行“gem搜索-rd Fluent-plugin”查找插件”知道插件无法识别的原因吗?