On Fri, 19.04.13 22:01, Peter Li (chinasau...@gmail.com) wrote: > 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?
On Fedora "systemctl enable NetworkManager-wait-online.service" might help. For a longer explanation see: http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget However, it might be worth figuring out why it calls getaddrinfo() at start-up. That already looks wrong and fragile. If you can fix that, then you don't have to make your boot dependent on unreliable external factors via NM-w-o.s. Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel