You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to start ruby REST API-Servers (sinatra) from systemd. This is in general not a problem, when defining it as a .service unit, running permanently, but keeps the daemons permanently running, even if seldomly used.
systemd therefore offers the .socket units (see man systemd.socket), where systemd acts like the good old inetd (for which the same problem exists), i.e. it can open an inet tcp (or in case of systemd, even a unix domain) socket, and once connected, launches the daemon, passing the socket either on stdin/stdout or via the sd_listen_fds(3), which is a pretty good way to have TCP oder unix domain services run on demand.
But I haven't seen options or documentation for rackup to run under systemd with a socket unit. One can pass a unix domain path name to rackup, but not to run under stdin/stdout or sd_listen_fds.
A first thought was to just run
rackup -o /dev/stdin
but this results in
`unlink': Permission denied @ apply2files - /dev/stdin (Errno::EACCES)
Connection refused - connect(2) for /dev/stdin (Errno::ECONNREFUSED)
Since systemd is a widely accepted service control system, there should be some integration of rackup into systemd with .socket units, and not just .service units having it continously run.
regards
The text was updated successfully, but these errors were encountered:
Hi,
this is a feature request.
I need to start ruby REST API-Servers (sinatra) from systemd. This is in general not a problem, when defining it as a .service unit, running permanently, but keeps the daemons permanently running, even if seldomly used.
systemd therefore offers the .socket units (see man systemd.socket), where systemd acts like the good old inetd (for which the same problem exists), i.e. it can open an inet tcp (or in case of systemd, even a unix domain) socket, and once connected, launches the daemon, passing the socket either on stdin/stdout or via the sd_listen_fds(3), which is a pretty good way to have TCP oder unix domain services run on demand.
But I haven't seen options or documentation for rackup to run under systemd with a socket unit. One can pass a unix domain path name to rackup, but not to run under stdin/stdout or sd_listen_fds.
A first thought was to just run
rackup -o /dev/stdin
but this results in
`unlink': Permission denied @ apply2files - /dev/stdin (Errno::EACCES)
Connection refused - connect(2) for /dev/stdin (Errno::ECONNREFUSED)
Since systemd is a widely accepted service control system, there should be some integration of rackup into systemd with .socket units, and not just .service units having it continously run.
regards
The text was updated successfully, but these errors were encountered: