1
我無法讓我的應用程序在cloudfoundry.com上運行。我試着用Play 2.0.2生成的最簡單的Java應用程序。當我訪問mysampleplay.cloudfoundry.com時,出現nginx錯誤:502 Bad Gateway。在將默認Play 2.0 Java應用程序部署到cloudfoundry時發生502錯誤
我沒有報告崩潰,vcm日誌說我的服務正在運行。有什麼建議麼?
這是我鍵入指令:
C:\javadev\prj\play>play new sample
_ _
_ __ | | __ _ _ _| |
| '_ \| |/ _' | || |_|
| __/|_|\____|\__ (_)
|_| |__/
play! 2.0.2, http://www.playframework.org
The new application will be created in C:\javadev\prj\play\sample
What is the application name?
> sample
Which template do you want to use for this new application?
1 - Create a simple Scala application
2 - Create a simple Java application
3 - Create an empty project
> 2
OK, application sample is created.
Have fun!
C:\javadev\prj\play>cd sample
C:\javadev\prj\play\sample>ls
README app conf project public
C:\javadev\prj\play\sample>play clean dist
[info] Loading project definition from C:\javadev\prj\play\sample\project
[info] Set current project to sample (in build file:/C:/javadev/prj/play/sample/
)
[success] Total time: 0 s, completed 11-jul-2012 19:05:55
[info] Updating {file:/C:/javadev/prj/play/sample/}sample...
[info] Resolving org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Fin
[info] Done updating.
[info] Compiling 4 Scala sources and 2 Java sources to C:\javadev\prj\play\sample\target\scala-2.9.1\classes...
[info] Packaging C:\javadev\prj\play\sample\target\scala-2.9.1\sample_2.9.1-1.0-
SNAPSHOT.jar ...
[info] Done packaging.
Your application is ready in C:\javadev\prj\play\sample\dist\sample-1.0-SNAPSHOT
.zip
[success] Total time: 5 s, completed 11-jul-2012 19:06:00
C:\javadev\prj\play\sample>vmc push --path=dist\sample-1.0-SNAPSHOT.zip
Application Name: mysampleplay
Detected a Play Framework Application, is this correct? [Yn]: y
Application Deployed URL [mysampleplay.cloudfoundry.com]:
Memory reservation (128M, 256M, 512M, 1G, 2G) [256M]:
How many instances? [1]: 1
Bind existing services to 'mysampleplay'? [yN]: n
Create services to bind to 'mysampleplay'? [yN]: n
Would you like to save this configuration? [yN]: y
Manifest written to manifest.yml.
Creating Application: OK
Uploading Application:
Checking for available resources: OK
Processing resources: OK
Packing application: OK
Uploading (66K): OK
Push Status: OK
Staging Application 'mysampleplay': OK
Starting Application 'mysampleplay': OK
C:\javadev\prj\play\sample>vmc logs mysampleplay
====> /logs/stdout.log <====
No database found in Play configuration. Skipping auto-reconfiguration.
Play server process ID is 31827
[←[33mwarn←[0m] play - Plugin [org.cloudfoundry.reconfiguration.play.JPAPlugin]
is disabled
[←[37minfo←[0m] play - Application started (Prod)
[←[37minfo←[0m] play - Listening for HTTP on port 24712...
嗨威廉,有多少次你試圖部署應用程序?我遵循完全相同的步驟(儘管在MacOS上),應用程序部署得很好.. http://dhigham-play.cloudfoundry.com/ – 2012-07-11 17:54:42
只有一次。我與另一個我開發的應用程序遇到同樣的困難,並且我多次嘗試了這個應用程序。因爲它不起作用,我想我們先從一個簡單的應用程序開始。我正在使用Windows 8(發佈預覽) – 2012-07-11 18:02:55
您可以使用vmc將您部署的存檔發送到[email protected],我們將查看它。 – 2012-07-11 23:33:09