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

Service loops itself after installation, PlayFramework 2.4, debian package, ubuntu 14.04 #596

Closed
jCalamari opened this issue Jun 8, 2015 · 2 comments

Comments

@jCalamari
Copy link

I am trying to install debian package created by running sbt debian:packageBin with following command sudo dpkg -i package.deb, see output:

Selecting previously unselected package app.
(Reading database ... 303619 files and directories currently installed.)
Preparing to unpack app_0.1_all.deb ...
Unpacking app (0.1) ...
Setting up app (0.1) ...
Creating system group: app
Creating system user: app in app with app user-daemon and shell /bin/false
app start/running, process 26681
Processing triggers for ureadahead (0.100.0-16) ...

However service loops itself after successful installation, see syslog:

Jun  8 14:52:17 pedeb kernel: [23923.999444] init: app main process (29554) terminated with status 255
Jun  8 14:52:17 pedeb kernel: [23923.999450] init: app main process ended, respawning
Jun  8 14:52:17 pedeb kernel: [23924.333523] init: app main process (29628) terminated with status 255
Jun  8 14:52:17 pedeb kernel: [23924.333528] init: app main process ended, respawning
Jun  8 14:52:18 pedeb kernel: [23924.668559] init: app main process (29702) terminated with status 255
Jun  8 14:52:18 pedeb kernel: [23924.668565] init: app main process ended, respawning
Jun  8 14:52:18 pedeb kernel: [23925.009649] init: app main process (29776) terminated with status 255
Jun  8 14:52:18 pedeb kernel: [23925.009656] init: app main process ended, respawning
Jun  8 14:52:18 pedeb kernel: [23925.369446] init: app main process (29851) terminated with status 255
Jun  8 14:52:18 pedeb kernel: [23925.369452] init: app main process ended, respawning
Jun  8 14:52:19 pedeb kernel: [23925.718987] init: app main process (29926) terminated with status 255
Jun  8 14:52:19 pedeb kernel: [23925.718993] init: app main process ended, respawning
Jun  8 14:52:19 pedeb kernel: [23926.071162] init: app main process (30003) terminated with status 255
Jun  8 14:52:19 pedeb kernel: [23926.071168] init: app main process ended, respawning
Jun  8 14:52:20 pedeb kernel: [23926.406100] init: app main process (30078) terminated with status 255
Jun  8 14:52:20 pedeb kernel: [23926.406107] init: app main process ended, respawning
Jun  8 14:52:20 pedeb kernel: [23926.742082] init: app main process (30152) terminated with status 255
Jun  8 14:52:20 pedeb kernel: [23926.742088] init: app main process ended, respawning
Jun  8 14:52:20 pedeb kernel: [23927.109820] init: app main process (30226) terminated with status 255
Jun  8 14:52:20 pedeb kernel: [23927.109826] init: app main process ended, respawning
Jun  8 14:52:21 pedeb kernel: [23927.455432] init: app main process (30300) terminated with status 255
Jun  8 14:52:21 pedeb kernel: [23927.455439] init: app main process ended, respawning

build.sbt:

maintainer := "..."
packageSummary := "..."
packageDescription := "..."

I think it could be permission issue, /usr/share/app/ is created by root, however /etc/init/app.conf runs the service with app user.

@knshiro
Copy link

knshiro commented Jun 11, 2015

It is certainly that you need to add an dist/conf/application.ini with

-Dpidfile.path=/var/run/app/play.pid

If you look at https://github.com/sbt/sbt-native-packager/blob/master/src/sphinx/topics/play.rst you should be able to write -Dpidfile.path=/var/run/${{app_name}}/play.pid instead but it actually doesn't replace the variable so you have to hardcode it (cf #599).

@jCalamari
Copy link
Author

@knshiro Worked like a charm. Thanks.

@muuki88 muuki88 closed this as completed Jun 11, 2015
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

3 participants