[systemd-devel] question about socket activation
eshark
eshark77 at 163.com
Fri Dec 29 09:19:35 UTC 2017
Hi, All
I tried to test the socket activation by a simple foobar.socket and foobar.service, which are as the following:
foobar.socket:
[Socket]
ListenStream=/dev/socket/foobar
[Install]
WantedBy=sockets.target
foobar.service:
[Service]
Type=simple
ExecStart=/usr/bin/test-socket
Restart=no
I also wrote a simple program to connect to /dev/socket/foobar , in order to activitate the foobar.service.
When I ran the program, the foobar.service was started by systemd , and the foobar.socket changed from 'listening' state to 'running' state.
All works OK as expected, but when I killed the test-socket, it was started again by the systemd, even if I didn't run my program.
And from the system journal logs , I found that
"
Line 2035: 31,29604,571630004,-;systemd[1]: foobar.socket got notified about service death (failed permanently: no)
Line 2038: 31,29605,571630065,-;systemd[1]: foobar.socket changed running -> listening
Line 2050: 31,29609,571632385,-;systemd[1]: Incoming traffic on foobar.socket
Line 2056: 28,29611,571633087,-;systemd[1]: Cannot add dependency job for unit systemd-bus-proxyd.socket, ignoring: Unit systemd-bus-proxyd.socket failed to load: No such file or directory.
Line 2056: 28,29611,571633087,-;systemd[1]: Cannot add dependency job for unit systemd-bus-proxyd.socket, ignoring: Unit systemd-bus-proxyd.socket failed to load: No such file or directory.
Line 2065: 31,29614,571633544,-;systemd[1]: foobar.socket changed listening -> running
"
It seems that immediately after the death of foobar.service, some unknown incoming traffic on foobar.socket made the foobar.service started again by the systemd .
Could anyone give me some suggestion that who connected to the foobar.socket ? Any idea about how to debug this problem is very appreciated.
Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171229/fff05f39/attachment-0001.html>
More information about the systemd-devel
mailing list