0

Java を使用して Windows Azure で最初のアプリケーションを開発しようとしています。ここのチュートリアルに従いました:

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

しかし、(チュートリアルで説明したように) Windows Azure Emulator でプロジェクトを実行すると、エミュレーターが無限ループに陥ります。エミュレータ コンソールの出力は次のとおりです。

[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 で Java EE (Juno) 用の Eclipse を使用しています。

ご協力いただきありがとうございます。

4

1 に答える 1

1

発生しているエラーに基づいて、Tomcat の展開に問題があるようです。次のエラーは特に明らかです: [WaWorkerHost.exe] java.exe is running... [WaWorkerHost.exe] java.exe stopped running - exiting...

これは、Tomcat が数秒間実行できたものの、何らかの理由でベイル アウトし、再起動が発生したことを示しています (起動時に障害が発生すると、Azure は再起動を試行し続けるため、無限に発生します)。

手順を正しく実行したことを既に確認している場合は、Tomcat が、PC 上の何かによって既に使用されているポートにバインドしようとしている可能性があります。デフォルトでは、Tomcat は 8080 にバインドしようとするため、それを変更していない場合は、PC に既に 8080 にバインドされているものが他にあるかどうかを確認する必要があります。マシンで実行している他のものは、エミュレーターで問題を起こす可能性があります)

しかし、それはただの勘です。Tomcat が報告しているエラーも表示できるとよいでしょう。Tomcat によってコンソール ウィンドウがポップアップ表示され、Tomcat のエラーが報告されているはずです。ここで提供できる情報がさらにある場合は、それが役立つ可能性があります。

于 2013-03-20T00:11:17.297 に答える