I'm trying to setup a multi-module Appengine app with one module as managed VM.
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
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
Then I get the following error:
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
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?
What am I doing wrong?
UPDATE: I ran the command again with the latest gcloud tools as of today, and I still get the error above.
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.