Questions tagged [socket-activation]

systemd socket activation...saves on server resources by listening with a socket instead of a full blown process. Then when a request is made the server can spin up the actual service.

Filter by
Sorted by
Tagged with
1 vote
0 answers

How to get different UID using Dynamic Users with socket activation?

I'm following the Dynamic Users with systemd post and creating the waldo.socket and waldo.service. Here is my waldo.socket. [Socket] ListenStream=2048 Accept=yes And the corresponding [email protected] [...
Steve Schnepp's user avatar
0 votes
2 answers

podman Error: wrong number of file descriptors for socket activation protocol (2 != 1)

I'm encountering what seems like a bug with the socket activation mechanism for podman, though I'm not sure if the issue is podman or systemd. I created an alternative managed socket unit for the ...
Charles Langlois's user avatar
0 votes
1 answer

How to Activate a Mount of a Remote Share When Its Machine Connects?

How can one activate a mount of a remote SMB share when the remote machine connects? This is more about discerning a local event triggered by the connection of a particular remote machine, than it is ...
ebsf's user avatar
  • 291
0 votes
1 answer

How to restrict the access/activation times for a service/socket with systemd?

I have a simple systemd service that is activated by system socket. It's as simple as that (a little simplified): $ systemctl cat example.socket # /usr/lib/systemd/system/example.socket [Unit] ...
rugk's user avatar
  • 2,906
1 vote
0 answers

Can systemd be used as an inetd/xinetd replacement without being an init?

Can systemd be configured (in runtime or compile time) to serve as a simple process supervisor, not as /sbin/init? If yes, are there tutorials and other documentation to follow to make customized non-...
Vi.'s user avatar
  • 5,568
1 vote
1 answer

Systemd socket-based-activation service fails due to "start request repeated too quickly"

I have the following units: test_socket_activation.socket [Unit] Description="************** MY TEST SOCKET ***************" PartOf=test_socket_activation.service [Socket] ListenStream=
Lawless Leopard's user avatar
0 votes
2 answers

Manually stopped service is not properly stopped

I have a Server, that is supposed to activate if someone tries to connect to it. For this I created a systemd socket and service that builds a proxy for my server and starts it. Thanks to this ...
Rennsemmel01's user avatar
1 vote
1 answer

How to specify the service template name when using socket activation with Accept=yes

I have multiple .socket files, they listen with Accept=yes. They should all use the same service template to process connections. By default systemd looks for a service template with the same name as ...
JanKanis's user avatar
  • 1,049
2 votes
1 answer

Systemd socket activation stdin

I have to tranfer a legacy xinetd config to systemd. The requirement is to open a tcp port and listen to incoming transmissions. An application transfers one file per connection simply by netcating it ...
baneus's user avatar
  • 51
3 votes
1 answer

Systemd socket activation: kill bash script when closing socket

Assuming a minimal example like in this question, except for another shell script. [email protected]: [Unit] Description=Foo Service systemfoo.socket Requires=systemfoo.socket ...
gerion's user avatar
  • 133
7 votes
4 answers

How do I make systemd sockets close when service is stopped?

I'm currently trying to make a systemd service with two Fifo sockets. These sockets map to stdout and stdin of the application. I'm currently using the following configuration files. foo.service [...
Rene's user avatar
  • 171
12 votes
3 answers

Deactivate a systemd service after idle time

I want a service to start on demand rather than on boot. To do that I could use systemd socket activation (with the service and socket files). But this is a resource limited server, so after some ...
lonix's user avatar
  • 1,669
8 votes
2 answers

systemd "socket activation" vs xinetd

I use xinetd and it works for my purposes. However I recently discovered that systemd has something built in called "socket activation". These two seem very similar, but systemd is "official" and ...
lonix's user avatar
  • 1,669
25 votes
4 answers

On-demand SSH Socks proxy through systemd user units with socket-activation doesn't restart as wished

To reach an isolated network I use an ssh -D socks proxy. In order to avoid having to type the details every time I added them to ~/.ssh/config: $ awk '/Host socks-proxy/' RS= ~/.ssh/config Host ...
Alex Stragies's user avatar
3 votes
1 answer

How to configure systemd to turn a simple script with standardIO in a network service

I'm trying to setup a bash script as a network service listening on tcp port 6666. But service fail at startup with this errors : heartbeat]# systemctl status heartbeat.service ● heartbeat.service - ...
xoubih's user avatar
  • 71
3 votes
1 answer

Systemd socket activation proxy?

I have systemd setup, and it runs: nginx.service on :80 wikiname.socket :8080 wikiname.service :9094 So here is what I do... I check if wikiname.service is running...and it is not. I start the ...
leeand00's user avatar
  • 4,535