Stackdriver not working on Google Cloud Platform install of Couchdb 2.3

Keywords: CouchDB - Google Cloud Platform - Technical issue - Other
bnsupport ID: bba0ca31-f898-5247-f39f-9d3b63a36bef
Description:
A clean install of the latest Couchdb (2.3) on GCP is reporting errors with connecting to Google’s Stackdriver for monitoring. You can get errors below, but even if you do address the authentication issue, the couchdb.conf in: /opt/stackdriver/collectd/etc/collectd.d is misconfigured and failing.

Jun 26 20:44:20 bitnami-couchdb-dm-9a4d stackdriver-agent[2615]: mesg: ttyname failed: Inappropriate ioctl for device
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d stackdriver-agent[2615]: Starting Stackdriver metrics collection agent: stackdriver-agentoption = Interval; value = 6
0.000000;
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d stackdriver-agent[2615]: option = Hostname; value = ;
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d stackdriver-agent[2615]: option = FQDNLookup; value = false;
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d stackdriver-agent[2615]: Created new plugin context.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "syslog" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: type = syslog, key = LogLevel, value = info
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "df" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "cpu" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "swap" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "interface" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "disk" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "load" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "memory" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "processes" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "tcpconns" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: write_gcm: inside module_register for stackdriver_agent/5.5.2-384.stretch
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "write_gcm" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "match_regex" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "match_throttle_metadata_keys" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "stackdriver_agent" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "exec" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "aggregation" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "target_set" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d collectd[2635]: plugin_load: plugin "curl_json" successfully loaded.
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d stackdriver-agent[2615]: The instance has neither the application default credentials file nor the correct monitoring
 scopes; Exiting. ... failed!
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d stackdriver-agent[2615]: Not starting, configuration/credentials error. ... failed!
Jun 26 20:44:20 bitnami-couchdb-dm-9a4d stackdriver-agent[2615]:  (warning).

Hi @jungalwala,

Thank you for taking the time to report this. We are going to investigate it and will update this topic as soon as we have more information.

Thanks

Hi @jungalwala

We could reproduce the issue and found that the configuration file is wrong. For example, the url to check is now

 <URL "http://localhost:5984/_node/_local/_stats">

as you can see in the server’s documentation.

https://docs.couchdb.org/en/2.3.1/api/server/common.html#node-node-name-stats

However, if you change that, the error in the log file still persists. The team will continue checking it.

Thanks

Hi @jungalwala,

It seems you need to configure the credentials for the stackdriver agent. Sometimes the default configuration works on GCP but other times not. You can refer to this page to configure the crendentials.