redwulf
redwulf

Reputation: 1317

Play Framework 2.6 in Production mode doesn't seem to be doing anything

I'm trying to set up a play framework 2.6 application in production, but I'm struggling a bit with it.

I've tried both sbt dist and sbt stage, but when I run the server startup file with -Dplay.http.secret.key (generated as per https://www.playframework.com/documentation/2.6.x/ApplicationSecret), nothing really happens. I simply get a prompt with >, and if I check the logs, there's nothing happening there.

It doesn't seem the server is up at all. I tried http://localhost:9000, as well as https://localhost:9443, but I get the usual "Site can't be reached".

I tried to set up the property file myself with -Dconfig.resource and -Dconfig.file. I also made sure I had execution permission for my startup file.

None of it worked. What am I missing? Any extra configuration I need to specify to run it in production, either in build.sbt or application.properties?

I increased Play logging level to debug, and still see absolutely nothing.

Upvotes: 1

Views: 585

Answers (1)

Igmar Palsenberg
Igmar Palsenberg

Reputation: 647

Did you quote the secret ? The secret usually contains chars that have a special meaning in a shell, so you need to quote :

./app -Dplay.http.secret.key='M%>secret^^%%'

You're also free to put the secret in the application.conf.

Upvotes: 1

Related Questions