[CalendarServer-users] DCS Rhel6 install: Address family not supported by protocol

Andre LaBranche dre at apple.com
Tue Jul 9 18:25:49 PDT 2013


Hi James,

I don’t know exactly what is wrong here, but I agree that it looks like an IPv6 issue. We don’t have an explicit configuration setting for ipv4 / ipv6, but there is a BindAddress setting that influences this behavior.

http://trac.calendarserver.org/changeset/8949

Full context in trunk:

http://trac.calendarserver.org/browser/CalendarServer/trunk/calendarserver/tap/caldav.py#L1112

Try setting BindAddress to your server’s ipv4 address, or a hostname which resolves to (only) an ipv4 address. Note especially that ‘localhost’ might resolve to both v4 and v6.

If that doesn’t work, you could experiment with altering the logic in caldav.py, perhaps to ensure it never returns ["", "::”], but rather only [“”].

HTH,
-dre

On Jul 9, 2013, at 4:24 PM, James Rowe <jroweboy at gmail.com> wrote:

> I'm currently working on installing Darwin calendar server on a live rhel-6 server for an internal network and I'm struggling to get it working properly. I'm unsure what this is caused by and since I was unable to find anyone with a similar problem, I decided it best to come and ask on the mailing list. After building and installing DCS 4.2 on the server, I ran the start command as /usr/bin/caldavd -u caldavd -g caldavd -XL so I can see the output straight on the terminal. caldavd is the owner of all the files in the configuration directories. It then loads like I would expect it to, spitting out some information about no database update needed, memcached started properly, and some other things that I don't really think is relevant, but I can provide these logs if needed. The problem comes into play when I attempt to browse to port 8008 from a remote machine. Using the hostname of the server and port 8008 on my machine produces the following error and sends back a 500 error (note that I added the host is %s line to the code to help me resolve the issue) 
> 
> 2013-07-09 16:41:26-0600 [-] [caldav-0]  [HTTPChannel,1,::ffff:192.168.105.109] [twext.web2.server#info] GET / HTTP/1.1
> 2013-07-09 16:41:26-0600 [-] [caldav-0]  [HTTPChannel,1,::ffff:192.168.105.109] [twext.web2.channel.http#warn] host is IPv6Address(TCP, '::ffff:192.168.105.57', 8008)
> 2013-07-09 16:41:26-0600 [-] [caldav-0]  [HTTPChannel,1,::ffff:192.168.105.109] Unhandled error in Deferred:
> 2013-07-09 16:41:26-0600 [-] [caldav-0]  [HTTPChannel,1,::ffff:192.168.105.109] Unhandled Error
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	Traceback (most recent call last):
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	Failure: twisted.internet.error.ConnectError: An error occurred while connecting: 13: Permission denied.
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	
> 2013-07-09 16:41:26-0600 [-] [caldav-0]  [HTTPChannel,1,::ffff:192.168.105.109] [twext.web2.server#info] Exception rendering:
> 2013-07-09 16:41:26-0600 [-] [caldav-0]  [HTTPChannel,1,::ffff:192.168.105.109] [twext.web2.server#error] [Failure instance: Traceback: <class 'socket.error'>: Address family not supported by protocol
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	/usr/lib64/python2.6/site-packages/twext/web2/channel/http.py:819:lineReceived
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	/usr/lib64/python2.6/site-packages/twext/web2/channel/http.py:1155:lineReceived
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	/usr/lib64/python2.6/site-packages/twext/web2/channel/http.py:259:lineReceived
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	/usr/lib64/python2.6/site-packages/twext/web2/channel/http.py:537:processRequest
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	--- <exception caught here> ---
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	/usr/lib64/python2.6/site-packages/twext/web2/server.py:366:process
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	/usr/lib64/python2.6/site-packages/twext/web2/server.py:328:_fixupURLParts
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	/usr/lib64/python2.6/site-packages/twext/web2/channel/http.py:644:getHostInfo
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	/usr/lib64/python2.6/site-packages/twext/web2/channel/http.py:137:_cachedGetHostByAddr
> 2013-07-09 16:41:26-0600 [-] [caldav-0] 	]
> 
> What it seems to be to me is that the server is trying to bind to an IPv6 address and my os on the server is responding "Permission denied" (Could that be an SELinux thing? I'm not too familiar with IPv6). As another step in debugging this, I decided to use lynx on the machine and visit localhost:8008, to which I found that twext served the page that I expected and posted the following into the log.
> 
> 2013-07-09 16:46:40-0600 [-] [caldav-0]  [HTTPChannel,2,::1] [twext.web2.server#info] GET / HTTP/1.0
> 2013-07-09 16:46:40-0600 [-] [caldav-0]  [HTTPChannel,2,::1] [twext.web2.channel.http#warn] host is IPv6Address(TCP, '::1', 8008)
> 
> For reference, my caldavd.plist file contains an empty server name which says to me that it should use the hostname. Explicitly adding the hostname didn't change anything nor did explicitly adding the IPv4 address of the server. Also, I did open the port in iptables before you ask. I have successfully served data through that port by a simple python -m SimpleHTTPServer 8008 and I could access that from my browser on another machine.
> 
> Any advice on how to allow a remote computer the ability to visit that page would be greatly appreciated! I'm almost at wits end with trying to figure out why the host is an IPv6Address and why I'm unable to connect. 
> 
> James
> _______________________________________________
> calendarserver-users mailing list
> calendarserver-users at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/calendarserver-users



More information about the calendarserver-users mailing list