microsoft / mindaro

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

Difficulty With Basic Use Case? #166

Open apfeltracht opened 3 years ago

apfeltracht commented 3 years ago

Describe the bug

I am running VS Code as a sudoer, and I don't know the difference on Ubuntu, but I checked that the user is also an Administrator.

I start the debugger after having configured the launch.json file, and I'm asked for elevated privileges, and I grant them.

The EndpointManager fails to load.

I then run VS Code as a superuser, which I really should not want to do, and it works only if I am not using the bridge in isolation (that is, all of the cluster's traffic is routed to my machine.)

I'm a bit confused because this is just following the guide, the most basic use case? Could I have done something stupid?

I would like to take the opportunity to ask also whether when working in isolation, domains can be configured so that they don't change, so that a particular domain can be assigned to a particular developer without having to reconfigure DNS whenever the generated domain changes?

To Reproduce

Just follow the instructions in the guide for using Bridge to Kubernetes? Is it because Linux is in Preview?

Logs

2021-04-22T11:59:48.9496407Z | EndpointManager | TRACE | Starting up EndpointManager\nOperation context: {"clientRequestId":null,"correlationId":"","requestId":null,"userSubscriptionId":null,"startTime":"2021-04-22T11:59:48.7576194Z","userAgent":"EndpointManager/1.0.20210408.1","requestHttpMethod":null,"requestUri":null,"version":"1.0.20210408.1","requestHeaders":{},"loggingProperties":{"applicationName":"EndpointManager","deviceOperatingSystem":"Linux 5.8.0-48-generic #<54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021","framework":".NET Core 3.1.9","macAddressHash":"","processId":,"targetEnvironment":"Production"}} 2021-04-22T11:59:48.9725563Z | EndpointManager | TRACE | Executing EndpointManager with args 'root /root/.bridge/EndpointManager/EndpointManagerSocket /tmp/Bridge To Kubernetes x' 2021-04-22T11:59:48.9759074Z | EndpointManager | TRACE | Checking for access to the hosts file... 2021-04-22T11:59:48.9762983Z | EndpointManager | TRACE | Getting hosts file path 2021-04-22T11:59:48.9763711Z | EndpointManager | TRACE | Located hosts file at /etc/hosts 2021-04-22T11:59:48.9765708Z | EndpointManager | TRACE | Successfully accessed hosts file 2021-04-22T11:59:48.9902787Z | EndpointManager | TRACE | Event: EndpointManager-EnsureHostsFileAccess {"properties":{"result":"Succeeded"},"metrics":{"durationInMs":2.0}} 2021-04-22T11:59:48.9983292Z | EndpointManager | TRACE | Starting EndpointManager... 2021-04-22T11:59:48.9989126Z | EndpointManager | TRACE | Starting internal timer 2021-04-22T11:59:49.0106486Z | EndpointManager | TRACE | Cleaning up '/root/.bridge/EndpointManager' 2021-04-22T11:59:49.0132020Z | EndpointManager | TRACE | Setting permissions on '/root/.bridge/EndpointManager' 2021-04-22T11:59:49.0314543Z | EndpointManager | TRACE | Waiting for process 45181 2021-04-22T11:59:49.0335404Z | EndpointManager | TRACE | Process has exited with exit code 0 2021-04-22T11:59:49.0379441Z | EndpointManager | TRACE | Waiting for process 45187 2021-04-22T11:59:49.0384062Z | EndpointManager | TRACE | Process has exited with exit code 0 2021-04-22T11:59:49.0458667Z | EndpointManager | TRACE | Setting permissions on '/root/.bridge/EndpointManager/EndpointManagerSocket' 2021-04-22T11:59:49.0464771Z | EndpointManager | TRACE | Waiting for process 45190 2021-04-22T11:59:49.0471239Z | EndpointManager | TRACE | Process has exited with exit code 0 2021-04-22T11:59:49.0476224Z | EndpointManager | TRACE | Waiting for process 45191 2021-04-22T11:59:49.0480327Z | EndpointManager | TRACE | Process has exited with exit code 0 2021-04-22T11:59:49.0484691Z | EndpointManager | TRACE | Waiting for connections... 2021-04-22T11:59:49.5389519Z | EndpointManager | TRACE | Client connected to Endpoint manager 2021-04-22T11:59:49.5411057Z | EndpointManager | TRACE | 40 bytes were sent. 2021-04-22T11:59:49.5486135Z | EndpointManager | TRACE | Received request segment: '{"apiname":"Ping","correlationId":""}' of size 130 2021-04-22T11:59:49.5649271Z | EndpointManager | TRACE | Registering client ping\nOperation context: {"clientRequestId":null,"correlationId":"","requestId":null,"userSubscriptionId":null,"startTime":"2021-04-22T11:59:48.7576194Z","userAgent":"EndpointManager/1.0.20210408.1","requestHttpMethod":null,"requestUri":null,"version":"1.0.20210408.1","requestHeaders":{},"loggingProperties":{"applicationName":"EndpointManager","deviceOperatingSystem":"Linux 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021","framework":".NET Core 3.1.9","macAddressHash":"","processId":,"targetEnvironment":"Production"}} 2021-04-22T11:59:49.5652165Z | EndpointManager | TRACE | Refreshing internal timer 2021-04-22T11:59:49.5676647Z | EndpointManager | TRACE | Sending response: '{"isSuccess":true,"errorMessage":null,"errorType":null}' 2021-04-22T11:59:49.5678443Z | EndpointManager | TRACE | 60 bytes were sent. 2021-04-22T11:59:50.2561719Z | EndpointManager | TRACE | Client connected to Endpoint manager 2021-04-22T11:59:50.2580750Z | EndpointManager | TRACE | 40 bytes were sent. 2021-04-22T11:59:50.2591587Z | EndpointManager | TRACE | Received request segment: '{"apiname":"Ping","correlationId":""}' of size 130 2021-04-22T11:59:50.2605842Z | EndpointManager | TRACE | Registering client ping\nOperation context: {"clientRequestId":null,"correlationId":"","requestId":null,"userSubscriptionId":null,"startTime":"2021-04-22T11:59:48.7576194Z","userAgent":"EndpointManager/1.0.20210408.1","requestHttpMethod":null,"requestUri":null,"version":"1.0.20210408.1","requestHeaders":{},"loggingProperties":{"applicationName":"EndpointManager","deviceOperatingSystem":"Linux 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021","framework":".NET Core 3.1.9","macAddressHash":"","processId":,"targetEnvironment":"Production"}} 2021-04-22T11:59:50.2613953Z | EndpointManager | TRACE | Refreshing internal timer 2021-04-22T11:59:50.2621968Z | EndpointManager | TRACE | Sending response: '{"isSuccess":true,"errorMessage":null,"errorType":null}' 2021-04-22T11:59:50.2629027Z | EndpointManager | TRACE | 60 bytes were sent. 2021-04-22T12:14:50.2677205Z | EndpointManager | TRACE | Idle timeout reached. EndpointManager shutting down. 2021-04-22T12:14:50.2782792Z | EndpointManager | TRACE | Socket closed: Operation canceled 2021-04-22T12:14:50.2791084Z | EndpointManager | TRACE | Event: EndpointManager-RunAsync {"properties":{"result":"Succeeded"},"metrics":{"durationInMs":901280.0}} 2021-04-22T12:14:50.2798371Z | EndpointManager | TRACE | Cleaning up... 2021-04-22T12:14:50.2801053Z | EndpointManager | TRACE | Reading hosts file content 2021-04-22T12:14:50.2813484Z | EndpointManager | TRACE | Generating updated hosts file content with 0 Bridge To Kubernetes entries 2021-04-22T12:14:50.2822668Z | EndpointManager | TRACE | Writing hosts file content 2021-04-22T12:14:50.2833192Z | EndpointManager | TRACE | Removed all Bridge To Kubernetes entries from the hosts file. 2021-04-22T12:14:50.2834562Z | EndpointManager | TRACE | Removing IP allocation and routing rules... 2021-04-22T12:14:50.2847988Z | EndpointManager | TRACE | Disposing... 2021-04-22T12:14:50.2848692Z | EndpointManager | TRACE | Removing IP allocation... 2021-04-22T12:14:50.2849293Z | EndpointManager | TRACE | Removing routing rules... 2021-04-22T12:14:50.2865739Z | EndpointManager | TRACE | Removing rules from routing table... 2021-04-22T12:14:50.2867163Z | EndpointManager | TRACE | Event: IP-RemoveRoutingRules {"properties":{"result":"Succeeded"},"metrics":{"durationInMs":0.0}} 2021-04-22T12:14:50.2867935Z | EndpointManager | TRACE | Dispose complete. 2021-04-22T12:14:50.2868945Z | EndpointManager | TRACE | Event: IP-Cleanup {"properties":{"result":"Succeeded"},"metrics":{"durationInMs":2.0}} 2021-04-22T12:14:50.2869770Z | EndpointManager | TRACE | Removing previous socket instance... 2021-04-22T12:14:50.2871271Z | EndpointManager | TRACE | Cleaning up '/root/.bridge/EndpointManager' 2021-04-22T12:14:50.2897653Z | EndpointManager | TRACE | Cleanup complete. 2021-04-22T12:14:50.2901851Z | EndpointManager | TRACE | Event: EndpointManager-Cleanup {"properties":{"result":"Succeeded"},"metrics":{"durationInMs":10.0}} 2021-04-22T12:14:50.2914452Z | EndpointManager | TRACE | Disposing... 2021-04-22T12:14:50.2914972Z | EndpointManager | TRACE | Removing IP allocation... 2021-04-22T12:14:50.2915465Z | EndpointManager | TRACE | Removing routing rules... 2021-04-22T12:14:50.2915996Z | EndpointManager | TRACE | Removing rules from routing table... 2021-04-22T12:14:50.2916631Z | EndpointManager | TRACE | Event: IP-RemoveRoutingRules {"properties":{"result":"Succeeded"},"metrics":{"durationInMs":0.0}} 2021-04-22T12:14:50.2917196Z | EndpointManager | TRACE | Dispose complete. 2021-04-22T12:14:50.2917747Z | EndpointManager | TRACE | Event: IP-Cleanup {"properties":{"result":"Succeeded"},"metrics":{"durationInMs":0.0}}

Environment Details

Bridge to Kubernetes version 1.0.120210408. Visual Studio Code version 1.55.2. Ubuntu 20.04.2 LTS.

Additional context I upgraded Visual Studio Code after having initial trouble, but am still having the problem.

apfeltracht commented 3 years ago

Should this have something to do with a firewall on my computer?

apfeltracht commented 3 years ago

Alright I apologize for not noticing the "isolateAs" variable in my task configuration.

amsoedal commented 3 years ago

@apfeltracht thank you for reporting this! The EndpointManager should be working, even with routing enabled, so this is likely an issue on our side. I will investigate and let you know as soon as I have any updates.

amsoedal commented 3 years ago

@apfeltracht one more question, could you please attach the "mindarocli" and "library" log files for the sessions where EPM failed to launch? Or if you feel more comfortable, you can email them to me at BridgeToKubernetes@microsoft.com. Thank you!

apfeltracht commented 3 years ago

I sent you an email. Thanks.