gcloud 预览应用 运行 "bad port Access Denied" Windows 上的错误
gcloud preview app run "bad port Access Denied" error on Windows
我正在尝试设置一个多模块 Appengine 应用程序,其中一个模块作为托管 VM。
但是对于初学者来说,我正在检查我是否可以 运行 gcloud preview app 运行 AppEngine Java 多模块示例来自这里:
https://github.com/GoogleCloudPlatform/appengine-modules-sample-java
当我在 Android Studio 和 运行 appengineRun 构建规则中导入它时,它构建良好。但是,如果我转到命令提示符,并且 运行 以下内容:
E:\appengine-modules-sample-java-master>gcloud preview app run appengine-modules
-guestbook/src/main/webapp
然后我得到以下错误:
INFO: Skipping SDK update check. INFO: Starting API server at: http://localhost:51296 INFO: Starting module "default" running at: http://localhost:8080 INFO: Starting admin server at: http://localhost:8000 Exception in thread "main" java.lang.RuntimeException: Unable to create a DevApp Server ERROR: bad runtime process port ['']
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.doCreateDevAppServer(DevAppServer2Factory.java:87)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.access[=14=]0(DevAppServer2Factory.java:35)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.run(DevAppServer2Factory.java:47)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.run(DevAppServer2Factory.java:45)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.createDevAppServer(DevAppServer2Factory.java:45)
at com.google.appengine.tools.development.devappserver2.StandaloneInstan ce$StartAction.apply(StandaloneInstance.java:119)
at com.google.appengine.tools.development.devappserver2.StandaloneInstan ce$StartAction.apply(StandaloneInstance.java:82) ERROR: bad runtime process port ['']
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.j ava:48)
at com.google.appengine.tools.development.devappserver2.StandaloneInstan ce.run(StandaloneInstance.java:66)
at com.google.appengine.tools.development.devappserver2.StandaloneInstan ce.main(StandaloneInstance.java:44) Caused by: java.lang.RuntimeException: Cannot generate policy file.
at com.google.apphosting.utils.security.SecurityManagerInstaller.install (SecurityManagerInstaller.java:96)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.doCreateDevAppServer(DevAppServer2Factory.java:72)
... 10 more Caused by: java.io.IOException: Access is denied
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1006)
at java.io.File.createTempFile(File.java:1981)
at java.io.File.createTempFile(File.java:2032)
at com.google.apphosting.utils.security.SecurityManagerInstaller.generat ePolicyFile(SecurityManagerInstaller.java:144)
at com.google.apphosting.utils.security.SecurityManagerInstaller.install (SecurityManagerInstaller.java:94)
... 11 more INFO: default: "GET /_ah/warmup HTTP/1.1" 500 2167
对于我尝试使用 gcloud 预览应用程序 运行 运行 的任何 Java AppEngine 模块,我都遇到了同样的错误。 gcloud 应用程序不支持 运行 宁 Java AppEngine 模块吗?
我做错了什么?
更新:
截至今天,我使用最新的 gcloud 工具再次 运行 命令,但仍然出现上述错误。
只有当我在 Windows 上 运行 时才会出现此问题。 运行 命令提示符作为管理员并在那里执行 gcloud 命令解决了这个 "bad port/Access Denied" 问题。
我正在尝试设置一个多模块 Appengine 应用程序,其中一个模块作为托管 VM。
但是对于初学者来说,我正在检查我是否可以 运行 gcloud preview app 运行 AppEngine Java 多模块示例来自这里: https://github.com/GoogleCloudPlatform/appengine-modules-sample-java
当我在 Android Studio 和 运行 appengineRun 构建规则中导入它时,它构建良好。但是,如果我转到命令提示符,并且 运行 以下内容:
E:\appengine-modules-sample-java-master>gcloud preview app run appengine-modules
-guestbook/src/main/webapp
然后我得到以下错误:
INFO: Skipping SDK update check. INFO: Starting API server at: http://localhost:51296 INFO: Starting module "default" running at: http://localhost:8080 INFO: Starting admin server at: http://localhost:8000 Exception in thread "main" java.lang.RuntimeException: Unable to create a DevApp Server ERROR: bad runtime process port ['']
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.doCreateDevAppServer(DevAppServer2Factory.java:87)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.access[=14=]0(DevAppServer2Factory.java:35)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.run(DevAppServer2Factory.java:47)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.run(DevAppServer2Factory.java:45)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.createDevAppServer(DevAppServer2Factory.java:45)
at com.google.appengine.tools.development.devappserver2.StandaloneInstan ce$StartAction.apply(StandaloneInstance.java:119)
at com.google.appengine.tools.development.devappserver2.StandaloneInstan ce$StartAction.apply(StandaloneInstance.java:82) ERROR: bad runtime process port ['']
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.j ava:48)
at com.google.appengine.tools.development.devappserver2.StandaloneInstan ce.run(StandaloneInstance.java:66)
at com.google.appengine.tools.development.devappserver2.StandaloneInstan ce.main(StandaloneInstance.java:44) Caused by: java.lang.RuntimeException: Cannot generate policy file.
at com.google.apphosting.utils.security.SecurityManagerInstaller.install (SecurityManagerInstaller.java:96)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory.doCreateDevAppServer(DevAppServer2Factory.java:72)
... 10 more Caused by: java.io.IOException: Access is denied
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1006)
at java.io.File.createTempFile(File.java:1981)
at java.io.File.createTempFile(File.java:2032)
at com.google.apphosting.utils.security.SecurityManagerInstaller.generat ePolicyFile(SecurityManagerInstaller.java:144)
at com.google.apphosting.utils.security.SecurityManagerInstaller.install (SecurityManagerInstaller.java:94)
... 11 more INFO: default: "GET /_ah/warmup HTTP/1.1" 500 2167
对于我尝试使用 gcloud 预览应用程序 运行 运行 的任何 Java AppEngine 模块,我都遇到了同样的错误。 gcloud 应用程序不支持 运行 宁 Java AppEngine 模块吗?
我做错了什么?
更新: 截至今天,我使用最新的 gcloud 工具再次 运行 命令,但仍然出现上述错误。
只有当我在 Windows 上 运行 时才会出现此问题。 运行 命令提示符作为管理员并在那里执行 gcloud 命令解决了这个 "bad port/Access Denied" 问题。