Skip to content
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

Exception thrown by ListNamespacedCustomObjectWithHttpMessagesAsync #1

Open
radu-matei opened this issue May 7, 2019 · 2 comments
Open

Comments

@radu-matei
Copy link
Member

radu:kubecontroller-csharp$ dotnet run --project KubeController.Sample/

Unhandled Exception: System.Net.Http.HttpRequestException: Connection refused ---> System.Net.Sockets.SocketException: Connection refused
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
   at System.Threading.Tasks.ValueTask`1.get_Result()
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at k8s.WatcherDelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Rest.RetryDelegatingHandler.<>c__DisplayClass11_0.<<SendAsync>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.Rest.RetryDelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at k8s.Kubernetes.ListNamespacedCustomObjectWithHttpMessagesAsync(String group, String version, String namespaceParameter, String plural, String fieldSelector, String labelSelector, String resourceVersion, Nullable`1 timeoutSeconds, Nullable`1 watch, String pretty, Dictionary`2 customHeaders, CancellationToken cancellationToken)
   at Engineerd.KubeController.Controller`1.StartAsync(CancellationToken token) in /mnt/c/projects/go/src/github.com/engineerd/kubecontroller-csharp/KubeController/Controller.cs:line 29
   at Engineerd.KubeController.Sample.Program.Main() in /mnt/c/projects/go/src/github.com/engineerd/kubecontroller-csharp/KubeController.Sample/Program.cs:line 30
   at Engineerd.KubeController.Sample.Program.<Main>()
@alexeyzimarev
Copy link

Where do you execute the application? It supposes to be hosted in Kubernetes.

@alexeyzimarev
Copy link

Sorry, I see that you build the config from the local file. We normally detect where the app runs and if it runs in Kubernetes, use this KubernetesClientConfiguration.InClusterConfig()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants