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

PID file problem #58

Closed
ejeffrey opened this issue Sep 24, 2015 · 4 comments
Closed

PID file problem #58

ejeffrey opened this issue Sep 24, 2015 · 4 comments

Comments

@ejeffrey
Copy link

The web server tries to save its PID in scalabrad-web-server/RUNNING_PID. If it can't write to that file, it fails:

Oops, cannot start the server.
java.io.FileNotFoundException: /usr/local/scalabrad-web-server-1.0-SNAPSHOT/RUNNING_PID (Permission denied)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
    at play.core.server.ProdServerStart$.createPidFile(ProdServerStart.scala:131)
    at play.core.server.ProdServerStart$.start(ProdServerStart.scala:45)
    at play.core.server.ProdServerStart$.main(ProdServerStart.scala:27)
    at play.core.server.ProdServerStart.main(ProdServerStart.scala)
  1. Does it really need a PID file? That is not standard procedure on windows, and on linux it is often handled by the 'start-stop-daemon' program
  2. If this is being used as a lock file, that doesn't seem necessary. Starting a second server on the same port will fail
  3. If it is needed, the location should be configurable so that it can go in /var/run
@maffoo
Copy link
Contributor

maffoo commented Sep 24, 2015

You can change the path of the pid file: https://www.playframework.com/documentation/2.4.x/ProductionConfiguration#Changing-the-path-of-RUNNING_PID

I would like to move away from play because we're not really using it for much (all the web server needs to do is serve some static files and handle web sockets), but it will be a bit of work to change that.

@DanielSank
Copy link
Member

+1 for this being annoying.

@adamcw
Copy link
Contributor

adamcw commented Jul 25, 2016

@maffoo Since #64 was closed, does that mean this can be closed too?

@adamcw adamcw closed this as completed Jul 25, 2016
@adamcw adamcw reopened this Jul 25, 2016
@maffoo
Copy link
Contributor

maffoo commented Jul 25, 2016

Yup, this is fixed.

@maffoo maffoo closed this as completed Jul 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants