Title: Failed to start LSB: data collector for Treasure Data
Tags: google-cloud-platform;php-curl;fluentd
Question: I have a WordPress website on a Google Cloud VM which was installed through the one click wordpress option. I'm having issues when trying to install 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 &quot;systemctl status google-fluentd.service&quot; and &quot;journalctl -xe&quot; for details.
invoke-rc.d: initscript google-fluentd, action &quot;start&quot; 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
I then tried 'sudo apt-get install lsb-core' but again the same error appears.
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)
My knowledge is very limited on this whole thing. i've just been following different threads and copying the given codes. The last major thing i did was updated to php7 following instructions here and ever since then i've been having this issue. Any help is greatly appreciated, thank you.
Comment: not sure what exactly is the problem, your first output is expected, it just say that the package you are trying to install, is already there: "Reading state information... Done
php-curl is already the newest version"


Here is another answer: You are likely running an image from Google Cloud Marketplace, where the Logging agent is disabled by default. This is controlled by the google-logging-enable instance metadata key (with the value 0). To re-enable the agent, either remove that key or set the value to 1. For more information logging-agent-troubleshooting
Enable Logging Agent (Cloud Shell):
gcloud compute instances add-metadata [VM-NAME] --metadata google-monitoring-enable=1, google-logging-enable=1 --zone [ZONE]
Install latest cloud logging agent (SSH into VM):
curl -sSO https://dl.google.com/cloudagents/add-logging-agent-repo.sh
sudo bash add-logging-agent-repo.sh --also-install
Refer to the link logging-agent-installation for more information on agent installation.
Check logging agent status:
sudo service google-fluentd status
If agent is not running,
sudo service google-fluentd restart
Test the agent
ps ax | grep fluentd
Refer to the link logging-agent-troubleshooting for more information on agent status, restart and test.
Now install php-curl
sudo apt-get install php-curl

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2021:00:06/14/21', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<google-cloud-platform><php-curl><fluentd>', 'Title': 'Failed to start LSB: data collector for Treasure Data', 'ViewCount': 557, 'id': 67973224, 'user_AboutMe': None, 'user_AccountId': 9893269.0, 'user_DisplayName': 'k Baker', 'user_Reputation': 11.0, 'user_Views': 3.0, 'user_id': 13327837.0}}