web app setup

10 views
Skip to first unread message

Romain Deltour

unread,
Jul 5, 2012, 8:12:16 AM7/5/12
to daisy-pip...@googlegroups.com
Hi Jostein,

I tried to setup the Web UI on a fresh Ubuntu box and it went rather smoothly following these steps:


- install Java: `sudo apt-get install openjdk-7-jdk`
- install mysql: `sudo apt-get install mysql-server`
- create the dp2webui DB: `mysqladmin create dp2webui -u root -p`
- install play from http://www.playframework.org/
- checkout the webui from github
- i downloaded play 2.02, I had to upgrade project/build.properties to 0.11.4 and project/plugins.sbt
- launched the pipeline in remote mode using `daisy-pipeline/bin/pipeline remote`
- ran `play run` in the webui directory
- followed the setup wizard, using the clientid/secretkey combination (which we'll have to remote from a production deployment)

It worked :)

Two issues:

1. Play gave me this stack trace when I created the admin account. We shouldn't have the password logged, and I don't know why it failed generating the HMAC.

[info] play - Application started (Dev)
[debug] application - formName : createAdmin
[debug] application - email : rdel...@gmail.com
[debug] application - repeatPassword : test
[debug] application - submit :
[debug] application - password : test
[debug] application - formName: createAdmin
[debug] application - formName : createAdmin
[debug] application - email : rdel...@gmail.com
[debug] application - repeatPassword : testtest
[debug] application - submit :
[debug] application - password : testtest
[debug] application - formName: createAdmin
[error] application - Could not sign request.
java.security.SignatureException: Failed to generate HMAC : null
at pipeline2.Pipeline2WS.calculateRFC2104HMAC(Pipeline2WS.java:248)
at pipeline2.Pipeline2WS.url(Pipeline2WS.java:197)
at pipeline2.Pipeline2WS.get(Pipeline2WS.java:66)
at pipeline2.Jobs.get(Jobs.java:37)
at Global$3.run(Global.java:102)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:94)
at akka.jsr166y.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1381)
at akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259)
at akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975)
at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1479)
at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
[ERROR] [07/05/2012 13:43:51.689] [application-akka.actor.default-dispatcher-4] [TaskInvocation] java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
at play.libs.XPath.selectNodes(XPath.java:29)
at pipeline2.models.Job.getJobs(Job.java:69)
at Global$3.run(Global.java:102)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:94)
at akka.jsr166y.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1381)
at akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259)
at akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975)
at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1479)
at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
Caused by: java.lang.NullPointerException
at org.jaxen.dom.DocumentNavigator.getDocumentNode(DocumentNavigator.java:445)
at org.jaxen.expr.DefaultAbsoluteLocationPath.evaluate(DefaultAbsoluteLocationPath.java:102)
at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:102)
at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:677)
at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:216)
at play.libs.XPath.selectNodes(XPath.java:27)
... 8 more



2. I quickly tried to shut down the Pipeline then the WebUI, and started again, my jobs data was lost. I've not looked further though.


Romain.

Jostein Austvik Jacobsen

unread,
Jul 5, 2012, 9:02:10 AM7/5/12
to daisy-pip...@googlegroups.com
Thanks!

I've just been through the same steps on my Ubuntu 12.04 in VirtualBox and I'm getting much the same results.

Yes, the version in the repository was using Play 2.0.1. I'll fix it in the repo tomorrow.

The form field are logged because you started Play using the "run" command, which means it starts in development/debugging mode. The "start" command is used for production, and shouldn't log the Logger.debug(...) statements. Those form fields probably shouldn't be logged even in development mode; I'll remove them as well tomorrow.

I also get the HMAC exception during startup (the second exception is probably a consequence of the first exception), but don't know the cause yet.

Do job persistance work by default in the framework or is it something that must be enabled? The Web UI only lists jobs that are in the framework.

I'm working on the installation/configuration instructions here: http://code.google.com/p/daisy-pipeline/wiki/WebUIInstallation

Jostein


2012/7/5 Romain Deltour <rdel...@gmail.com>

Romain Deltour

unread,
Jul 5, 2012, 9:14:59 AM7/5/12
to daisy-pip...@googlegroups.com

On 5 juil. 2012, at 15:02, Jostein Austvik Jacobsen wrote:

Do job persistance work by default in the framework or is it something that must be enabled? The Web UI only lists jobs that are in the framework.

It should work by default with the embedded Derby DB, but again I didn't have a closer look.

Romain.

Reply all
Reply to author
Forward
0 new messages