hub icon indicating copy to clipboard operation
hub copied to clipboard

Add IPv6 support to StatusServer and related classes.

Open moodyjon opened this issue 3 years ago • 3 comments

Fixes #117 Update: Fixes #121

Not sure whether this is complete. I think I need help with this part in hub/env.py:

        if result == 'localhost':
            # 'localhost' resolves to ::1 (ipv6) on many systems, which fails on default setup of
            # docker, using 127.0.0.1 instead forces ipv4
            result = '127.0.0.1'

If I allow the cs_host() to be localhost instead of 127.0.0.1, then it will start TCP servers on both v4/v6 sockets.

What is the problem with docker and this behavior?

moodyjon avatar Dec 28 '22 23:12 moodyjon

Just saw a new EADDRINUSE problem when running lbry-sdk tests against this hub branch.

https://github.com/moodyjon/lbry-sdk/actions/runs/3911989925/jobs/6686050669

Converting this to draft status while investigating.

moodyjon avatar Jan 13 '23 15:01 moodyjon

I did some work on StatusServer.start() to make it retry to overcome transient EADDRINUSE. It got a bit more complicated in order to handle cases like HOST=::,0.0.0.0, HOST=0.0.0.0,::, HOST=myserver1,myserver2, etc. I imported resolve_host() from my moodyjon/lbry-sdk:ipv6 branch to do name resolution.

moodyjon avatar Jan 17 '23 15:01 moodyjon

Have not seen EADDRINUSE since that one occurrence. Not sure what the root cause of that was. Possible infrastructure?

moodyjon avatar Jan 17 '23 15:01 moodyjon