[systemd-devel] Service unit issue: starts manually but doesn't start on boot

Peter Li chinasaurli at gmail.com
Fri Apr 19 22:01:41 PDT 2013


On 04/19/2013 04:16 AM, Colin Guthrie wrote:
<snip>
>> When I then run `systemctl start wsgw; systemctl status wsgw` I get:
>>
>>      wsgw.service - WebSockets Gateway for pianod
>>            Loaded: loaded (/usr/lib/systemd/system/wsgw.service; enabled)
>>            Active: active (running) since Thu, 18 Apr 2013 22:09:40
>>      -0700; 7ms ago
>>          Main PID: 2565 (wsgw)
>>            CGroup: name=systemd:/system/wsgw.service
>>                └ 2565 /usr/sbin/wsgw -p 8000 pianod,localhost,4445,text
> I suspect that on boot the network or name resolution is not available
> and your service is started "too soon".
<snip>

Thanks for your reply.  I'm now pretty sure the issue is that the 
service calls getaddrinfo(...) when it starts, and that returns 
EAI_NONAME if this is run too early in boot.  But I've now tried adding 
After=network.target and that doesn't seem to help; is there something 
else I need to wait for so that getaddrinfo() will succeed?

Thanks again,
P


More information about the systemd-devel mailing list