-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stale PID file prevents service from starting with Upstart #377
Comments
Take a look at the
Running the app with |
Well, I'm trying to get my head around this... @muuki88 I tried the packaging procedure with vanilla Play 2.3.5 app, and as you've said I got the following error: Fine. But there are two things that bothers me:
Also, do I understand correctly, that for the application to write pid-file properly, I should create a
|
Yes it should, but play application knows nothing about packaging. And because of this we have 2 pidfiles - one created by /etc/init script and second created by play application itself. Currently you could only specify pidfile directory explicitly in |
Unfortunately yes. Running play and deploying play are currently two different beasts. I'm still not sure if the playframework should provide a default-etc which fixes this. @huntc @jroper WDYT?
By default play uses the current path of execution to create the PID, which is okay. That's why you can specify a system prop to change this behaviour.
That's correct. I would recommend that as you can specify all other runtime settings there as well, e.g. memory, logging configurations and other JVM options. |
A small remark in the docs definitely won't hurt! |
I also had this problem now and it took my a long time to figure out. I think this could be documented a little better on original Play frameworks documentations page. |
Do I understand this correctly that if the JVM dies (oom, ...) the PID file sticks around, on restart play finds it but has no way to check if the process is still alive so it bails out. |
I'm running into this issue and did not understand exactly how to fix it. I do not have a src folder but an app folder. In play 2.5, should I add a src/templates/etc-default for this purpose only? |
The best solution is to let play not handle the pid file. Simply add this to your start configuration
e.g. in yourr javaOptions in Universal += "--Dpidfile.path=/dev/null" or in your
|
Hi @ALL: I am trying to run my play application as standalone (as explained here https://www.playframework.com/documentation/2.5.x/Deploying). I've already created a binary distribution using sbt assembly plugin, but every time i try to start the app, I got the following error and I do not know what is happening
thanks |
Hi, Thanks for your question. This is unfortunately the wrong place as you have an issue with sbt-assembly, play and typesafe config, not with sbt-native-packager. Also this issue here is unrelated. Use Stackoverflow for this kind of question. Issues are for bug reports and feature requests. Also include your build configuration and how you start your application, so people can help you. |
I'm trying to package my Play 2 App as a .deb package, and have certain difficulties on the way.
Don't know if doing something wrong, but the story is:
debian:packageBin
task.sudo dpkg -i target/the_app.deb
. At this point my application starts and writes its PID to/usr/share/the_app/RUNNING_PID
(assume the PID is 1415)./usr/share/the_app/RUNNING_PID
it is still 1415 (dead process from step 2.) and app is not running (I expected it should autostart because ofstart on runlevel [2345]
in init config).sudo service the_app start
I get a flapping service and a stream ofin
/var/log/upstart/the_app.log
.I'm using Play 2.3.4, Scala 2.11.1.
All the experiments were made on a clean Ubuntu 12.04.
I don't use any custom packaging configuration, except required minimum (maintainer, summary, description, daemonUser and daemonGroup).
The text was updated successfully, but these errors were encountered: