-
Notifications
You must be signed in to change notification settings - Fork 445
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
[sbt-native-packager 1.0.0] [play 2.3.8] Debian package installation uses wrong user to start #560
Comments
That's very interesting as the What OS are you running on? |
Ubuntu 14.04.2 LTS |
And you start the service with |
Actually I start the application with /etc/init.d/neeedo-api start I just found out that the only way to start my application successful is running the /etc/init.d/neeedo-api start script without sudo. If dpkg runs sudo service neeedo start after installation that should be the problem. Can I overwrite this? |
Hm. With Can you use the default |
Actually it shouldn't be a problem since |
I will try to create a smaller example project today. And I will also try to use upstart systemloader. Thanks for your help today. |
Ok I think I understand the issue now. The problem why the files are created by the root user is probably because I have to run dpkg with sudo and all further scripts invoked by this installation are then also run as root user. This explains why the running.pid file is then owned by root. |
I finally found the solution to my problem the issue can be closed. Sorry for the inconvenience the native packager is working correctly. My application is using environment variables in its config and when you run the start script with sudo as root user you have different environment variables. This led to the fact the the app couldn't start and unfortunately no error reporting was visible (I have to investigate further to see why because normally this should be reported). Thanks for your help... |
thanks for sharing :) |
I am creating a debian package of my Scala Play 2.3.8 application with the sbt native packager (
"com.typesafe.sbt" % "sbt-native-packager" % "1.0.0"
). The SystemV startscripts that are being generated use a custom user to start and stop the app which is exactly as intended.The problem is, that the installation with
dpkg -i package.deb
seems to start the app directly after the installation as root user. The/var/run/neeedo-app/running.pid
is then owned by the root user and all further stop or start attempts fail because this file cant be overwritten by the daemon user.This is my build.sbt:
I am running the dpkg install command also with the neeedo-app user. I don't understand why the running.pid file is created by the root user after installation. If I delete the file manually with sudo and use the start/stop script afterswords everything works fine.
Is this an issue with the deb package building process or is something wrong with my server environment? I can't figure it out. Help appreciated.
The text was updated successfully, but these errors were encountered: