[Debian-med-packaging] Help with systemd to start shiny-server needed

James Cowgill jcowgill at debian.org
Fri Mar 24 16:32:25 UTC 2017


Hi,

On 24/03/17 15:21, Andreas Tille wrote:
> I intend to package shiny-server and have prepared some preliminary
> packaging in Debian Med Git[1].  When trying to install the resulting
> package I get:
> 
> 
> $ sudo dpkg -i ./shiny-server_1.5.0.831+dfsg-1_amd64.deb 
> (Reading database ... 582729 files and directories currently installed.)
> Preparing to unpack .../shiny-server_1.5.0.831+dfsg-1_amd64.deb ...
> Unpacking shiny-server (1.5.0.831+dfsg-1) over (1.5.0.831+dfsg-1) ...
> Setting up shiny-server (1.5.0.831+dfsg-1) ...
> User 'shiny' already exists. Ensuring proper permissions on /home/shiny.
> Job for shiny-server.service failed because of unavailable resources or another system error.
> See "systemctl status shiny-server.service" and "journalctl -xe" for details.
> invoke-rc.d: initscript shiny-server, action "start" failed.
> ● shiny-server.service - ShinyServer
>    Loaded: loaded (/lib/systemd/system/shiny-server.service; enabled; vendor preset: enabled)
>    Active: failed (Result: resources) since Fri 2017-03-24 16:20:31 CET; 18ms ago
>   Process: 22246 ExecStopPost=/bin/sleep 5 (code=exited, status=0/SUCCESS)
>   Process: 22241 ExecStartPost=/bin/sleep 3 (code=exited, status=0/SUCCESS)
>   Process: 22239 ExecStart=/bin/bash -c /usr/bin/shiny-server --pidfile=/var/run/shiny-server.pid >> /var/log/shiny-server.log 2>&1 (code=exited, status=0/SUCCESS)
>  Main PID: 22239 (code=exited, status=0/SUCCESS)
>       CPU: 7ms
> 
> Mar 24 16:20:23 sputnik systemd[1]: Starting ShinyServer...
> Mar 24 16:20:26 sputnik systemd[1]: shiny-server.service: PID file /var/run/shiny-server.pid not readable (yet?) after start-post: No such file or directory
> Mar 24 16:20:31 sputnik systemd[1]: Failed to start ShinyServer.

Do you know that ShinyServer actually started correctly? What does the
log say. The fact that it exited quickly looks suspicious.

shinyserver.service:
> [Service]
> TimeoutStartSec=10
> ExecStart=/bin/bash -c '/usr/bin/shiny-server --pidfile=/var/run/shiny-server.pid >> /var/log/shiny-server.log 2>&1'

Why does stdout / stderr need redirecting? This is probably why the real
error message was never printed (systemd knows nothing about this log file).

> # Needed to give SS a chance to write out to the PID file.
> ExecStartPost=/bin/sleep 3
> PIDFile=/var/run/shiny-server.pid
> Type=simple

Does using "Type=simple" and "PIDFile=..." together make any sense?
Using "sleep 3" to wait for the PID file to be created seems like a huge
hack.

What happens if you use something simple like this?
[Service]
Type=simple
ExecStart=/usr/bin/shiny-server

Thanks,
James

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20170324/806e0fb3/attachment.sig>


More information about the Debian-med-packaging mailing list