Skip to content
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

Upstart not working on Ubuntu 14.04: cannot create PID file #357

Closed
flowma opened this issue Sep 23, 2014 · 2 comments
Closed

Upstart not working on Ubuntu 14.04: cannot create PID file #357

flowma opened this issue Sep 23, 2014 · 2 comments

Comments

@flowma
Copy link
Contributor

flowma commented Sep 23, 2014

This is probably related to #164 .

  • Packaged a Play! 2.3.4 app with debian:packageBin. Works great.
  • DEB installs great in Ubuntu 14.04
  • Service gets started. Serves requests just fine.

Now, when I restart the the target machine, Ubuntu will re-populate /var/run . Then the Play! app tries to create the PID file, but it fails because the directory /var/run/{{app_name}} does not exist (I have -Dpidfile.path=/var/run/${{app_name}}/play.pid in src/templates/etc-default). /var/log/upstart/$app_name.log says

Exception in thread "main" java.io.FileNotFoundException: /var/run/$app_name/play.pid (No such file or directory)

Upstart is to be replaced with systemd on Ubuntu, so maybe it's not worth maintaining that code. But 14.04 is going to be around for a while, so it would be nice to have a working default or at least clearly documented workaround.

It work smoothly if I switch to SystemV in build.sbt:

import com.typesafe.sbt.packager.archetypes.ServerLoader.SystemV
maintainer in Linux := "Florian Marienfeld <f.marienfeld@willhoeft-it.com>"
@flowma
Copy link
Contributor Author

flowma commented Sep 23, 2014

Just noticed 14.04 is not officially supported. In that case, great that it works with the SysV workaround.

@muuki88
Copy link
Contributor

muuki88 commented Sep 23, 2014

Thanks for doing the researc in the tickets here :)
A similar problem was fixed in #201

I hope to add this to #348

flowma added a commit to flowma/sbt-native-packager that referenced this issue Sep 23, 2014
flowma added a commit to flowma/sbt-native-packager that referenced this issue Sep 23, 2014
flowma added a commit to flowma/sbt-native-packager that referenced this issue Sep 24, 2014
flowma added a commit to flowma/sbt-native-packager that referenced this issue Sep 24, 2014
muuki88 added a commit that referenced this issue Sep 28, 2014
changed template for /etc/init/{{app_name}} This seems to fix issue #357...
@muuki88 muuki88 closed this as completed Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants