Opened 4 years ago

Closed 4 years ago

#12545 closed Bug Report - General (Fixed)

ServerPool fails to listen on link local addresses

Reported by: gordonp@… Owned by: Stuart Auchterlonie
Priority: minor Milestone: 0.28
Component: MythTV - General Version: 0.27.5
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Continuation of Bug #11030, found here: https://code.mythtv.org/trac/ticket/11030

Gentoo-user: I am running mythtv-0.27.5, and I see this same error in my mythtv logs:

2015-11-16 14:30:32.159088 E [6648/6648] CoreContext? serverpool.cpp:416 (listen) - Failed listening on TCP [fe80::5054:ff: fe37:d1e7%eth0]:6544 - Error 9: The address is not available

I am not willing to disable IPv6 - at this point, I absolutely rely upon, and make extensive use of IPv6, not only with all my system stuff (ntp, amanda-tape-backup, avahi, ssh, ...) but also with mythtv and the frontend to backend connections.

In contrast (apparently) to the original Bug, at this time mythbackend *does* run.

Change History (4)

comment:1 Changed 4 years ago by Stuart Auchterlonie

Milestone: unknown0.28

Looks like server pool should be stripping the link qualifier from the address when it tries to bind.

comment:2 Changed 4 years ago by Stuart Auchterlonie

Owner: set to Stuart Auchterlonie
Status: newaccepted

comment:3 Changed 4 years ago by Karl Egly

Status: acceptedinfoneeded

Stumbled upon this while looking into #12543.

What QT version are you using? (Can you attach the full output of mythutil --version?)

I'm tempted to close this as upstream bug. (Are we the only ones using this? I always stumble upon other devs.)

https://bugreports.qt.io/browse/QTBUG-25634

http://www.qtcentre.org/threads/48789-QTcpServer-or-QUdpLocal-can-t-bind-to-IPv6-link-local

I just looked at my backend and it appears to work in master (v0.28-pre-3221-g7292e21). I see proper messages from the ServerPool? and registered listening sockets from netstat.

New (2011) QT unit test explicitly avoiding binding link-local

https://codereview.qt-project.org/#/c/10190/1/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp,unified

New (2012) QT unit test to explicitly test binding link-local, which should already be working

https://codereview.qt-project.org/#/c/26940/1/tests/auto/qtcpserver/tst_qtcpserver.cpp,unified

So it appears that we might need at least QT 4.8.3 for link-local addresses to work.

comment:4 Changed 4 years ago by Stuart Auchterlonie

Resolution: Fixed
Status: infoneededclosed

Closing this as fixed, as my fixes/0.28 system is listening just fine on the link local addresses. Feel free to reopen if this is not the case for you

# netstat -Wtanp | grep :65 | grep fe80
tcp6       0      0 fe80::3e4a:92ff:fe79:c5a5:6543 :::*                    LISTEN      14755/mythbackend
tcp6       0      0 fe80::3e4a:92ff:fe79:c5a5:6544 :::*                    LISTEN      14755/mythbackend
tcp6       0      0 fe80::3e4a:92ff:fe79:c5a5:6549 :::*                    LISTEN      14755/mythbackend
tcp6       0      0 fe80::3e4a:92ff:fe79:c5a5:6554 :::*                    LISTEN      14755/mythbackend

Note: See TracTickets for help on using tickets.