> -----Original Message----- > From: Michal Schmidt [mailto:[email protected]] > Sent: Friday, November 04, 2011 07:20 > To: Michael D. Berger > Cc: [email protected] > Subject: Re: [systemd-devel] FW: pthread_create() fails SysV > in myDaemon on boot > > On Thu, 03 Nov 2011 12:41:05 -0400 Michael D. Berger wrote: > > However, in starting a TCP listener socket, from > "bind(...)" I now get > > EADDRNOTAVAIL which is explained in "man 2 bind", so I am still not > > operational. > > Do you use NetworkManager? The network interface may not be > up yet when your service starts. Does enabling > NetworkManager-wait-online.service > help? > > Have you considered using the IP_FREEBIND socket option to > avoid the need for ordering your service after network.target? See: > http://www.kernel.org/doc/man-pages/online/pages/man7/ip.7.html > > Michal > [...]
I applied the fix mentioned before: in /etc/systemd/system.conf, change #DefaultControllers=cpu into DefaultControllers= I then removed myDaemon.service to start in SysV, and after googing around, put this in my listener setup: int optOn = 1; setsockopt(getHandle(),IPPROTO_IP,IP_FREEBIND,&optOn,sizeof(optOn)) It worked. I now have myDaemon starting on boot, and working correctly. I am still hoping for additional information to get it working correctly in systemd, as mentioned in other posts. Thanks, Mike. -- Michael D. Berger [email protected] http://www.rosemike.net/ _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
