ccs-twistedextensions icon indicating copy to clipboard operation
ccs-twistedextensions copied to clipboard

Twext attempts to bind to IPv6 address and fails

Open macosforgebot opened this issue 12 years ago • 8 comments

jroweboy@… originally submitted this as ticket:812

  • Owner: @glyph

Note: this is a bug that was previously discussed on the calendar server users list at https://lists.macosforge.org/pipermail/calendarserver-users/2013-July/002266.html

When installing Calendar server on a platform where the DNS returns an IPv6 address, but is unable to bind on IPv6 address the Calendar Server fails to start and produces the following stack trace

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] 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 is expected: Maybe if the server fails to connect on a IPv6 address, it will attempt to determine and fall back to using a IPv4 address. Another solution may be to print a message saying that it was unable to bind to a IPv6 address and inform the user to explicitly set the IPv4 address under the BindAddress setting in caldavd.plist

Workaround: Setting an explicit IPv4 address in the BindAddress portion of the caldavd.plist solved this issue.

macosforgebot avatar Jul 16 '13 21:07 macosforgebot

jroweboy@… originally submitted this as comment:1:⁠ticket:812


Oh, my formatting could use some help, but I see no way for me to edit the ticket.

macosforgebot avatar Jul 16 '13 22:07 macosforgebot

@glyph originally submitted this as comment:2:⁠ticket:812

  • Description modified

Formatting fixed. Thanks for your bug report.

macosforgebot avatar Jul 17 '13 17:07 macosforgebot

@wsanchez originally submitted this as comment:3:⁠ticket:812

  • Owner changed from @wsanchez to @glyph
  • Priority changed from 1: Blocker to 2: Expected
  • Milestone set to CalendarServer-5.x

macosforgebot avatar Jul 17 '13 18:07 macosforgebot

@wsanchez originally submitted this as comment:4:⁠ticket:812

  • Milestone changed from CalendarServer-5.x to CalendarServer-6.x

macosforgebot avatar Jan 07 '14 22:01 macosforgebot

mcepl@… originally submitted this as comment:5:⁠ticket:812

  • Cc mcepl@… added

macosforgebot avatar Feb 16 '14 00:02 macosforgebot

mcepl@… originally submitted this as comment:6:⁠ticket:812

  • Cc mcepl@… removed

macosforgebot avatar Feb 16 '14 00:02 macosforgebot

@wsanchez originally submitted this as comment:7:⁠ticket:812

  • Milestone changed from CalendarServer-6.x to Sooner

macosforgebot avatar Apr 10 '14 02:04 macosforgebot

@wsanchez originally submitted this as comment:8:⁠ticket:812

  • Component changed from Calendar Server to twext

macosforgebot avatar Apr 10 '14 02:04 macosforgebot