haskell-distributed / distributed-process

Cloud Haskell core libraries
http://haskell-distributed.github.io
713 stars 97 forks source link

DiedDisconnect due to IPv6 localhost resolution #389

Open 2jacobtan opened 2 years ago

2jacobtan commented 2 years ago

Summary

Minimal example fails when nodes are using IPv6 localhost addresses.

Context

I tried the minimal example at https://hackage.haskell.org/package/distributed-process-simplelocalnet-0.2.4/docs/Control-Distributed-Process-Backend-SimpleLocalnet.html

It works fine on my Windows computer using WSL2 (Windows subsystem for Linux).

But on Linux (Fedora 36), it fails with DiedDisconnect.

Eventually I realised on Linux the nodes are assigned IPv6 localhost addresses (::1).

temporary fix

Disable IPv6 on Linux: https://www.techrepublic.com/article/how-to-disable-ipv6-on-linux/

extra reference

past me discovered that Linux would bind localhost as IPv6 only

https://www.reddit.com/r/haskell/comments/6emo9g/comment/did1j1m/

request

Perhaps note this down under the troubleshooting section in the doc at https://hackage.haskell.org/package/distributed-process-simplelocalnet-0.2.4/docs/Control-Distributed-Process-Backend-SimpleLocalnet.html .