我尝试使用一个模块作为托管VM来设置多模块Appengine应用。
但对于初学者,我正在检查是否可以在此处运行AppEngine Java多模块示例上运行的gcloud预览应用程序: 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$000(DevAppServer2Factory.java:35)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory$1.run(DevAppServer2Factory.java:47)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Fac tory$1.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 app不支持运行Java AppEngine模块吗?
我做错了什么?
更新 我用今天的最新gcloud工具再次运行命令,我仍然得到上面的错误。
答案 0 :(得分:1)
仅当我在Windows上运行时才会出现此问题。以管理员身份运行命令提示符并执行gcloud命令,修复了这个"坏端口/拒绝访问"问题