在GCE路由问题上的Stackdriver agen

我一直在按照说明在CentOS 7虚拟机上安装stackdriver代理。

这个虚拟机可以访问互联网:我可以跑到www.google.com或其他公共服务traceroute没有任何问题。

[root@dbrocket sysconfig]# ping www.google.com PING www.google.com (74.125.141.99) 56(84) bytes of data. 64 bytes from vl-in-f99.1e100.net (74.125.141.99): icmp_seq=1 ttl=49 time=74.0 ms 64 bytes from vl-in-f99.1e100.net (74.125.141.99): icmp_seq=2 ttl=49 time=73.0 ms 

当我尝试启动堆栈驱动程序代理程序时,它失败,如下所示:

 Apr 03 02:42:55 dbrocket stackdriver-agent[25065]: Starting stackdriver-collectd: Unable to determine collectd endpoint! Apr 03 02:42:55 dbrocket systemd[1]: stackdriver-agent.service: control process exited, code=exited status=1 Apr 03 02:42:55 dbrocket systemd[1]: Failed to start LSB: start and stop Stackdriver Agent. 

从源头上看,它看起来像无法连接到堆栈驱动程序网关服务,并且确实无法达到它:

 [root@dbrocket sysconfig]# traceroute -n collectd-gateway.google.stackdriver.com traceroute to collectd-gateway.google.stackdriver.com (173.255.114.144), 30 hops max, 60 byte packets 1 10.80.0.2 36.808 ms 36.733 ms 36.764 ms 2 * * * 3 * * * 4 * * * 5 * * * 6 * * * 

这是VM拥有的API权限:

 [root@dbrocket sysconfig]# curl --silent -f -H "Metadata-Flavor: Google" http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/scopes https://www.googleapis.com/auth/cloud.useraccounts.readonly https://www.googleapis.com/auth/devstorage.read_only https://www.googleapis.com/auth/logging.write https://www.googleapis.com/auth/monitoring 

我打算用另外的google-cloud-plaform API授权范围构build另一个虚拟机,但是这个路由问题看起来很奇怪。 我已经尝试从各种虚拟机与适当的互联网接入,他们都performance出相同的行为。

我究竟做错了什么?

这已经通过修复主networkingconfiguration中的防火墙规则来解决