首页 > 解决方案 > LSB 启动失败:Treasure Data 的数据收集器

问题描述

我在谷歌云虚拟机上有一个 WordPress 网站,它是通过一键式 wordpress 选项安装的。我在尝试安装 php-curl 时遇到问题

sudo apt-get install php-curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php-curl is already the newest version (2:8.0+82+0~20210313.35+debian9~1.gbpa8195f).
The following packages were automatically installed and are no longer required:
  libicu57 sgml-base xml-core
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up google-fluentd (1.6.33-1) ...
Conffile /etc/google-fluentd/google-fluentd.conf has been modified. Remain untouched.
Job for google-fluentd.service failed because the control process exited with error code.
See "systemctl status google-fluentd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript google-fluentd, action "start" failed.
● google-fluentd.service - LSB: data collector for Treasure Data
   Loaded: loaded (/etc/init.d/google-fluentd; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2021-06-14 15:18:12 UTC; 12ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 20852 ExecStart=/etc/init.d/google-fluentd start (code=exited, status=1/FAILURE)
Jun 14 15:18:12 ark-wp-vm systemd[1]: Starting LSB: data collector for Treasure Data...
Jun 14 15:18:12 ark-wp-vm google-fluentd[20852]: Starting google-fluentd 1.6.33: Disabled via metadata ... (…ning).
Jun 14 15:18:12 ark-wp-vm google-fluentd[20852]: google-fluentd ... failed!
Jun 14 15:18:12 ark-wp-vm systemd[1]: google-fluentd.service: Control process exited, code=exited status=1
Jun 14 15:18:12 ark-wp-vm systemd[1]: Failed to start LSB: data collector for Treasure Data.
Jun 14 15:18:12 ark-wp-vm systemd[1]: google-fluentd.service: Unit entered failed state.
Jun 14 15:18:12 ark-wp-vm systemd[1]: google-fluentd.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package google-fluentd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 google-fluentd
E: Sub-process /usr/bin/dpkg returned an error code (1)

正在做

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.13 (stretch)
Release:        9.13
Codename:       stretch

然后我尝试了“sudo apt-get install lsb-core”,但同样的错误再次出现。

sudo service google-fluentd status
● google-fluentd.service - LSB: data collector for Treasure Data
   Loaded: loaded (/etc/init.d/google-fluentd; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2021-06-14 15:18:12 UTC; 7min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 20852 ExecStart=/etc/init.d/google-fluentd start (code=exited, status=1/FAILURE)

Jun 14 15:18:12 ark-wp-vm systemd[1]: Starting LSB: data collector for Treasure Data...
Jun 14 15:18:12 ark-wp-vm google-fluentd[20852]: Starting google-fluentd 1.6.33: Disabled via metadata ... (warning
Jun 14 15:18:12 ark-wp-vm google-fluentd[20852]: google-fluentd ... failed!
Jun 14 15:18:12 ark-wp-vm systemd[1]: google-fluentd.service: Control process exited, code=exited status=1
Jun 14 15:18:12 ark-wp-vm systemd[1]: Failed to start LSB: data collector for Treasure Data.
Jun 14 15:18:12 ark-wp-vm systemd[1]: google-fluentd.service: Unit entered failed state.
Jun 14 15:18:12 ark-wp-vm systemd[1]: google-fluentd.service: Failed with result 'exit-code'.
lines 1-13/13 (END)

我对这件事的了解非常有限。我一直在关注不同的线程并复制给定的代码。我做的最后一件主要事情是按照此处的说明更新到 php7 ,从那时起我就一直遇到这个问题。非常感谢任何帮助,谢谢。

标签: google-cloud-platformphp-curlfluentd

解决方案


您可能正在运行来自 Google Cloud Marketplace 的映像,其中 Logging 代理默认处于禁用状态。这由 google-logging-enable 实例元数据键(值为 0)控制。要重新启用代理,请删除该键或将值设置为 1。有关详细信息logging-agent-troubleshooting

启用日志记录代理 (Cloud Shell):
gcloud compute instances add-metadata [VM-NAME] --metadata google-monitoring-enable=1, google-logging-enable=1 --zone [ZONE]

安装最新的云日志代理(SSH 到 VM):
curl -sSO https://dl.google.com/cloudagents/add-logging-agent-repo.sh
sudo bash add-logging-agent-repo.sh --also-安装

有关代理安装的更多信息,请参阅链接logging-agent- installation。

检查日志代理状态:
sudo service google-fluentd status

如果代理没有运行,
sudo service google-fluentd restart

测试代理
ps ax | grep 流利

有关代理状态、重新启动和测试的更多信息,请参阅链接logging-agent-troubleshooting

现在安装 php-curl
sudo apt-get install php-curl


推荐阅读