【发布时间】:2015-03-22 15:27:31
【问题描述】:
我在构建/运行 first hybrid app 教程中的 HelloWorld 应用程序时遇到了一些问题。
当我尝试在 MobileFirst Development Server 上运行默认的 HelloWorld 应用程序时,在 MobileFirst Application Builder 有机会完成运行之前,服务器启动并似乎再次停止(没有错误)。这会导致应用程序无法部署并显示以下错误消息:
[2015-01-23 14:03:12] Failed to deploy application 'HelloWorld' to MobileFirst Server: org.apache.http.conn.HttpHostConnectException: Connect to 9.175.194.35:10080
[/9.175.194.35] failed: Connection refused: connect
我正在 Windows 7(64 位)上使用 Eclipse Kepler SR2(64 位)尝试此操作。我正在使用从 Oracle 下载的 Java 7 JDK 和从 Eclipse Marketplace 安装的 IBM MobileFirst Platform Studio (6.3.0)。
为了避免长/复杂的路径名,我已将 eclipse 安装到 C:\eclipsekepler 并使用工作区目录 C:\workspace。为了确保 Eclipse 使用正确的 JDK,我将以下内容放在我的 eclipse.ini 文件中(在 vmargs 之前):
-vm
C:\Program Files\Java\jdk1.7.0_75\bin\javaw.exe
在服务器配置中,我将主机名设置为我机器的 IP 地址 9.175.194.35(由运行 ipconfig 报告)。
以下是完整的控制台日志:
MobileFirst Console output:
[2015-01-23 14:01:25] Starting build process: application 'HelloWorld', all environments
[2015-01-23 14:02:53] Application 'HelloWorld' with all environments build finished.
[2015-01-23 14:02:53] Deploying application 'HelloWorld' with all environments to MobileFirst Server...
[2015-01-23 14:03:12] Failed to deploy application 'HelloWorld' to MobileFirst Server: org.apache.http.conn.HttpHostConnectException: Connect to 9.175.194.35:10080
[/9.175.194.35] failed: Connection refused: connect
MobileFirst Development Server console output (corporate network info redacted):
Listening for transport dt_socket at address: 10777
Launching worklight (WebSphere Application Server 8.5.5.3/wlp-1.0.6.cl50320140731-0257) on Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_75-b13 (en_US)
[AUDIT ] CWWKE0001I: The server worklight has been launched.
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications.
[WARNING ] SRVE9967W: The manifest class path jaxb-api.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path activation.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jsr173_1.0_api.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jaxb1-impl.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/HelloWorldProject/
[AUDIT ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/_MobileBrowserSimulator/
[AUDIT ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/IBMJMXConnectorREST/
[AUDIT ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/worklight-analytics/
[AUDIT ] CWWKZ0001I: Application _MobileBrowserSimulator started in 11.679 seconds.
[WARNING ] SRVE9967W: The manifest class path jaxb-api.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path activation.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jsr173_1.0_api.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jaxb1-impl.jar can not be found in jar file wsjar:file:/C:/workspace/MobileFirstServerConfig/servers/worklight/apps/worklight-management-ui.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[AUDIT ] CWWKZ0001I: Application WorklightAnalytics started in 19.007 seconds.
[AUDIT ] CWWKZ0001I: Application HelloWorldProject started in 21.164 seconds.
[AUDIT ] CWWKZ0022W: Application WorklightServices has not started in 30.003 seconds.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/worklightconsole/
[AUDIT ] CWWKZ0022W: Application WorklightConsole has not started in 30.015 seconds.
[AUDIT ] CWWKZ0001I: Application WorklightConsole started in 30.083 seconds.
[AUDIT ] CWWKZ0022W: Application WorklightAnalyticsServices has not started in 30.006 seconds.
[AUDIT ] CWWKF0015I: The server has the following interim fixes installed: PI23168.
[AUDIT ] CWWKF0011I: The server worklight is ready to run a smarter planet.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://<machine-name>.<connection-specific-DNS-suffix>:10080/worklightadmin/
[WARNING ] CWNEN0070W: The javax.ws.rs.QueryParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.PathParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.CookieParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.HeaderParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.core.Context annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.MatrixParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
我能够使用 MobileFirst CLI 成功运行等效操作:
cd C:\workspace\HelloWorldProject
mfp start
mfp build
mfp deploy
mfp console
我尝试使用 Eclipse Luna 和 Kepler 重新安装 JDK,重新安装 MobileFirst 工作室并从各种新的工作区开始,但似乎没有任何区别。有谁知道可能出了什么问题?谢谢。
更新
为了尝试强制 MobileFirst 使用 localhost,而不是将我的机器的 IP 地址解析为公司网络上的主机名,我断开了网络,这确实导致服务器在 127.0.0.1 上启动并且应用程序尝试部署到 127.0 .0.1。然而尽管如此,它仍然失败了。
我确实注意到 Mobile Application Builder 任务似乎进展到 20%,然后一直坐在那里,直到服务器自行停止,然后任务完成但由于服务器自行停止而无法部署。
这可能是性能问题吗?我正在使用 4GB RAM 的 Thinkpad T420 上进行尝试。
2015 年 1 月 27 日更新
我的一个同事在他的 ThinkPad 上安装了 Oracle JDK7、Eclipse Luna 和 IBM MobileFirst Platform Studio (6.3.0),在硬件/企业软件/网络设置上与我的相同,并且运行良好。这使我远离公司软件或公司网络设置,并指出配置问题或其他一些软件干扰。我再次尝试卸载所有内容,包括 JDK/JRE,使用 CCleaner 清理注册表,重新安装 JDK/JRE,使用默认设置重新安装 eclipse + mobilefirst。仍然没有成功部署。
【问题讨论】:
-
我意识到这不太可能,但是,服务器实际上正在监听 10080 是否有任何疑问?你能netstat并证明吗? Telnet 到吗?防火墙会干扰吗?我认识很多人都这样做过,所以我想知道您的环境中是否有什么特别之处。
-
@djna - 好问题,我刚刚使用资源监视器检查并确认 java.exe 侦听端口 10777、10443 和 10080。我的笔记本电脑正在运行 Symantec Endpoint Encryption,但我添加了 TCP 流量的例外在 10443 和 10080 上。似乎没有什么区别。我在家里的个人 Windows 机器上遵循了完全相同的安装过程,并且没有任何问题。正如你所说,我怀疑这是我的环境中的某些东西,我只是无法弄清楚是什么。
-
我在工作场所遇到了类似的问题,但在我的个人笔记本电脑上它工作正常
-
不可能,但既然你已经尝试了这么多东西......我总是通过在命令提示符中指定
JAVA_HOME和PATH=%JAVA_HOME%\bin;%PATH%并从那里启动 eclipse 来告诉 eclipse 我想要使用的 JDK .会不会是 Eclipse 在正确的 VM 上运行,但它的一些子进程在不同的版本中运行? -
@Xv。 - 感谢您的建议,我检查并已经设置了 JAVA_HOME 并包含在我的路径中。无论如何,我尝试通过命令行启动 eclipse,但没有明显区别。在这一点上,我已经放弃了让 eclipse studio 在这台笔记本电脑上工作。我的解决方法是在 Eclipse 中开发并使用 MFP 构建/部署应用程序并运行控制台。
标签: ibm-mobilefirst mobilefirst-studio