Open pablomendezroyo opened 2 years ago
The issue seems to be that the way of setting new wireguard credentials is done by setting wireguard ENVS in the Wireguard compose file. This requires doing a docker-compose up
to the wireguard package. Source: https://github.com/dappnode/DNP_DAPPMANAGER/blob/58163d73466eaa272b41ef00fff7bbec9e35c8c5/packages/dappmanager/src/modules/wireguard/client.ts#L48
If you are connected through Wireguard and set a new device in wireguard, you may loose connectivity to your DAppNode for a few seconds. That's why promise never resolves.
I see as possible fixes
cc: @dapplion @3alpha
I am suddenly running into this issue (didn't have it before). DappNode is fully updated and it happens regardless if I connect via Wireguard, DappNode WiFi or Local Proxy.
When trying to get credentials for a Wireguard device, the following error is thrown:
Error: Error fetching credentials: Internal Server Error RequestError: getaddrinfo ENOTFOUND my.dappnode
at ClientRequest.<anonymous> (/app/node_modules/got/dist/source/core/index.js:956:111)
at Object.onceWrapper (events.js:520:26)
at ClientRequest.emit (events.js:412:35)
at ClientRequest.origin.emit (/app/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)
at Socket.socketErrorListener (_http_client.js:475:9)
at Socket.emit (events.js:400:28)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26)
at /usr/src/app/webpack:/@dappnode/dappmanager/src/modules/wireguard/client.ts:86:11
at Generator.next (<anonymous>)
at fulfilled (/usr/src/app/index.js:272228:58)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
"firstnamedevicename"
I was able to workaround via SSH by creating credentials with dappnode_wireguard
, but noticed that the Endpoint contains no hostname there (just a port). Not sure if that's expected behaviour, or if this might be related to the problem. The endpoint line that was generated via SSH looks like this:
Endpoint = :51820
DappNode System Info:
Core DAppNode Packages versions
bind.dnp.dappnode.eth: 0.2.6
core.dnp.dappnode.eth: 0.2.52
dappmanager.dnp.dappnode.eth: 0.2.47, commit: 35c4a081
https.dnp.dappnode.eth: 0.1.3
ipfs.dnp.dappnode.eth: 0.2.15
wifi.dnp.dappnode.eth: 0.2.8
wireguard.dnp.dappnode.eth: 0.1.1
System info
dockerComposeVersion: 1.25.5
dockerServerVersion: 20.10.6
dockerCliVersion: 20.10.6
os: debian
versionCodename: bullseye
architecture: amd64
kernel: 5.10.0-9-amd64
Disk usage: 54%
@dapplion @pablomendezroyo
51820 is the default wireguard VPN port to access node. If you're on the node in a docker container the endpoint I believe would be 0.0.0.0:51820
if on the node but not in a container it would be 127.0.0.1:51820
. There seems to be an issue of your dappnode resolving its own External IP and it's dyndns info. Does the auto diagnose page on the admin UI show any issues?
It seems like this issue is related to https://github.com/dappnode/DNP_DAPPMANAGER/issues/1484 Wireguard is not capable of connecting to dappmanager in order to retrieve the dyndns domain
For example removing/adding a new profile keeps loading forever even if the action was done