question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot connect to containers based on mcr.microsoft.com/dotnet/core/aspnet:3.0 with VS2019 remote debug - error 0x80004005

See original GitHub issue

Copied from https://github.com/dotnet/dotnet-docker/issues/1530 by @ktos

Steps to reproduce the issue

  1. Create a new container where base image is mcr.microsoft.com/dotnet/core/aspnet:3.0 or mcr.microsoft.com/dotnet/core/aspnet:3.1 (or probably older, haven’t tested) on a remote Docker host,
  2. Try to connect to process using remote debug in VS2019 16.4.10,
  3. Error: Operation not supported. Unknown error: 0x80004005.

Expected behavior

List of processes to be attached to appears.

Actual behavior

An error similar to this:

---------------------------
Microsoft Visual Studio
---------------------------
Unable to connect to 'temperaturektosdev_temperatureservice3_1;ssh=ktos@[redacted]'.  Operation not supported. Unknown error: 0x80004005.
---------------------------
OK   
---------------------------

Additional information (e.g. issue happens only occasionally)

Described the whole problem in Microsoft/DockerTools#222, especially https://github.com/microsoft/DockerTools/issues/222#issuecomment-565748326 - everything is because the lack of ps program in the image. Installing it via apt install procps fixes the issue.

Problem appears only in Buster images, at least not in Alpine (there is ps installed, I confirmed).

Still not sure why it works flawlessly for my LOCAL Docker host (Windows) and not for my REMOTE Docker host (Ubuntu). Maybe there is some difference in getting processes info?

However, I think that ps should be a part of a base image for ASP.NET Core web apps.

Output of docker version

Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.1
 Git commit:        2d0083d
 Built:             Fri Aug 16 14:20:06 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.09.7
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.1
  Git commit:       2d0083d
  Built:            Wed Aug 14 19:41:23 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Output of docker info

Containers: 11
 Running: 11
 Paused: 0
 Stopped: 0
Images: 21
Server Version: 18.09.7
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version:
runc version: N/A
init version: v0.18.0 (expected: fec3683b971d9c3ef73f284f176672c44b448662)
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.15.0-72-generic
Operating System: Ubuntu 18.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.9GiB
Name: lisa.srv.kilibar.be
ID: PB2S:CT6S:MXWC:RGDU:YPLJ:5AJR:G266:UKX6:2LPL:UZ42:HBU4:7BOW
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

Copied from https://github.com/dotnet/dotnet-docker/issues/1530#issuecomment-566730278 by @MichaelSimons

@ktos - in https://github.com/microsoft/DockerTools/issues/222 you said:

Even more strangely, every other container on the same remote host allows me to be debugged, except every ASP.NET Core ones!

Can you share details about these other containers? What technologies are they based on? What base OS are the based on?

Copied from https://github.com/dotnet/dotnet-docker/issues/1530#issuecomment-566771461 by @ktos

@MichaelSimons:

Can you share details about these other containers? What technologies are they based on? What base OS are the based on?

Of course. It seems I overstated “every”. Containers I can successfully connect to show list of processes available to debug are:

Containers throwing error 0x80004005 in VS:

Copied from https://github.com/dotnet/dotnet-docker/issues/1530#issuecomment-566775007 by @ktos

And I just checked - couchdb:latest is Debian Stretch based, however it installs procps because couchdb requires it: https://github.com/apache/couchdb-pkg/blob/master/debian/control#L38

Copied from https://github.com/dotnet/dotnet-docker/issues/1530#issuecomment-567219203 by MichaelSimons

@dbreshears - Is this something that falls under your area of ownership? If not do you know who does?

The UX doesn’t seem ideal here.

  1. I would expect a better error message indicating ps is required when it is not found.
  2. Given ps is not included in the Debian base OS image, what is your recommendation here? Is it possible for the tooling to dynamically install any dependencies it requires?

Copied from https://github.com/dotnet/dotnet-docker/issues/1530#issuecomment-567226668 by @dbreshears

@gregg-miskelly, is this something you can help with?

Copied from https://github.com/dotnet/dotnet-docker/issues/1530#issuecomment-567249893 by @gregg-miskelly

@dbreshears can you transfer this issue to Microsoft/MIEngine? CC @pieandcakes

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
pieandcakescommented, Feb 28, 2020

We can take another look and see if we can switch what is being generated.

0reactions
MichaelSimonscommented, Feb 28, 2020

From a Linux container perspective I think the usability of zips and requiring unzip to be installed within the container is a limiting factor. tar has been supported in Windows for sometime now. Can you make use of it within your builds to produce tarballs?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Connect to the Microsoft Visual Studio Remote ...
Learn the meaning of "Unable to Connect to the Microsoft Visual Studio Remote Debugging Monitor", the possible causes, and the solutions.
Read more >
Unable to connect to the Microsoft Visual Studio Remote ...
I have made sure that I have Remote Debugging and Visual Studio version 2022 selected in General settings in the App Service Configuration....
Read more >
Unable to connect to the Remote Debugging - Web App ...
It seems remote debugging is not turned on for your App Service. Open your App Service in the Azure portal and go to...
Read more >
Remote debugging on Kubernetes using VS Code
Debug remotely by running a debugger on Kubernetes with VS Code. ... Debugging in a container environment can be hard, and developers ...
Read more >
Unable to “Attach to Process” when trying to debug an Azure ...
You will get error messages like: Unable to connect to the Microsoft Visual Studio Remote Debugger. ... Unknown error 0x80004005.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found