WSL icon indicating copy to clipboard operation
WSL copied to clipboard

IPFS daemon exits with error

Open dbohdan opened this issue 9 years ago • 4 comments

  • A brief description

The IPFS daemon fails to start on WSL. It starts as expected on Ubuntu 14.04. IPFS is "a content-addressable, peer-to-peer hypermedia distribution protocol" (per Wikipedia).

  • Expected results

The IPFS daemon starting when the command ipfs daemon is run.

  • Actual results (with terminal output if applicable)

The daemon crashes on start.

$ ipfs daemon
Initializing daemon...
08:45:07.429 ERROR   cmd/ipfs: error from node construction: route ip+net: netlinkrib: invalid argument daemon.go:301
Error: route ip+net: netlinkrib: invalid argument
  • Your Windows build number

Microsoft Windows [Version 10.0.14393]

  • Steps / All commands required to reproduce the error from a brand new installation
wget https://dist.ipfs.io/go-ipfs/v0.4.4/go-ipfs_v0.4.4_linux-amd64.tar.gz
tar xvf go-ipfs_v0.4.4_linux-amd64.tar.gz
cd go-ipfs/
sudo sh install.sh
ipfs init
ipfs daemon
  • Strace of the failing command

Attached.

  • Required packages and commands to install

See the steps to reproduce above.

dbohdan avatar Feb 05 '17 06:02 dbohdan

There's two EINVALs in there.

socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 17
setsockopt(17, SOL_SOCKET, SO_REUSEPORT, [1], 4) = -1 EINVAL (Invalid argument)

and

socket(PF_NETLINK, SOCK_RAW, 0)         = 12
bind(12, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = -1 EINVAL (Invalid argument)

So, #1419 and ~~#1349~~ [edit: fixed in insider builds]

therealkenc avatar Feb 05 '17 17:02 therealkenc

Thanks @dbohdan for the traces and @therealkenc for boiling it down.

The lack of support for SO_REUSEPORT is known and we are talking to the Windows networking team to get native Windows support for it. Cannot commit to anything there.

Adding @JasonLinMS for the netlink issue.

sunilmut avatar Feb 06 '17 23:02 sunilmut

@dbohdan You are using the Anniversary Update version of Windows 10, which does not have Netlink support. Netlink support has been added in the Windows Insider builds, and will be available in the Creators Update coming out later.

Here's the output of running ipfs daemon on a recent internal build:

root@DESKTOP-47239DQ:~/C# ipfs daemon
Initializing daemon...
16:06:36.950 ERROR       core: mdns error: No multicast listeners could be started core.go:178
Swarm listening on /ip4/10.124.158.159/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip6/2001:4898:d8:1111:1dbe:56ca:f1c7:ac98/tcp/4001
Swarm listening on /ip6/2001:4898:d8:1111:6d07:8fbf:458:7c2d/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready

JasonLinMS avatar Feb 07 '17 00:02 JasonLinMS

Apologies I didn't pick up on the AF_NETLINK fixes Jason. It was quick and dirty issue search. I've edited my earlier message.

therealkenc avatar Feb 07 '17 06:02 therealkenc