gcloud预览应用运行

gcloud预览应用运行

本文介绍了gcloud预览应用运行“端口访问被拒绝"错误; Windows上的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置一个模块作为托管VM的多模块Appengine应用.

I'm trying to setup a multi-module Appengine app with one module as managed VM.

但是对于初学者来说,我正在检查是否可以从以下位置运行在AppEngine Java多模块示例上运行的gcloud Preview应用程序: https://github.com/GoogleCloudPlatform/appengine-modules-sample-java

But for starters, I'm checking if I can run gcloud preview app run on the AppEngine Java multi-modules sample from here:https://github.com/GoogleCloudPlatform/appengine-modules-sample-java

当我将其导入Android Studio中并运行appengineRun构建规则时,它可以很好地构建.但是,如果我转到命令提示符,然后运行以下命令:

When I import it in Android Studio, and run the appengineRun build rule, it builds fine. However, if I go to command prompt, and run the following:

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 Preview应用运行时遇到的任何Java AppEngine模块都收到相同的错误. gcloud应用程序不支持运行Java AppEngine模块吗?

I get the same error for any Java AppEngine module that I try to run with gcloud preview app run. Does gcloud app not support running a Java AppEngine module?

我在做什么错了?

更新:到今天为止,我使用最新的gcloud工具再次运行了该命令,但仍然收到上面的错误.

UPDATE:I ran the command again with the latest gcloud tools as of today, and I still get the error above.

推荐答案

仅当我在Windows上运行时,才会发生此问题.以管理员身份运行命令提示符并在其中执行gcloud命令可解决此端口错误/访问被拒绝"问题.

This problem happens only when I run on Windows. Running Command Prompt as Administrator and executing the gcloud commands there fixes this "bad port/Access Denied" problem.

这篇关于gcloud预览应用运行“端口访问被拒绝"错误; Windows上的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 21:58