After I upgraded my container to the commit from plutus pioneer programm lecture 3 the VsCode server won't spawn anymore in the dev container.
VSCode tells
could not fetch remote environment
Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)
The console tells something about getaddrinfo ENOTFOUND localhost
:
*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*
Extension host agent listening on 38293
[4406 ms] Start: Run in container: echo 38293 >/root/.vscode-server/data/Machine/.devport
[4408 ms]
[4409 ms]
[4409 ms] Port forwarding for container port 38293 starts listening on local port.
[4410 ms] Port forwarding local port 38293 to container port 38293
[4421 ms] Port forwarding connection from 65417 > 38293 > 38293 in the container.
[4421 ms] Start: Run: wsl -d Ubuntu -e /bin/sh -c cd '/home/wutze/workspace/plutus-pioneer-program' && DISPLAY='1' ELECTRON_RUN_AS_NODE='1' SSH_ASKPASS='c:\Users\wutze\.vscode\extensions\ms-vscode-remote.remote-containers-0.177.0\scripts\ssh-askpass.bat' VSCODE_SSH_ASKPASS_NODE='C:\Users\wutze\AppData\Local\Programs\Microsoft VS Code\Code.exe' VSCODE_SSH_ASKPASS_MAIN='c:\Users\wutze\.vscode\extensions\ms-vscode-remote.remote-containers-0.177.0\dist\common\sshAskpass.js' VSCODE_SSH_ASKPASS_HANDLE='\\.\pipe\ssh-askpass-32ff11722b3a35f061eaff56993e1deab5d0eea2-sock' DOCKER_CONTEXT='default' VSCODE_SSH_ASKPASS_COUNTER='14' docker 'exec' '-i' '-u' 'root' '-e' 'VSCODE_REMOTE_CONTAINERS_SESSION=c2909e18-9ccb-4e7f-9ffc-a2aed511465e1620332517761' '73ba0ca7a6a532509c5d66df05fbfd39d8174e93661432cdbb28933efd49c768' '/root/.vscode-server/bin/cfa2e218100323074ac1948c885448fdf4de2a7f/node' '-e' '
[4554 ms] [20:22:02] Extension host agent started.
[4580 ms] Installing extensions...
[4750 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --global credential.helper '!f() { /root/.vscode-server/bin/cfa2e218100323074ac1948c885448fdf4de2a7f/node /tmp/vscode-remote-containers-b989d5aac79afe5555725461b56f804a3d10bef0.js $*; }; f' || true
[4755 ms]
[4756 ms]
[4931 ms] Port forwarding 65417 > 38293 > 38293 stderr: Error: getaddrinfo ENOTFOUND localhost
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
[4932 ms] Port forwarding 65417 > 38293 > 38293 stderr: Remote close with error
[4955 ms] Port forwarding 65417 > 38293 > 38293: Local close
[4956 ms] Port forwarding 65417 > 38293 > 38293 terminated by extension with code 1 and signal null.
Any ideas what's gooing wrong? The commit from lecture 1 worked.
I already checked all hosts files from windows, wsl and the dev-container, all contain the localhost 127.0.0.1
entry.
I also opened a cli in the dev container and startded node with /root/.vscode-server/bin/cfa2e218100323074ac1948c885448fdf4de2a7f/node
and it also fails
> dns.lookup('localhost', {hints: dns.ADDRCONFIG|dns.V4MAPPED}, console.log)
GetAddrInfoReqWrap {
callback: [Function: log],
family: 0,
hostname: 'localhost',
oncomplete: [Function: onlookup]
}
> Error: getaddrinfo ENOTFOUND localhost
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
at GetAddrInfoReqWrap.callbackTrampoline (internal/async_hooks.js:131:14) {
errno: -3007,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'localhost'
for another hostname it works:
> dns.lookup('www.google.de', {hints: dns.ADDRCONFIG|dns.V4MAPPED}, console.log)
GetAddrInfoReqWrap {
callback: [Function: log],
family: 0,
hostname: 'www.google.de',
oncomplete: [Function: onlookup]
}
> null 142.250.184.227 4
It is definitly this commit in plutus because if I checkout the one before it suddenly works again:
SHA-1: 5dbd3b833b40217cb1a63d4f52351ae8876ba86c
* adds a non-root user for use in the devcontainer (#2956)
* adds a non-root user for use in the devcontainer
* remove un-needed files
* .cabal folder permissions for volume mapping