在两个端口

时间:2017-04-02 18:03:20

标签: maven google-app-engine

将我的操作系统升级到Sierria,并安装了JDK8,maven 3.3.9并试图运行maven,它会抛出错误。通过appengine docs,它提到“你可以使用Java 7或Java 8,但你必须使用Java 7字节码级别”。所以尝试安装JDK7,但也没有用。试图在其他端口上运行,但出现了同样的问题。

[INFO] <<< appengine-maven-plugin:1.9.48:devserver (default-cli) < package @ mark <<<
[INFO] 
[INFO] --- appengine-maven-plugin:1.9.48:devserver (default-cli) @ mark ---
[INFO] 
[INFO] Google App Engine Java SDK - Running Development Server
[INFO] 
[INFO] Retrieving Google App Engine Java SDK from Maven
[INFO] Running /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin/java -XstartOnFirstThread -javaagent:/Users/Raghu/.m2/repository/com/google/appengine/appengine-java-sdk/1.9.48/appengine-java-sdk/appengine-java-sdk-1.9.48/lib/agent/appengine-agent.jar -Xbootclasspath/p:/Users/Raghu/.m2/repository/com/google/appengine/appengine-java-sdk/1.9.48/appengine-java-sdk/appengine-java-sdk-1.9.48/lib/override/appengine-dev-jdk-overrides.jar -Dappengine.fullscan.seconds=5 -classpath /Users/Raghu/.m2/repository/com/google/appengine/appengine-java-sdk/1.9.48/appengine-java-sdk/appengine-java-sdk-1.9.48/lib/appengine-tools-api.jar com.google.appengine.tools.development.DevAppServerMain --allow_remote_shutdown -p 8080 /Users/Raghu/git/site/target/mark-6
[INFO] objc[4320]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin/java (0x100e654c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x100f2e4e0). One of the two will be used. Which one is undefined.
[INFO] Apr 02, 2017 11:21:05 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
[INFO] INFO: Overwriting system property key 'java.util.logging.config.file', value '/Users/Raghu/.m2/repository/com/google/appengine/appengine-java-sdk/1.9.48/appengine-java-sdk/appengine-java-sdk-1.9.48/config/sdk/logging.properties' with value 'WEB-INF/logging.properties' from '/Users/Raghu/git/site/target/mark-6/WEB-INF/appengine-web.xml'
[INFO] Apr 02, 2017 11:21:06 PM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
[INFO] Apr 02, 2017 5:51:06 PM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] INFO: jetty-6.1.x
[INFO] Apr 02, 2017 5:51:07 PM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] INFO: Started SelectChannelConnector@localhost:8080
[INFO] Apr 02, 2017 5:51:07 PM com.google.appengine.tools.development.JettyContainerService startHotDeployScanner
[INFO] INFO: Full scan of the web app in place every 5s.
[INFO] Apr 02, 2017 5:51:07 PM com.google.appengine.tools.development.AbstractModule startup
[INFO] INFO: Module instance gamma is running at http://localhost:8080/
[INFO] Apr 02, 2017 5:51:07 PM com.google.appengine.tools.development.AbstractModule startup
[INFO] INFO: The admin console is running at http://localhost:8080/_ah/admin
[INFO] Apr 02, 2017 5:51:07 PM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] INFO: jetty-6.1.x
[INFO] Apr 02, 2017 5:51:08 PM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] INFO: Started SelectChannelConnector@localhost:52747
[INFO] Apr 02, 2017 5:51:08 PM com.google.appengine.tools.development.JettyContainerService startHotDeployScanner
[INFO] INFO: Full scan of the web app in place every 5s.
[INFO] Apr 02, 2017 5:51:08 PM com.google.appengine.tools.development.AbstractModule startup
[INFO] INFO: Module instance gamma instance 0 is running at http://localhost:52747/
[INFO] Apr 02, 2017 5:51:08 PM com.google.appengine.tools.development.AbstractModule startup
[INFO] INFO: The admin console is running at http://localhost:52747/_ah/admin
[INFO] Apr 02, 2017 11:21:08 PM com.google.appengine.tools.development.DevAppServerImpl doStart
[INFO] INFO: Dev App Server is now running
[INFO] Apr 02, 2017 11:21:08 PM com.google.appengine.tools.development.InstanceHelper sendStartRequest
[INFO] WARNING: Got exception while performing /_ah/start request on server: 0.gamma, java.lang.NullPointerException: null

1 个答案:

答案 0 :(得分:1)

花了一些时间之后,我发现问题在于我在appengine-web.xml中使用后端实例B1并进行了基本缩放。通过使用具有自动缩放功能的前端实例F1来解决它,一切都开始正常工作。由于它是在本地运行的,我认为appengine-web.xml不会被考虑,我的不好。

在appengine-web.xml中:

<instance-class>F1</instance-class>
<automatic-scaling>
    <max-idle-instances>1</max-idle-instances>
    <min-pending-latency>automatic</min-pending-latency>
    <max-pending-latency>10ms</max-pending-latency>
    <max-concurrent-requests>5</max-concurrent-requests>
</automatic-scaling>