You are not logged in.
I've got a stdio Lua script that I have hooked up to a systemd socket associated with a template unit called datalogger@.service. If I connect to it with nc only one run at a time, it runs OK. However, if I make four connections one right after another, systemd does not launch four instances of the unit in parallel. Instead, I get an error on the second and fourth runs (ports 41607 and 41611).
[john@catbert ~]$ ls Documents/2015/08/datalogger/collectors/
cable_modem.lua iptables_counts.lua stellarpad_curl.lua wifi.lua
[john@catbert ~]$ for f in Documents/2015/08/datalogger/collectors/* ; do $f | nc -c localhost 8072; done
Aug 24 22:12:45 catbert systemd[1]: Started 127.0.0.1:41605.
Aug 24 22:12:46 catbert systemd[1]: datalogger@20-127.0.0.1:8072-127.0.0.1:41607.service: Failed to run 'start' task: Transport endpoint is not connected
Aug 24 22:12:46 catbert systemd[1]: Failed to start 127.0.0.1:41607.
Aug 24 22:12:46 catbert systemd[1]: datalogger@20-127.0.0.1:8072-127.0.0.1:41607.service: Unit entered failed state.
Aug 24 22:12:46 catbert systemd[1]: datalogger@20-127.0.0.1:8072-127.0.0.1:41607.service: Failed with result 'resources'.
Aug 24 22:12:46 catbert systemd[1]: Started 127.0.0.1:41609.
Aug 24 22:12:46 catbert systemd[1]: datalogger@22-127.0.0.1:8072-127.0.0.1:41611.service: Failed to run 'start' task: Transport endpoint is not connected
Aug 24 22:12:46 catbert systemd[1]: Failed to start 127.0.0.1:41611.
Aug 24 22:12:46 catbert systemd[1]: datalogger@22-127.0.0.1:8072-127.0.0.1:41611.service: Unit entered failed state.
Aug 24 22:12:46 catbert systemd[1]: datalogger@22-127.0.0.1:8072-127.0.0.1:41611.service: Failed with result 'resources'.
[root@catbert ~]# cat /etc/systemd/system/datalogger.socket
[Socket]
ListenStream=8072
Accept=yes
[Install]
WantedBy=sockets.target
[root@catbert ~]# cat /etc/systemd/system/datalogger@.service
[Service]
User=john
StandardInput=socket
StandardOutput=journal
StartLimitBurst=100
ExecStart=/usr/bin/logger.lua /var/lib/datalogger/d.db
[root@catbert ~]# pacman -Q systemd
systemd 224-1
What does this "Transport endpoint is not connected" error mean?
Any way I can ensure that all four instances get launched in parallel?
Offline