yggdrasil-network / yggdrasil-go

An experiment in scalable routing as an encrypted IPv6 overlay network

Home Page:https://yggdrasil-network.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows version fails to start

Revertron opened this issue · comments

I've found time to debug this one :)

When started from admin command line it shows this error:

2022/11/23 00:27:09 Build name: yggdrasil-develop
2022/11/23 00:27:09 Build version: 0.4.7
2022/11/23 00:27:09 TCP admin socket listening on 127.0.0.1:9001
2022/11/23 00:27:09 Connected outbound TCP: blablabla
2022/11/23 00:27:09 Using existing driver 0.14
2022/11/23 00:27:09 Creating adapter
2022/11/23 00:27:09 Connected outbound TLS: blablabla
2022/11/23 00:27:24 Timed out waiting for device query: The wait operation timed out. (Code 0x00000102)
2022/11/23 00:27:24 Failed to setup adapter (problem code: 0x1F, ntstatus: 0xC0000035): Cannot create a file when that file already exists. (Code 0x000000B7)
panic: Error creating interface: Cannot create a file when that file already exists.

goroutine 21 [running]:
main.run({0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, {0xc0000bc0c0, 0x27}, ...}, ...)
        /home/revertron/IdeaProjects/yggdrasil-go/cmd/yggdrasil/main.go:365 +0x1585
main.main.func1()
        /home/revertron/IdeaProjects/yggdrasil-go/cmd/yggdrasil/main.go:405 +0x85
created by main.main
        /home/revertron/IdeaProjects/yggdrasil-go/cmd/yggdrasil/main.go:403 +0x1b7

But sometimes it just starts instantaneously:

2022/11/23 00:31:08 Build name: yggdrasil-develop
2022/11/23 00:31:08 Build version: 0.4.7
2022/11/23 00:31:08 TCP admin socket listening on 127.0.0.1:9001
2022/11/23 00:31:08 Connected outbound TCP: blablabla
2022/11/23 00:31:08 Using existing driver 0.14
2022/11/23 00:31:08 Creating adapter
2022/11/23 00:31:08 Your public key is blablabla
2022/11/23 00:31:08 Your IPv6 address is 200:blablabla
2022/11/23 00:31:08 Your IPv6 subnet is 300:blablabla
2022/11/23 00:31:09 Connected outbound TLS: blablabla

the issue can be solved with windows service to be set as

  • Restart time - 1 second
  • Restart on first/second/other failures

While this is a crutch it works nicely i usually enable it like that by default on windows installations and i think it needs to be default in yggdrasil installer for windows even when the bug gets fixed