gpt4 book ai didi

java - 在 Windows Azure 模拟器中启动角色实例时出现无限循环 : [WaWorkerHost. exe] 已退出,错误代码为 1

转载 作者:行者123 更新时间:2023-12-01 14:47:54 24 4
gpt4 key购买 nike

我正在尝试使用 Java 在 Windows Azure 上开发我的第一个应用程序。我按照这里的教程进行操作:

http://msdn.microsoft.com/en-us/library/windowsazure/hh690944.aspx

但是,当我在 Windows Azure 模拟器中运行该项目时(如教程中所述),模拟器陷入无限循环。这是模拟器控制台的输出:

[fabric] Role Instance: deployment18(8).WindowsAzureDeploymentProject.WorkerRole1.0
[fabric] Role state Started
[runtime] Role entrypoint . CALLING OnStart()
[runtime] Role entrypoint . COMPLETED OnStart()
[runtime] Role entrypoint . CALLING Run()
[WaWorkerHost.exe] java.exe is running...
[WaWorkerHost.exe] java.exe stopped running - exiting...
[WaWorkerHost.exe]
[WaWorkerHost.exe]
[WaWorkerHost.exe] Exited with error code 1.
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED
[runtime] Role instance recycling is starting
[fabric] Role state Stopping
[runtime] Role entrypoint . CALLING OnStop()
[runtime] Role entrypoint . COMPLETED OnStop()
[fabric] Role state Busy
[fabric] Role state Unhealthy
[fabric] Role state Started
[runtime] Role entrypoint . CALLING OnStart()
[runtime] Role entrypoint . COMPLETED OnStart()
[runtime] Role entrypoint . CALLING Run()
[WaWorkerHost.exe] java.exe is running...
[WaWorkerHost.exe] java.exe stopped running - exiting...
[WaWorkerHost.exe]
[WaWorkerHost.exe]
[WaWorkerHost.exe] Exited with error code 1.
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING OnStop()
[runtime] Role entrypoint . COMPLETED OnStop()
[runtime] Role entrypoint . CALLING OnStart()
[runtime] Role entrypoint . COMPLETED OnStart()
[runtime] Role entrypoint . CALLING Run()
[WaWorkerHost.exe] java.exe is running...
[WaWorkerHost.exe] java.exe stopped running - exiting...
[WaWorkerHost.exe]
[WaWorkerHost.exe]
[WaWorkerHost.exe] Exited with error code 1.
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING OnStop()
[runtime] Role entrypoint . COMPLETED OnStop()
[fabric] Role state Stopping
[fabric] Role state Busy
[fabric] Role state Started
[runtime] Role entrypoint . CALLING OnStart()
[runtime] Role entrypoint . COMPLETED OnStart()
[runtime] Role entrypoint . CALLING Run()
[WaWorkerHost.exe] java.exe is running...
[fabric] Role state Stopping
[WaWorkerHost.exe] java.exe stopped running - exiting...
[WaWorkerHost.exe]
[WaWorkerHost.exe]
[WaWorkerHost.exe] Exited with error code 1.
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING OnStop()
[runtime] Role entrypoint . COMPLETED OnStop()
[fabric] Role state Busy
[fabric] Role state Started
[runtime] Role entrypoint . CALLING OnStart()
[runtime] Role entrypoint . COMPLETED OnStart()
[runtime] Role entrypoint . CALLING Run()
[WaWorkerHost.exe] java.exe is running...
[WaWorkerHost.exe] java.exe stopped running - exiting...
[WaWorkerHost.exe]
[WaWorkerHost.exe]
[WaWorkerHost.exe] Exited with error code 1.
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED
[runtime] Role instance recycling is starting
[fabric] Role state Stopping
[runtime] Role entrypoint . CALLING OnStop()
[runtime] Role entrypoint . COMPLETED OnStop()
[fabric] Role state Busy
[fabric] Role state Started
[runtime] Role entrypoint . CALLING OnStart()
[runtime] Role entrypoint . COMPLETED OnStart()
[runtime] Role entrypoint . CALLING Run()
[WaWorkerHost.exe] java.exe is running...
[WaWorkerHost.exe] java.exe stopped running - exiting...
[WaWorkerHost.exe]
[WaWorkerHost.exe]
[WaWorkerHost.exe] Exited with error code 1.
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED
[runtime] Role instance recycling is starting
[fabric] Role state Stopping

我在 Windows 8(32 位)、JDK 7 和 Tomcat 7 上使用 Eclipse for Java EE (Juno)。

感谢您的帮助。

最佳答案

根据您收到的错误,您的 Tomcat 部署似乎存在问题。以下错误尤其具有启发性:[WaWorkerHost.exe] java.exe 正在运行...[WaWorkerHost.exe] java.exe 停止运行 - 退出...

这表明 Tomcat 确实运行了几秒钟,但随后由于某种原因退出,从而导致重新启动(无限,因为每当启动失败时,Azure 都会继续尝试重新启动)。

如果您已经确保正确执行了这些步骤,那么您想到的另一件事是 Tomcat 可能正在尝试绑定(bind)到已被您 PC 上的某些内容占用的端口。默认情况下,Tomcat 会尝试绑定(bind)到 8080,因此如果您没有更改这一点,那么需要检查的一件事是您的 PC 上是否有其他任何东西已经绑定(bind)到 8080。(模拟器不会为您的部署。您计算机上运行的其他内容可能会破坏模拟器中的内容)

但这只是一种预感。如果您还可以看到 Tomcat 报告的错误,那就太好了。您应该(哪怕只是短暂地)看到 Tomcat 弹出一个控制台窗口,其中报告了 Tomcat 的错误。如果您可以在此处提供更多信息,那可能会有所帮助。

关于java - 在 Windows Azure 模拟器中启动角色实例时出现无限循环 : [WaWorkerHost. exe] 已退出,错误代码为 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15233037/

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