Debian package installation

56 views
Skip to first unread message

Naveen Gupta

unread,
Apr 27, 2017, 3:33:57 AM4/27/17
to Play Framework
Hi,

I created a debian package for my play 2.5.X application using commands at https://www.playframework.com/documentation/2.5.x/Deploying#Minimal-Debian-settings. I have successfull created the .deb file. 

When installing on server I get following error

Preparing to unpack siteman.deb ...
Unpacking medharbour-siteman (1.0.0) ...
Setting up medharbour-siteman (1.0.0) ...
Creating system group: medharbour-siteman
Creating system user: medharbour-siteman in medharbour-siteman with medharbour-siteman user-daemon and shell /bin/false
/var/lib/dpkg/info/medharbour-siteman.postinst: 9: /var/lib/dpkg/info/medharbour-siteman.postinst: initctl: not found
Failed to start medharbour-siteman.service: Unit medharbour-siteman.service not found.
medharbour-siteman could not be registered or started
Processing triggers for ureadahead (0.100.0-19) ...

The application doesnt starts as expected. 

Am I missing something when building the debian package ?

Will Sargent

unread,
Apr 27, 2017, 8:32:22 PM4/27/17
to play-fr...@googlegroups.com
That's probably something in your script -- the debian distribution is actually generated from sbt-native-packager:


so you can more information on that website.

--
Will Sargent
Engineer, Lightbend, Inc.


--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/f07aa2b4-b648-4c3f-8689-c28409b111ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Teo Klestrup Röijezon

unread,
Apr 28, 2017, 5:02:32 AM4/28/17
to Play Framework
initctl is for controlling Upstart daemons, but both Ubuntu and Debian use systemd these days (and Debian has never used Upstart to begin with).

To make it work, enable the SystemdPlugin, which tells sbt-native-packager to generate systemd units instead.

Teo Klestrup

unread,
Apr 28, 2017, 5:07:23 AM4/28/17
to play-fr...@googlegroups.com
Oh, and you'll also want to set pidfile.path=/dev/null, since PID
files haven't been relevant since the bad old days of Sysvinit.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Play Framework" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/play-framework/VW__Y2lEEhM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> play-framewor...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/play-framework/c67350a7-4ee9-4df8-8806-148ceb8c25b6%40googlegroups.com.

Naveen Gupta

unread,
Apr 28, 2017, 9:55:35 AM4/28/17
to Play Framework
Hi Teo,

Thanks for the headstart. The SystemdPlugin did the trick. 

The setting for PID file was already there. 

Naveen Gupta

unread,
Apr 29, 2017, 3:22:24 AM4/29/17
to Play Framework
Teo,

Can you guide me how to create different deb files for various environments(beta vs prod). Each of them would have different config files. 

I am not able to find something relevant to this.


On Friday, April 28, 2017 at 2:37:23 PM UTC+5:30, Teo Klestrup Röijezon wrote:
Reply all
Reply to author
Forward
0 new messages