1

I'm new to Cloudbees. I'm following the instructions here: https://developer.cloudbees.com/bin/view/RUN/Playframework

I can run the play web app without an issue on local. In addition, I've successfully deployed to Heroku, but switched to Cloudbees when I learned websockets was not supported.

However, I'm getting a 504 Gateway Time-out when I try to deploy to cloudbees. Am I missing a step? I was under the impression using the Cloudbees SDK allows me to deploy without using the SBT plugin.

C:\play-2.1.0\samples\java\websocket-chat>play dist
[info] Loading project definition from C:\play-2.1.0\samples\java\websocket-chat
\project
[info] Set current project to websocket-chat (in build file:/C:/play-2.1.0/sampl
es/java/websocket-chat/)
[info] Wrote C:\play-2.1.0\samples\java\websocket-chat\target\scala-2.10\websock
et-chat_2.10-1.0.pom

Your application is ready in C:\play-2.1.0\samples\java\websocket-chat\dist\webs
ocket-chat-1.0.zip

[success] Total time: 4 s, completed Jun 20, 2013 2:53:34 PM

C:\play-2.1.0\samples\java\websocket-chat>bees app:deploy -a my_username/chatroom
 -t play2 dist/websocket-chat-1.0.zip
Deploying application my_username/chatroom (environment: ): dist\websocket-chat-1
.0.zip
Application parameters: {containerType=play2}
........................uploaded 25%
........................uploaded 50%
........................uploaded 75%
........................upload completed
deploying application to server(s)...
Application my_username/chatroom deployed: http://chatroom.my_username.cloudbees.n
et

C:\play-2.1.0\samples\java\websocket-chat>bees app:proxy:update -a my_username/cha
troom1 httpVersion=1.1
Are you sure you want to update this application proxy [my_username/chatroom]: (y
/n) y
application proxy for my_username/chatroom : updated

C:\play-2.1.0\samples\java\websocket-chat>
4

2 回答 2

1

If you run

bees app:tail -a username/appname

and take a look at the logs - it may shed some light. Also - you can unzip the dist locally - and try running that. Running from the dist can sometimes be slightly different from running from the play command (which is unfortunate that play works that way, and Heroku run it in non production mode).

But the log should shed some light - otherwise, if you can open a ticket with your account then we can look into the specifics (so you don't have to say it here!).

于 2013-06-21T02:08:04.967 回答
1

I was able to deploy using the SBT method described in the Cloudbees documentation: https://developer.cloudbees.com/bin/view/RUN/Playframework This document is fairly comprehensive.

To be fair, installing the Cloudbees SDK helped so I didn't have to install config files when setting up with the SBT plugin.

However, I turned to the git hub project for the configuration of SBT, as the Cloudbees documentation may be slightly behind. The sbt-cloudbees-play-plugin code/docs can be found here: https://github.com/CloudBees-community/sbt-cloudbees-play-plugin

I must admit I don't complete understand the deployment using SBT. My project now successfully appears on the web (and works with websockets!), yet I still got these command line outputs. I'm not sure if it'll affect performance at the moment. I've included it below for reference, skipping uninteresting sections with ellipsis notation.

java.lang.ExceptionInInitializerError
        at cloudbees.Plugin$.cloudbees$Plugin$$performDeploy(cloudbees.scala:236
)
        at cloudbees.Plugin$$anonfun$deployTask$1.apply(cloudbees.scala:108)
        at cloudbees.Plugin$$anonfun$deployTask$1.apply(cloudbees.scala:105)

...

Caused by: edu.stanford.ejalbert.exception.BrowserLaunchingInitializingException
: unable to find config file: /edu/stanford/ejalbert/launching/windows/windowsCo
nfig.properties

...

WARNING

Looks like you are using a deprecated version of Play's SBT Project (PlayProject
 in project/Build.scala).
We are adding all of the new Play artifacts to your libraryDependencies for now
but consider switching to the new API (i.e. play.Project).

For any migration related issues, please consult the migration manual at http://
www.playframework.org
...
于 2013-06-21T09:12:21.320 回答