microsoft / mindaro

Bridge to Kubernetes - for Visual Studio and Visual Studio Code
MIT License
307 stars 106 forks source link

Failed to start EndpointManager on MacOS / VSCode #105

Closed mirogta closed 3 years ago

mirogta commented 3 years ago

Describe the bug

The EndpointManager launch process has exited with exit code '1'.

To Reproduce On Mac OS (Big Sur 11.1):

The launch configuration 'Debug Function with Kubernetes' was configured successfully.

  • Choose the new [Debug with Kubernetes] configuration from the Launch Targets and start the debugger Redirecting Kubernetes service "test" to your machine…
  • A popup appears: "Debugging with Bridge to Kubernetes requires administrator permissions…"
  • Select "Continue" and enter admin password into the prompt Waiting for Endpoint to come up …
Waiting for EndpointManager to come up ...
0:439: execution error: It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found.
  - No frameworks were found.

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=3.1.0&arch=x64&rid=osx.10.16-x64 (150)
The EndpointManager launch process has exited with exit code '1'.
Failed to establish a connection. Error: 0:439: execution error: It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found.
  - No frameworks were found.

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=3.1.0&arch=x64&rid=osx.10.16-x64 (150)
The EndpointManager launch process has exited with exit code '1'.

Output from running dotnet --info in the VSCode terminal:

.NET Core SDK (reflecting any global.json):
 Version:   3.1.110
 Commit:    f02c158773

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.16
 OS Platform: Darwin
 RID:         osx.10.16-x64
 Base Path:   /usr/local/Cellar/dotnet/3.1.110/libexec/sdk/3.1.110/

Host (useful for support):
  Version: 3.1.10
  Commit:  2b1abb2399

.NET Core SDKs installed:
  3.1.110 [/usr/local/Cellar/dotnet/3.1.110/libexec/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.10 [/usr/local/Cellar/dotnet/3.1.110/libexec/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.10 [/usr/local/Cellar/dotnet/3.1.110/libexec/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Logs $TMPDIR/Bridge to Kubernetes

2021-01-15T13:14:42.8105200Z | MindaroCli | TRACE | Event: Command.Start <json>{"properties":{"arguments":"connect --service test --env /var/folders/bn/28sdpc555wg0ffgr2zd6c5tw0000gn/t/tmp-61063bsuftpces5rx.env --script /var/folders/bn/28sdpc555wg0ffgr2zd6c5tw0000gn/t/tmp-61063bsuftpces5rx.env.cmd --control-port 54797 --ppid 61055 --elevation-requests [{\"requesttype\":\"edithostsfile\"}] --local-port 8080","isRoutingEnabled":"false"},"metrics":null}</json>\nOperation context: <json>{"clientRequestId":null,"correlationId":"cde83e34-ef34-4bbf-abe7-057ad07cea421610716451924:b08c4eb5470c","requestId":null,"userSubscriptionId":null,"startTime":"2021-01-15T13:14:42.5455700Z","userAgent":"VSCode/1.0.120210113","requestHttpMethod":null,"requestUri":null,"version":"1.0.20210111.3","requestHeaders":{},"loggingProperties":{"applicationName":"MindaroCli","deviceOperatingSystem":"Darwin 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec  2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64","framework":".NET Core 3.1.8","macAddressHash":"10f3364a8b0497f3914eab871b2d4d6a28dbedcf9b0187aa0884e466d88a737a","processId":61674,"targetEnvironment":"Production","commandId":"b08c4eb5470c"}}</json>
2021-01-15T13:14:42.8892970Z | MindaroCli | TRACE | Running Microsoft.DevSpaces.Exe.Commands.Connect.ConnectCommand...\nOperation context: <json>{"clientRequestId":null,"correlationId":"cde83e34-ef34-4bbf-abe7-057ad07cea421610716451924:b08c4eb5470c","requestId":null,"userSubscriptionId":null,"startTime":"2021-01-15T13:14:42.5455700Z","userAgent":"VSCode/1.0.120210113","requestHttpMethod":null,"requestUri":null,"version":"1.0.20210111.3","requestHeaders":{},"loggingProperties":{"applicationName":"MindaroCli","deviceOperatingSystem":"Darwin 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec  2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64","framework":".NET Core 3.1.8","macAddressHash":"10f3364a8b0497f3914eab871b2d4d6a28dbedcf9b0187aa0884e466d88a737a","processId":61674,"targetEnvironment":"Production","commandId":"b08c4eb5470c","targetServiceName":"test","isRoutingEnabled":false}}</json>
2021-01-15T13:14:42.8959930Z | MindaroCli | TRACE | Initializing progress reporter...
2021-01-15T13:14:43.4541570Z | MindaroCli | TRACE | Remoting started listening on 54797
2021-01-15T13:14:43.4879470Z | MindaroCli | TRACE | Starting EndpointManager...
2021-01-15T13:14:43.5527260Z | MindaroCli | TRACE | Waiting for EndpointManager to come up ...\n
2021-01-15T13:15:45.1875840Z | MindaroCli | WARNG | The EndpointManager launch process has exited with exit code '1'.
2021-01-15T13:15:45.1882940Z | MindaroCli | ERROR | The EndpointManager launch process has exited with exit code '1'.\n
2021-01-15T13:15:45.7266310Z | MindaroCli | TRACE | Event: Command.End <json>{"properties":{"arguments":"connect --service test --env /var/folders/bn/28sdpc555wg0ffgr2zd6c5tw0000gn/t/tmp-61063bsuftpces5rx.env --script /var/folders/bn/28sdpc555wg0ffgr2zd6c5tw0000gn/t/tmp-61063bsuftpces5rx.env.cmd --control-port 54797 --ppid 61055 --elevation-requests [{\"requesttype\":\"edithostsfile\"}] --local-port 8080","result":"Failed","failureReason":"The EndpointManager launch process has exited with exit code '1'."},"metrics":{"duration":62964.0}}</json>

Environment Details Client used: VSCode 1.52.1 Client's version: mindaro.mindaro@1.0.120210113 Operating System: Mac OS X

Notes What is the EndpointManager? Where can I install it or test its execution?

amsoedal commented 3 years ago

Hi @mirogta, thanks for reporting this issue! The EndpointManager is a component that Bridge to Kubernetes uses in order to help facilitate communication between the service running locally and the cluster. It looks like the EndpointManager can't come up on your machine because of a dotnet issue, but I don't see anything immediately wrong from your dotnet --info output. Would you be open to re-installing the AspNetCore.App framework from the link in the error message (https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=3.1.0&arch=x64&rid=osx.10.16-x64)? Let me know if that helps at all!

amsoedal commented 3 years ago

I saw on https://github.com/microsoft/mindaro/issues/106 that you were able to get unblocked! How did you fix the issue?

mirogta commented 3 years ago

Unfortunately didn't get unblocked, it's still an issue. I've switched to Windows to try it there. But my default OS is Mac OS.

On Fri, Jan 15, 2021, 18:35 amsoedal notifications@github.com wrote:

I saw on #106 https://github.com/microsoft/mindaro/issues/106 that you were able to get unblocked! How did you fix the issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/mindaro/issues/105#issuecomment-761112238, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK7IVFU5RDQRUECKXSTJT3S2CDIRANCNFSM4WEDIBSA .

rakeshvanga commented 3 years ago

@mirogta Can you tell what folders are present at this location: /Users/your_username/Library/Application Support/Code/User/globalStorage/mindaro.mindaro/file-downloader-downloads on your Mac?

greenie-msft commented 3 years ago

Hi @mirogta,

Just wanted to follow up on this issue. Are you still experiencing this behavior?

mirogta commented 3 years ago

Yes - can you please no close this so quickly. You know, there's the pandemic, difficult times for some people and responses and "can you try" troubleshooting may take longer than usual...

daniv-msft commented 3 years ago

@mirogta Sorry for the confusion: we closed the issue by mistake (this Close with comment button is far too close from the Comment one!) and @greenie-msft asked me to reopen the issue because I have more rights on the repository.

We totally understand that it might take days to test/reproduce a bug, so please don't feel pressured to do it immediately.

mirogta commented 3 years ago

@mirogta Can you tell what folders are present at this location: /Users/your_username/Library/Application Support/Code/User/globalStorage/mindaro.mindaro/file-downloader-downloads on your Mac?

There are 2 folders and they are not empty.

drwxr-xr-x  151 miro  dev  4832 25 Feb 09:22 bridge
drwxr-xr-x    3 miro  dev    96 18 Mar 08:59 kubectl
mirogta commented 3 years ago

Attached logs from a recent failure:

Bridge to Kubernetes initialization (VS Code v1.54.3 - Extension v1.0.120210310)
Logs: /Users/miro/Library/Application Support/Code/logs/20210322T083542/exthost5/mindaro.mindaro/mindaro-vscode-2021-03-22T08-52-33.420Z.txt
Waiting for EndpointManager to come up ...
Failed to launch EndpointManager.
Failed to establish a connection. Error: Failed to launch EndpointManager.

mindaro-vscode-2021-03-22T08-52-33.420Z.txt

rakeshvanga commented 3 years ago

@mirogta Thanks for sharing the logs. I see that you've setup DOTNET_ROOT path to Users/miro/dotnet/. Can you confirm that 3.1.0 dotnet version is present in this location?

mirogta commented 3 years ago

@rakeshvanga

I had dotnet 3.1.0 (see my first comment above) but it did not work so I've tried to install the latest… Is that a problem?

# dotnet --version
5.0.103

and

# ls -la /Users/miro/dotent
total 216
drwxr-xr-x   7 miro  dev    224 17 Sep  2020 .
drwxr-xr-x+ 92 miro  dev   2944 23 Mar 19:33 ..
-rw-r--r--   1 miro  dev   1116 20 Aug  2020 LICENSE.txt
-rw-r--r--   1 miro  dev  31330 20 Aug  2020 ThirdPartyNotices.txt
-rwxr-xr-x   1 miro  dev  71632 20 Aug  2020 dotnet
drwxr-xr-x   3 miro  dev     96 20 Aug  2020 host
drwxr-xr-x   3 miro  dev     96 20 Aug  2020 shared
rakeshvanga commented 3 years ago

@mirogta I don't see any issue with using the dotnet 5.0.103 version but we have not tested the product against with this version. The problem which you are seeing is that the DOTNET_ROOT environment variable is not being passed to the EndpointManager process. I was not able to repro this issue on Mac. Can you provide the logs from "$TMPDIR\Bridge To Kubernetes" folder to understand more about the issue.

Also, does your project that is being debugged requires setting the DOTNET_ROOT environment variable? Further to unblock you from this issue you can set BRIDGE_BINARYUTILITYVERSION = v1 before launching the vscode instance. But once I understand the issue with using the DOTNET_ROOT on your mac there will not be a need to set this environment variable.

sunshine69 commented 3 years ago

@rakeshvanga Thank you I hit the same issues on Linux (ubuntu 20.04 ) and DOTNET_ROOT set correctly but it only works with BRIDGE_BINARYUTILITYVERSION = v1 - That saves me the day!

mirogta commented 3 years ago

It works now after setting up the environment variable BRIDGE_BINARYUTILITYVERSION=v1.

Thanks