在Google Compute Engine中打开端口时出错 [英] error opening a port in Google Compute Engine

查看:102
本文介绍了在Google Compute Engine中打开端口时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过ssh在Google Compute引擎的VM实例中打开端口,但是我一直收到错误消息.

I am trying to open a port via ssh in my VM instance in Google Compute engine but I keep getting error messages.

这是我的命令:

myname@instance-2:~$ gcloud compute firewall-rules create baasbox-console-port --allow tcp:9000 --source-range
s=0.0.0.0/0

这是错误消息:

NAME NETWORK SRC_RANGES RULES SRC_TAGS TARGET_TAGS
ERROR: (gcloud.compute.firewall-rules.create) Some requests did not succeed:
 - Insufficient Permission

请问我在做什么错了?

推荐答案

gcloud auth login 在浏览器中转到以下链接: (将链接剪切并粘贴到浏览器地址栏中) 对我来说(Ubuntu 14.04)不会在FireFox上返回验证码,请使用Chromium.您应该获得一长串字符作为验证码.将其剪切并传递到终端中.然后,我将看到以下内容:

gcloud auth login Go to the following link in your browser: (Cut and past the link into your browser address bar) For me (Ubuntu 14.04) this does not return a verification code on FireFox, use Chromium. You should get a long string of characters as a verification code. Cut and past this into the terminal. I would then see this:

错误:网络身份验证出现问题.错误:(gcloud.auth.login)invalid_grant

ERROR: There was a problem with web authentication.ERROR: (gcloud.auth.login) invalid_grant

在尝试几次生成代码并将其粘贴之后,我复制了代码和尾随的冒号(:),然后它起作用了

After several tries of generating the code and pasting it, I copied the code and the trailing colon(:) then it worked

这篇关于在Google Compute Engine中打开端口时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆