-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Task okhttp3.RealCall$AsyncCall@635f40ba rejected from java.util.concurrent.ThreadPoolExecutor@7899bb30[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] #4448
Comments
It's likely that you are attempting to use the client after closing it. |
Actually first request is getting error. There is no close action for client in my project.
Kubernetes Client Builder doesn't configure ThreadPoolExecuter properly.
PS: I build two clients in my projects with different masterURL. |
You'll need to post a full example of your code. The only reason for that threadpool to reject is if it has been shutdown. |
Client creation part: @OverRide return new KubernetesClientBuilder() } Exception thrown line: |
Unfortunately that's not quite complete. You can try the configMap call in your createOpenshiftClient method to confirm that the client is usable at that point or put a breakpoint in OkHttpClientImpl.close to see where it is being closed. |
I debug it. There was a try block at point that I call createOpenshiftClient method. At end of the try block, I saw that close method call. After remove try block, I could receive the configmap. |
@umutcann can you please elaborate a bit how you fixed your problem? I'd appreciate a lot. I could face something similar, with cient 5.x though. |
@adietish before client 5.x version, I was calling my createOpenshiftClient method(I shared above) in try block like below. try (OpenShiftClient openShiftClient = openshiftClientFactory I noticed that connection was closing at the end of try block. I removed try block then worked :) |
@umutcann: thanks for the details. Your explanation makes a lot of sense: try with resource would close the resource when getting out of the try-block. Gotcha. Unfortunately different from my issue. Will file a new one |
@adietish no need for a new issue - just determine where you are closing the client. |
This was a great hint! |
Describe the bug
Hi,
I build Kubernetes Client like below
I experience issues when call the kubernetes apis.
I debug the KubernetesClientBuilder.build() method. I think problem is related with
clazz.getConstructor(Config.class).newInstance(config);
line. It doesn't configure ThreadPoolExecuter properly.java.util.concurrent.ThreadPoolExecutor@3cfab340[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
By the way I reviewed API/Impl split title in Migration from 5.x to 6.x doc. But sample usage doesn't includes withHttpClientFactory(how to create httpclientfactory)
OpenShiftClient openShiftClient = new new KubernetesClientBuilder().withConfig(new OpenShiftConfigBuilder()./*...*/build()).build().adapt(OpenShiftClient.class);
Do you have any suggestion? Is it bug or am i using builder wrongly?
Fabric8 Kubernetes Client version
6.1.1
Steps to reproduce
Expected behavior
read configmaps properly
Runtime
OpenShift
Kubernetes API Server version
other (please specify in additional context)
Environment
Windows
Fabric8 Kubernetes Client Logs
Additional context
Kubernetes version :v1.21.6+b4b4813
The text was updated successfully, but these errors were encountered: