首页 > 解决方案 > 无法初始化日志记录驱动程序:无法连接或使用 Google Cloud Logging 进行身份验证

问题描述

要做的事: 从 docker 容器将日志发送到 Google Logs Viewer。

面对错误 我关注了这篇文章:https ://docs.docker.com/config/containers/logging/gcplogs/ 并执行docker run --log-driver=gcplogs nginx

docker: Error response from daemon: failed to initialize logging driver: unable to connect or authenticate with Google Cloud Logging: rpc error: code = PermissionDenied desc = The caller does not have permission.

操作系统:容器优化操作系统 cos-81-12871-1196-0

我也试过这个The Google Cloud Logging driver for Docker with service account with log.adminand log.writerrole

如何将日志发送到 Stackdriver/Google Cloud Logging

标签: dockergoogle-cloud-platformgoogle-cloud-stackdrivergoogle-cloud-logginggoogle-container-optimized-os

解决方案


推荐阅读