Describe the bug
I am trying to run the bridge on VSCode on my mac with a Go app that is deployed in a local cluster (k3d).
I had to create a service to the pod because the pod does not require one, it is an autonomous slack bot.
When launching the app I have the following error in the terminal
> Executing task: bridge-to-kubernetes.service <
Redirecting Kubernetes service botkube to your machine...
Current cluster: k3d-k3s-default
Current namespace: botkube
Target service name: botkube
Target service ports: 42530
Error: Oops... An unexpected error has occurred.
For diagnostic information, see logs at '/var/folders/xl/b6750v1n1jj0mk5cshtsx6yr0000gn/T/Bridge To Kubernetes'.
The terminal process terminated with exit code: 1.
Digging into the logs I have the following logs in the bridge-library-2020-10-29-17-54-35-58055.txt
file.
2020-10-29T18:02:34.7148630Z | Library | TRACE | Event: KubernetesRemoteEnvironmentManager-GetReachableServices <json>{"properties":{"result":"Failed"},"metrics":{"durationInMs":113.0}}</json>\nOperation context: <json>{"clientRequestId":null,"correlationRequestId":null,"requestId":null,"userSubscriptionId":null,"startTime":"2020-10-29T18:02:34.3791980Z","userAgent":"VSCode/1.0.120201021","requestHttpMethod":null,"requestUri":null,"version":"1.0.20201021.18","requestHeaders":{},"loggingProperties":{"applicationName":"Library","deviceOperatingSystem":"Darwin 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64","framework":".NET Core 3.1.9","macAddressHash":"2442ea78560a87847acfad6c95c34961167425a202a59048528fe2d40d510c44","processId":58922,"targetEnvironment":"Production","isRoutingEnabled":false}}</json>
2020-10-29T18:02:34.7201280Z | Library | TRACE | Event: ConnectManagementClient-GetElevationRequests <json>{"properties":{"result":"Failed"},"metrics":{"durationInMs":137.0}}</json>
2020-10-29T18:02:34.7207530Z | Library | ERROR | Failed to get elevation requests.
2020-10-29T18:02:34.8762830Z | Library | ERROR | Logging handled exception: System.Net.Http.HttpRequestException: {"StackTrace":" at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)\n at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at k8s.WatcherDelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)\n at k8s.Kubernetes.ListNamespacedServiceWithHttpMessagesAsync(String namespaceParameter, Nullable`1 allowWatchBookmarks, String continueParameter, String fieldSelector, String labelSelector, Nullable`1 limit, String resourceVersion, Nullable`1 timeoutSeconds, Nullable`1 watch, String pretty, Dictionary`2 customHeaders, CancellationToken cancellationToken)\n at k8s.KubernetesExtensions.ListNamespacedServiceAsync(IKubernetes operations, String namespaceParameter, Nullable`1 allowWatchBookmarks, String continueParameter, String fieldSelector, String labelSelector, Nullable`1 limit, String resourceVersion, Nullable`1 timeoutSeconds, Nullable`1 watch, String pretty, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Common.Kubernetes.KubernetesClient.<>c__DisplayClass30_0.<<ListServicesInNamespaceAsync>b__0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n at Microsoft.DevSpaces.Common.Kubernetes.KubernetesClient.<>c__DisplayClass47_0`1.<<ClientInvokeWrapperAsync>b__0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n at Microsoft.DevSpaces.Common.Utilities.WebUtilities.RetryUntilTimeAsync(Func`2 action, TimeSpan maxWaitTime, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Common.Kubernetes.KubernetesClient.ClientInvokeWrapperAsync[T](Func`1 handler, String operation, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Common.Kubernetes.KubernetesClient.ListServicesInNamespaceAsync(String namespaceName, IEnumerable`1 labels, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Library.Connect.KubernetesRemoteEnvironmentManager.GetReachableServicesAsync(RemoteContainerConnectionDetails remoteContainerConnectionDetails, ILocalProcessConfig localProcessConfig, IProgress`1 progress, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Library.ManagementClients.ConnectManagementClient.<>c__DisplayClass15_0.<<GetElevationRequestsAsync>b__0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n at Microsoft.DevSpaces.Library.ManagementClients.DevSpacesManagementClientExceptionStrategy.RunWithHandlingAsync[T](Func`1 func, FailureConfig failureConfig)","Message":"IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostName')","Data":{},"InnerException":{"ClassName":"System.ArgumentException","Message":"IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at System.Net.Dns.HostResolutionBeginHelper(String hostName, Boolean justReturnParsedIp, Boolean throwOnIIPAny, AsyncCallback requestCallback, Object state)\n at System.Net.Dns.BeginGetHostAddresses(String hostNameOrAddress, AsyncCallback requestCallback, Object state)\n at System.Net.Sockets.MultipleConnectAsync.StartConnectAsync(SocketAsyncEventArgs args, DnsEndPoint endPoint)\n at System.Net.Sockets.Socket.ConnectAsync(SocketType socketType, ProtocolType protocolType, SocketAsyncEventArgs e)\n at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2147024809,"Source":"System.Net.NameResolution","WatsonBuckets":null,"ParamName":"hostName"},"HelpLink":null,"Source":"System.Net.Http","HResult":-2147024809}
To Reproduce
install botkube with helm,
create a service because it does not come with one
apiVersion: v1
kind: Service
metadata:
name: botkube
labels:
app: botkube
spec:
type: ClusterIP
ports:
- name: "foo"
port: 1234
selector:
app: botkube
create a config in VSCode with 0 port to forward and no isolation.
run the main.go "Launch with Kubernetes"
Expected behavior
A clear and concise description of what you expected to happen.
Logs
Attach logs from the following directory:
For Windows: %TEMP%/Bridge to Kubernetes
For OSX/Linux: $TMPDIR/Bridge to Kubernetes
this is the bridge-mindarocli.txt log
2020-10-29T18:02:34.3174350Z | MindaroCli | TRACE | Event: Command.Start <json>{"properties":{"arguments":"prep-connect --output json","isRoutingEnabled":"false"},"metrics":null}</json>\nOperation context: <json>{"clientRequestId":null,"correlationRequestId":null,"requestId":null,"userSubscriptionId":null,"startTime":"2020-10-29T18:02:33.8955560Z","userAgent":"VSCode/1.0.120201021","requestHttpMethod":null,"requestUri":null,"version":"1.0.20201021.18","requestHeaders":{},"loggingProperties":{"applicationName":"MindaroCli","deviceOperatingSystem":"Darwin 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64","framework":".NET Core 3.1.9","macAddressHash":"2442ea78560a87847acfad6c95c34961167425a202a59048528fe2d40d510c44","processId":58922,"targetEnvironment":"Production","commandId":"f3fe95c1-a685-447f-98ac-a0076cd68b2f"}}</json>
2020-10-29T18:02:34.8906600Z | MindaroCli | ERROR | Dependency: Prep Connect <json>{"target":null,"success":false,"duration":null,"properties":{"requestId":"null","clientRequestId":"null","correlationRequestId":"null"}}</json>
2020-10-29T18:02:34.8980190Z | MindaroCli | ERROR | Oops... An unexpected error has occurred.\n
2020-10-29T18:02:34.8990740Z | MindaroCli | ERROR | For diagnostic information, see logs at '/var/folders/xl/b6750v1n1jj0mk5cshtsx6yr0000gn/T/Bridge To Kubernetes'.\n
2020-10-29T18:02:34.9134100Z | MindaroCli | ERROR | Logging handled exception: System.Net.Http.HttpRequestException: {"StackTrace":" at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)\n at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at k8s.WatcherDelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)\n at k8s.Kubernetes.ListNamespacedServiceWithHttpMessagesAsync(String namespaceParameter, Nullable`1 allowWatchBookmarks, String continueParameter, String fieldSelector, String labelSelector, Nullable`1 limit, String resourceVersion, Nullable`1 timeoutSeconds, Nullable`1 watch, String pretty, Dictionary`2 customHeaders, CancellationToken cancellationToken)\n at k8s.KubernetesExtensions.ListNamespacedServiceAsync(IKubernetes operations, String namespaceParameter, Nullable`1 allowWatchBookmarks, String continueParameter, String fieldSelector, String labelSelector, Nullable`1 limit, String resourceVersion, Nullable`1 timeoutSeconds, Nullable`1 watch, String pretty, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Common.Kubernetes.KubernetesClient.<>c__DisplayClass30_0.<<ListServicesInNamespaceAsync>b__0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n at Microsoft.DevSpaces.Common.Kubernetes.KubernetesClient.<>c__DisplayClass47_0`1.<<ClientInvokeWrapperAsync>b__0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n at Microsoft.DevSpaces.Common.Utilities.WebUtilities.RetryUntilTimeAsync(Func`2 action, TimeSpan maxWaitTime, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Common.Kubernetes.KubernetesClient.ClientInvokeWrapperAsync[T](Func`1 handler, String operation, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Common.Kubernetes.KubernetesClient.ListServicesInNamespaceAsync(String namespaceName, IEnumerable`1 labels, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Library.Connect.KubernetesRemoteEnvironmentManager.GetReachableServicesAsync(RemoteContainerConnectionDetails remoteContainerConnectionDetails, ILocalProcessConfig localProcessConfig, IProgress`1 progress, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Library.ManagementClients.ConnectManagementClient.<>c__DisplayClass15_0.<<GetElevationRequestsAsync>b__0>d.MoveNext()\n--- End of stack trace from previous location where exception was thrown ---\n at Microsoft.DevSpaces.Library.ManagementClients.DevSpacesManagementClientExceptionStrategy.RunWithHandlingAsync[T](Func`1 func, FailureConfig failureConfig)\n at Microsoft.DevSpaces.Library.ManagementClients.ConnectManagementClient.GetElevationRequestsAsync(IProgress`1 progress, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Exe.Commands.Connect.PrepConnectCommand.ExecuteAsync()\n at Microsoft.DevSpaces.Exe.DevSpacesCliApp.RunCommandAsync(String[] args, CancellationToken cancellationToken)\n at Microsoft.DevSpaces.Exe.DevSpacesCliApp.ExecuteAsync(String[] args, CancellationToken cancellationToken)","Message":"IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostName')","Data":{},"InnerException":{"ClassName":"System.ArgumentException","Message":"IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at System.Net.Dns.HostResolutionBeginHelper(String hostName, Boolean justReturnParsedIp, Boolean throwOnIIPAny, AsyncCallback requestCallback, Object state)\n at System.Net.Dns.BeginGetHostAddresses(String hostNameOrAddress, AsyncCallback requestCallback, Object state)\n at System.Net.Sockets.MultipleConnectAsync.StartConnectAsync(SocketAsyncEventArgs args, DnsEndPoint endPoint)\n at System.Net.Sockets.Socket.ConnectAsync(SocketType socketType, ProtocolType protocolType, SocketAsyncEventArgs e)\n at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2147024809,"Source":"System.Net.NameResolution","WatsonBuckets":null,"ParamName":"hostName"},"HelpLink":null,"Source":"System.Net.Http","HResult":-2147024809}
2020-10-29T18:02:34.9147990Z | MindaroCli | TRACE | Event: Command.End <json>{"properties":{"arguments":"prep-connect --output json","result":"Failed"},"metrics":{"duration":672.0}}</json>
Environment Details
Client used (VS Code):
code --version
1.50.1
d2e414d9e4239a252d1ab117bd7067f125afd80a
x64
[email protected]
Client's version:
Operating System: OSX 10.15.7
Additional context
Add any other outputs from the clients or context you would like to share.