gpt4 book ai didi

java - 我们无法使用 Google App Engine 启动 AppRTC 应用程序

转载 作者:行者123 更新时间:2023-12-01 19:58:23 25 4
gpt4 key购买 nike

问题

我正在尝试在我的虚拟机(ubuntu 16.04)上构建和部署apprtc应用程序。我已经成功部署了碰撞服务器。但在尝试使用 google app engine 启动 apprtc 应用程序时出现错误。

遵循的步骤

  1. https://github.com/webrtc/apprtc 克隆源代码
  2. 根据文档启动collider服务器(监听8080端口)
  3. 进入 apprtc 目录并使用命令 npm install 安装节点包。
  4. 使用命令“grunt build”成功构建 apprtc 应用程序。
  5. https://cloud.google.com/appengine/docs/standard/java/download 安装 Google 应用引擎(appengine-java-sdk-1.9.62)
  6. 使用以下命令运行 apprtc 应用程序:

    DIRECTORY_PATH/appengine-java-sdk-1.9.62/bin/dev_appserver.sh out/app_engine/.

出现这样的错误

Executing [/usr/lib/jvm/java-8-oracle/jre/bin/java, -javaagent:/home/jishnu/manaf/appengine-java-sdk-1.9.62/lib/agent/appengine-agent.jar, -classpath, /home/jishnu/manaf/appengine-java-sdk-1.9.62/lib/appengine-tools-api.jar, com.google.appengine.tools.development.DevAppServerMain, --property=kickstart.user.dir=/home/jishnu/manaf/apprtc, /home/jishnu/manaf/apprtc/out/app_engine/.]
Feb 08, 2018 5:00:03 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Feb 08, 2018 5:00:06 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
SEVERE: Received exception processing /home/jishnu/manaf/apprtc/out/app_engine/WEB-INF/appengine-web.xml
com.google.apphosting.utils.config.AppEngineConfigException: Could not locate /home/jishnu/manaf/apprtc/out/app_engine/WEB-INF/appengine-web.xml
at com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:141)
at com.google.apphosting.utils.config.AppEngineWebXmlReader.readAppEngineWebXml(AppEngineWebXmlReader.java:75)
at com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:178)
at com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:417)
at com.google.appengine.tools.development.ApplicationConfigurationManager.<init>(ApplicationConfigurationManager.java:158)
at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:100)
at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:86)
at com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:142)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:338)
at com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:31)
at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:285)
at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:282)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:281)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:348)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:223)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:214)
Caused by: java.io.FileNotFoundException: /home/jishnu/manaf/apprtc/out/app_engine/WEB-INF/appengine-web.xml (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:137)
... 21 more

com.google.apphosting.utils.config.AppEngineConfigException: Invalid configuration
at com.google.appengine.tools.development.DevAppServerImpl.reportDeferredConfigurationException(DevAppServerImpl.java:435)
at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:232)
at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:219)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:368)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:223)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:214)
Caused by: com.google.apphosting.utils.config.AppEngineConfigException: Invalid appengine-web.xml(/home/jishnu/manaf/apprtc/out/app_engine/WEB-INF/appengine-web.xml) - Could not locate /home/jishnu/manaf/apprtc/out/app_engine/WEB-INF/appengine-web.xml
at com.google.apphosting.utils.config.EarHelper.readWebModule(EarHelper.java:180)
at com.google.appengine.tools.development.ApplicationConfigurationManager$WarModuleConfigurationHandle.readConfiguration(ApplicationConfigurationManager.java:417)
at com.google.appengine.tools.development.ApplicationConfigurationManager.<init>(ApplicationConfigurationManager.java:158)
at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:100)
at com.google.appengine.tools.development.ApplicationConfigurationManager.newWarConfigurationManager(ApplicationConfigurationManager.java:86)
at com.google.appengine.tools.development.DevAppServerImpl.<init>(DevAppServerImpl.java:142)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.google.appengine.tools.development.DevAppServerFactory.doCreateDevAppServer(DevAppServerFactory.java:338)
at com.google.appengine.tools.development.DevAppServerFactory.access$000(DevAppServerFactory.java:31)
at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:285)
at com.google.appengine.tools.development.DevAppServerFactory$1.run(DevAppServerFactory.java:282)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.DevAppServerFactory.createDevAppServer(DevAppServerFactory.java:281)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:348)
... 3 more

预期结果

根据文档,在此步骤之后,我们应该使用 http://localhost:443 成功访问 apprtc 应用程序网址。

我所执行的步骤的实际问题是什么?

最佳答案

com.google.apphosting.utils.config.AppEngineConfigException: Could not locate /home/jishnu/manaf/apprtc/out/app_engine/WEB-INF/appengine-web.xml

嗯,来自apprtc/src/app_engine/app.yaml看起来该应用程序是一个Python应用程序,而不是Java应用程序。 Python 应用程序没有 WEB-INF/appengine-web.xml

所以你需要:

这或多或少在您引用的源代码页的 apprtc README.md 中指定:

Running AppRTC locally requires Google App Engine SDK for Python,

...

Start the AppRTC dev server from the out/app_engine directory by running the Google App Engine SDK dev server,

<path to sdk>/dev_appserver.py ./out/app_engine

关于java - 我们无法使用 Google App Engine 启动 AppRTC 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48699750/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com