【问题标题】:Failed to start LSB: data collector for Treasure DataLSB 启动失败:Treasure Data 的数据收集器
【发布时间】:2021-06-14 15:34:32
【问题描述】:

我在谷歌云虚拟机上有一个 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)

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

【问题讨论】:

  • 不确定到底是什么问题,您的第一个输出是预期的,它只是说您尝试安装的软件包已经存在:“正在读取状态信息......完成 php-curl 是已经是最新版本”

标签: google-cloud-platform php-curl fluentd


【解决方案1】:

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

启用日志记录代理(Cloud Shell):
gcloud 计算实例 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-install

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

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

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

测试代理
ps斧头| grep 流利的

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-03
    • 2011-04-04
    • 1970-01-01
    • 2014-07-18
    • 1970-01-01
    相关资源
    最近更新 更多