Reputation: 1000
I have distributed my application to a Linux (Ubuntu). When I attempt to run the file in the bin folder from the server, I receive this error:
Oops, cannot start the server.
java.io.FileNotFoundException: /opt/co-assist/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)
I saw a few posts on this error, but nothing that fixes my issue.
I have tried creating the application.ini file and adding the play.pid file, but I am guessing that is not the fix: https://playframework.com/documentation/2.5.x/Deploying#Play-PID-Configuration
I also saw this: https://www.playframework.com/documentation/2.5.x/ProductionConfiguration#Changing-the-path-of-RUNNING_PID
I am not sure how to get this set up correctly -- does anyone know if there are more detailed instructions I could follow?
I appreciate the help...
Upvotes: 2
Views: 1910
Reputation: 1000
I used the answer from this post: Play change RUNNING_PID file path
Adding this to my application.conf file:
play.server.pidfile.path=/var/run/RUNNING_PID
worked like a charm!
Upvotes: 1