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.
Questions tagged [socket-activation]
16 questions
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 socks-proxy
Hostname pcit
BatchMode yes
…
Alex Stragies
- 5,857
- 2
- 32
- 56
11
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 time (e.g. 1 hour) of inactivity, I want to stop the…
lonix
- 1,639
- 18
- 32
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 seems like the better choice.
However before using…
lonix
- 1,639
- 18
- 32
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
[Unit]
Description=foo Fifo test
After=network.target…
Rene
- 171
- 1
- 2
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
After=network.target systemfoo.socket
Requires=systemfoo.socket
[Service]
Type=oneshot
ExecStart=/bin/bash…
gerion
- 133
- 2
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 - Service de collecte des signaux de vie
Loaded:…
xoubih
- 71
- 1
- 6
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 wikiname.socket unit.
I visit http://wikiserver:8080/…
leeand00
- 4,443
- 10
- 51
- 78
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 to the port. When a transmission is registered,…
baneus
- 51
- 6
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]
[Service]
ExecStart=-sleep…
Steve Schnepp
- 111
- 3
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-init-systemd setups?
If no, what other thing…
Vi.
- 5,528
- 7
- 34
- 68
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 the socket, but as I have multiple socket files I…
JanKanis
- 1,019
- 2
- 12
- 17
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 podman service in order to expose the standard…
Charles Langlois
- 181
- 1
- 6
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 about the action taken on that event. What can…
ebsf
- 271
- 2
- 11
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]
Description=Example Server…
rugk
- 2,806
- 6
- 28
- 58
0
votes
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…
Lawless Leopard
- 77
- 1
- 8