简体   繁体   English

无法在 Google Cloud Dataflow 虚拟机中使用 ping 命令?

[英]Can't use ping command in Google Cloud Dataflow vm?

I am unable to use the ping command after SSHing into my Google Cloud Dataflow worker Compute Engine instance in order to verify connectivity to a VPN tunnel.在通过 SSH 连接到我的 Google Cloud Dataflow worker Compute Engine 实例后,我无法使用 ping 命令来验证与 VPN 隧道的连接。 I receive the following error:我收到以下错误:

bash: ping: command not found

on any attempts to ping a server.在任何尝试 ping 服务器时。 I have enabled Private Google Access as well as disabled public IPs but I was under the impression that I would still be able to use the ping command.我启用了私有 Google 访问并禁用了公共 IP,但我的印象是我仍然可以使用 ping 命令。 I've also noticed that this VM uses the Dataflow.network tag, but this makes sense as it is a Dataflow job.我还注意到此 VM 使用 Dataflow.network 标记,但这是有道理的,因为它是一项数据流作业。 Is there a specific configuration required in order to resolve this issue?是否需要特定配置才能解决此问题?

The workers that are run as part of dataflow service are private docker images running on COS.作为数据流服务的一部分运行的工作线程是在 COS 上运行的私有 docker 镜像。

To run ping command you will need to do the following:-要运行 ping 命令,您需要执行以下操作:-

  1. SSH Into the worker SSH 进工

  2. Run a docker ps command to get the list of containers that are running运行docker ps命令以获取正在运行的容器列表

  3. Identify the container image which has the following image gcr.io/cloud-dataflow/v1beta3/....识别具有以下图像gcr.io/cloud-dataflow/v1beta3/....的容器图像。

  4. Run the command docker exec -it image_id /bin/bash运行命令docker exec -it image_id /bin/bash

Finally you can run a ping from inside the container as below最后,您可以从容器内部运行 ping,如下所示

xxxxxxxx ~ $ docker exec -it yyyyyy /bin/bash

xxxxxx:/# ping google.com
PING google.com (172.217.212.113) 56(84) bytes of data.
64 bytes from 172.217.212.113: icmp_seq=1 ttl=52 time=0.951 ms
64 bytes from 172.217.212.113: icmp_seq=2 ttl=52 time=0.967 ms
64 bytes from 172.217.212.113: icmp_seq=3 ttl=52 time=0.758 ms
64 bytes from 172.217.212.113: icmp_seq=4 ttl=52 time=0.943 ms
64 bytes from 172.217.212.113: icmp_seq=5 ttl=52 time=0.970 ms

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法在 Google Cloud VM 上授权 bigrquery,但可以在本地计算机上授权 - Can't authorize bigrquery on Google Cloud VM, but can on local machine 使用 Google Cloud Dataflow flex 模板时,是否可以使用多命令 CLI 来运行作业? - When using Google Cloud Dataflow flex templates, is it possible to use a multi-command CLI to run a job? 在谷歌云数据流中使用 experiments=no_use_multiple_sdk_containers - Use Of experiments=no_use_multiple_sdk_containers in Google cloud dataflow tensorflow 数据验证 tfdv 在谷歌云数据流上失败,出现“无法获取属性‘NumExamplesStatsGenerator’” - tensorflow data validation tfdv fails on google cloud dataflow with "Can't get attribute 'NumExamplesStatsGenerator' " 无法从 Google Cloud Function 连接到 VM,但可以从 App Engine 连接。 为什么是这样? - Can't connect to VM from Google Cloud Function, but can connect from App Engine. Why is this? Google Cloud Dataflow 可以在 Go 中没有外部 IP 地址的情况下运行吗? - Can Google Cloud Dataflow be run without an external IP address in Go? 我可以将 google DataFlow 与本机 python 一起使用吗? - Can I use google DataFlow with native python? Google Cloud Platform:VM 创建 - 控制台等效 Gcloud 命令 - Google Cloud Platform: VM creation - Console equivalent Gcloud command 您可以在我的 GCP VM 上使用 Jupyter notebook 在 Google Cloud 中运行 TPU 训练吗? - Can you use a Jupyter notebook on my GCP VM to run TPU training in Google Cloud? 如何使用 Google Cloud Function 启动和停止 vm 实例? - How can I use a Google Cloud Function to start and stop vm instances?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM