>>>>> On Thu, 20 Oct 2005 14:23:59 -0500, Steve Greenland <[EMAIL PROTECTED]> >>>>> said:
Steve> So I battled my way through AIX configure/build process[1] and got Steve> bacula-fd built. Steve> However, the FD won't bind a specified address. It gets stuck in the Steve> bind() loop in bnet_server.c with EADDRNOTAVAIL, claiming that the Steve> address is not available. Steve> Now, I'm pretty sure that 127.0.0.1 is available, and I've tried various Steve> other addresses that were on the machine, no luck. I've run it under Steve> the debugger to confirm that it is, in fact, attempting to bind to the Steve> specified address. I modified the error message to include the Steve> address like this: Steve> berrno be; Steve> struct sockaddr_in sa; Steve> sa = *(struct sockaddr_in *) p->get_sockaddr(); Steve> if (tlog <= 0) { Steve> tlog = 10; /* Complain every 10 seconds */ Steve> Emsg3(M_WARNING,0, _("Cannot bind port %s:%d: ERR=%s. Retrying ...\n"), Steve> inet_ntoa(sa.sin_addr), ntohs(fd_ptr->port), be.strerror()); Steve> } Steve> And got the following message repeated: Steve> Warning: Cannot bind port 127.0.0.1:9102: ERR=Can't assign requested address. Retrying ... Steve> Letting it bind to INADDR_ANY (i.e. not specifying FDAddress) works Steve> fine, but isn't acceptable for my application. Steve> I see in the list archives that someone else ran into this on Windows, Steve> and people seemed to assume that it was the usual Windows brokeness. Steve> However, I can guarantee that AIX supports binding to a particular Steve> address, my code does it all the time. What's weird, of course, is that Steve> I use pretty much the same code that bnet_server does, so no obvious Steve> hint there. Steve> Anybody else run into this and, hopefully, fixed it? I can't provide Steve> access to this machine, but I'd be happy to run whatever tests/debugging Steve> I can do. A common reason for this problem is that the padding bytes at the end of the sockaddr_in object (called something like sin_zero) are not actually zero. Typically this happens when the code fails to initialize them. Unfortunately, there has been an outbreak of C++ in this code so it is impossible to be sure whether it does this :-( If you can look at the raw bytes passed to bind() in the debugger, then you might be able to see what they are. __Martin ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users