-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code 126: Remote-Containers server terminated unexpectedly on fresh Ubuntu 20.04 install #5283
Comments
Further debugging information that might be helpful:
|
Additional debugging information. This time on a brand new system again. However, this time I skipped Docker entirely and ran with Podman as a solution (to try and eliminate Docker itself as a source of errors). When attempting to run on a fully privileged account again. This time when the user inside my [2021-07-04T11:56:07.041Z] Remote-Containers 0.183.0 in VS Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48). However, when I comment out the user in the devcontainer.json file I get the same set of errors shown in the original post. |
Also in an aim to isolate anything even remotely controversial from the one and only script that ran before installing Podman, VSCode and setting up the plugin I have the following things: # Set permissions for admin user's home directory.
chmod 700 "/home/$ADMINUSER"
# Prevent standard user executing su.
dpkg-statoverride --update --add root adm 4750 /bin/su
# Protect user home directories.
echo -e "${HIGHLIGHT}Configuring home directories and shell access...${NC}"
sed -ie '/^DIR_MODE=/ s/=[0-9]*\+/=0700/' /etc/adduser.conf
sed -ie '/^UMASK\s\+/ s/022/077/' /etc/login.defs
# Set some AppArmor profiles to enforce mode.
echo -e "${HIGHLIGHT}Configuring apparmor...${NC}"
aa-enforce /etc/apparmor.d/usr.bin.firefox
aa-enforce /etc/apparmor.d/usr.sbin.avahi-daemon
aa-enforce /etc/apparmor.d/usr.sbin.dnsmasq
aa-enforce /etc/apparmor.d/bin.ping
aa-enforce /etc/apparmor.d/usr.sbin.rsyslogd
# Fix some permissions in /var that are writable and executable by the standard user.
echo -e "${HIGHLIGHT}Configuring additional directory permissions...${NC}"
chmod o-w /var/crash
chmod o-w /var/metrics
chmod o-w /var/tmp Question: Is a chmod 700 in my home directory likely to cause this kind of permissions error? (Reference: https://chmodcommand.com/chmod-700/) Note: Tried setting home directory to match latest Ubuntu default of 750 and rebuilt everything from scratch with no impact |
Unsure, could you try using an off-the-shelf Ubuntu and install Docker rootfull (not rootless) and confirm it works? Then apply one change at a time to see which one breaks it? (A discussion on issues with rootless: #4646) |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Taken from About Screen of VS Code
Version: 1.57.1
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:26:56.255Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Linux x64 5.8.0-59-generic snap
[57 ms] Remote-Containers 0.183.0 in VS Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48).
[57 ms] Start: Resolving Remote
[61 ms] Setting up container for folder or workspace: /home/mark/Code/Demo
[61 ms] Host: unix:///run/user/1001/docker.sock
[63 ms] Start: Check Docker is running
[63 ms] Start: Run: /usr/bin/docker version --format {{.Server.APIVersion}}
[99 ms] Server API version: 1.41
[104 ms] Start: Run: git rev-parse --show-cdup
[109 ms] Start: Run: /usr/bin/docker ps -q -a --filter label=vsch.local.folder=/home/mark/Code/Demo --filter label=vsch.quality=stable
[140 ms] Start: Run: /usr/bin/docker inspect --type container d5705fbd2088
[169 ms] Start: Starting container
[170 ms] Start: Run: /usr/bin/docker start d5705fbd20880dcb5c29d3895dae91525d59fe696a2c9734f7c320fe2fe096ed
[420 ms] Start: Run: /usr/bin/docker ps -q -a --filter label=vsch.local.folder=/home/mark/Code/Demo --filter label=vsch.quality=stable
[449 ms] Start: Run: /usr/bin/docker inspect --type container d5705fbd2088
[478 ms] Start: Inspecting container
[478 ms] Start: Run: /usr/bin/docker inspect --type container d5705fbd20880dcb5c29d3895dae91525d59fe696a2c9734f7c320fe2fe096ed
[508 ms] Start: Run in container: /bin/sh
[511 ms] Start: Run in container: uname -m
[570 ms] x86_64
[570 ms]
[571 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[571 ms] PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
[572 ms]
[572 ms] Start: Run in container: cat /etc/passwd
[573 ms] Start: Setup shutdown monitor
[574 ms] Forking shutdown monitor: /home/mark/.vscode/extensions/ms-vscode-remote.remote-containers-0.183.0/dist/shutdown/shutdownMonitorProcess /run/user/1001/vscode-remote-containers-1147b9638f9fb330a1fd4ef472750df9e80783b4.sock singleContainer Debug /home/mark/.config/Code/logs/20210703T155739/exthost1/ms-vscode-remote.remote-containers 1625325207600
[578 ms] Start: Run in container: test -d /root/.vscode-server
[578 ms]
[578 ms]
[578 ms] Exit code 1
[579 ms] Start: Run in container: test -d /root/.vscode-remote
[579 ms]
[579 ms]
[580 ms] Exit code 1
[580 ms] Start: Run in container: test -f /var/vscode-server/.patchEtcEnvironmentMarker
[581 ms]
[582 ms]
[582 ms] Start: Run in container: test -f /var/vscode-server/.patchEtcProfileMarker
[583 ms]
[583 ms]
[583 ms] Start: Run in container: set -o noclobber ; mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[585 ms]
[585 ms]
[585 ms] Start: Run in container: mkdir -p '/root/.vscode-server/data/Machine' && cat >'/root/.vscode-server/data/Machine/settings.json' <<'settingsJSON'
[587 ms]
[587 ms]
[588 ms] Start: Run in container: test -d /root/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48
[588 ms]
[588 ms]
[588 ms] Exit code 1
[589 ms] Start: Run in container: test -d /vscode/vscode-server/bin/x64/507ce72a4466fbb27b715c3722558bb15afa9f48
[589 ms]
[589 ms]
[589 ms] Start: Run in container: mkdir -p '/root/.vscode-server/bin' && ln -s '/vscode/vscode-server/bin/x64/507ce72a4466fbb27b715c3722558bb15afa9f48' '/root/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48'
[591 ms]
[591 ms]
[591 ms] Start: Run in container: touch '/vscode/vscode-server/bin/x64/507ce72a4466fbb27b715c3722558bb15afa9f48'
[591 ms] Start: Launching Remote-Containers helper.
[592 ms] Start: Run: gpgconf --list-dir agent-extra-socket
[594 ms]
[595 ms]
[595 ms] /run/user/1001/gnupg/S.gpg-agent.extra
[595 ms]
[595 ms] Start: Run in container: gpgconf --list-dir agent-socket
[596 ms] /root/.gnupg/S.gpg-agent
[597 ms]
[597 ms] Start: Run in container: gpgconf --list-dir homedir
[598 ms] /root/.gnupg
[598 ms]
[598 ms] Start: Run in container: ls '/root/.gnupg/private-keys-v1.d' 2>/dev/null
[599 ms] https://code.visualstudio.com/docs/remote/troubleshooting#_reporting-issues
[600 ms]
[600 ms] Exit code 2
[600 ms] Start: Run in container: mkdir -p -m 700 '/root/.gnupg'
[601 ms] userEnvProbe: loginInteractiveShell (default)
[602 ms] userEnvProbe shell: /bin/bash
[602 ms]
[602 ms]
[602 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system credential.helper '!f() { /root/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/node /tmp/vscode-remote-containers-63067b109a185b54d1cfed35dbc29fcf9d26017a.js $*; }; f' || true
[603 ms] Start: Run: gpgconf --list-dir homedir
[606 ms]
[606 ms]
[607 ms] Start: Preparing Extensions
[607 ms] Start: Run in container: set -o noclobber ; mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null
[608 ms] /home/mark/.gnupg
[608 ms]
[608 ms]
[609 ms]
[609 ms] Start: Run in container: gpgconf --list-dir homedir
[611 ms] Extensions cache, install extensions: dart-code.dart-code
[611 ms] /root/.gnupg
[611 ms]
[612 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-63067b109a185b54d1cfed35dbc29fcf9d26017a.js' >/tmp/vscode-remote-containers-63067b109a185b54d1cfed35dbc29fcf9d26017a.js
[613 ms]
[613 ms]
[613 ms] Start: Run in container: test -d /root/.vscode-server/extensionsCache && ls /root/.vscode-server/extensionsCache || true
[614 ms]
[614 ms]
[614 ms] Start: Run in container: # Test for /root/.gnupg/pubring.kbx and gpg
[615 ms]
[616 ms]
[616 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-63067b109a185b54d1cfed35dbc29fcf9d26017a.js' >/tmp/vscode-remote-containers-server-63067b109a185b54d1cfed35dbc29fcf9d26017a.js
[617 ms]
[617 ms]
[617 ms] Start: Run in container: test -d /vscode/vscode-server/extensionsCache && ls /vscode/vscode-server/extensionsCache || true
[618 ms] Start: Run in container: /root/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/node /tmp/vscode-remote-containers-server-63067b109a185b54d1cfed35dbc29fcf9d26017a.js
[623 ms]
[623 ms]
[623 ms] Start: Run in container: # Copy /home/mark/.gnupg/pubring.kbx to /root/.gnupg/pubring.kbx
[624 ms] Extensions cache, link in container: None
[625 ms]
[625 ms]
[625 ms] Start: Run in container: for pid in
cd /proc && ls -d [0-9]*
; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr "[641 ms] Start: Run in container: # Test for /root/.gnupg/trustdb.gpg and gpg
[642 ms] Start: Starting VS Code Server
[643 ms] Start: Run in container: /root/.vscode-server/bin/507ce72a4466fbb27b715c3722558bb15afa9f48/server.sh --log debug --force-disable-user-env --disable-telemetry --port 0 --extensions-download-dir /root/.vscode-server/extensionsCache --install-extension dart-code.dart-code --start-server
[643 ms]
[643 ms]
[643 ms] Start: Run in container: # Copy /home/mark/.gnupg/trustdb.gpg to /root/.gnupg/trustdb.gpg
[645 ms]
[645 ms]
[645 ms] Start: Run: gpg-connect-agent updatestartuptty /bye
[693 ms] Error: stream ended with:116 but wanted:1128865906
at u (/home/mark/.vscode/extensions/ms-vscode-remote.remote-containers-0.183.0/dist/extension/extension.js:7:57650)
at /home/mark/.vscode/extensions/ms-vscode-remote.remote-containers-0.183.0/dist/extension/extension.js:7:57831
at s (/home/mark/.vscode/extensions/ms-vscode-remote.remote-containers-0.183.0/dist/extension/extension.js:12:5713)
at Socket. (/home/mark/.vscode/extensions/ms-vscode-remote.remote-containers-0.183.0/dist/extension/extension.js:12:5883)
at Socket.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[694 ms] Error: stream ended with:116 but wanted:1128865906
at u (/home/mark/.vscode/extensions/ms-vscode-remote.remote-containers-0.183.0/dist/extension/extension.js:7:57650)
at /home/mark/.vscode/extensions/ms-vscode-remote.remote-containers-0.183.0/dist/extension/extension.js:7:57831
at s (/home/mark/.vscode/extensions/ms-vscode-remote.remote-containers-0.183.0/dist/extension/extension.js:12:5713)
at Socket. (/home/mark/.vscode/extensions/ms-vscode-remote.remote-containers-0.183.0/dist/extension/extension.js:12:5883)
at Socket.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[695 ms] Remote-Containers server terminated (code: 126, signal: null).
Steps to Reproduce:
This is a fresh Ubuntu install (less than 20 mins old). This is the full extent of system changes that happened prior to this.
dockerd-rootless-setuptool.sh install
again as per the official Docker install to enable Rootless Docker on LinuxDoes this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: