bind(): Can't assign requested address
Anatoly Vorobey
mellon at pobox.com
Mon Nov 22 17:48:45 PST 2004
On Mon, Nov 22, 2004 at 05:23:03PM -0800, Dave Roe wrote:
> Okay, this is just the man page, so I figured I could still proceed,
> but I am unable to start memcached using "sudo /usr/local/bin/memcached
> -l 127.0.0.1 -p 11211 -m 64 -d". It fails with:
>
> bind(): Can't assign requested address
> failed to listen
Please try this patch and tell me if it helps. I don't have an OS X
machine to test it with.
--- cvs/wcmtools/memcached/memcached.c 2004-09-13 16:25:42.000000000
-0700
+++ src/memcached/memcached.c 2004-11-22 17:45:57.000000000 -0800
@@ -1143,6 +1143,7 @@
setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof(flags));
#endif
+ memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(port);
addr.sin_addr = settings.interface;
--
avva
"There's nothing simply good, nor ill alone" -- John Donne
More information about the memcached
mailing list