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

Connection timed out with Bitbucket #14

Open
BitPan opened this issue Nov 16, 2017 · 0 comments
Open

Connection timed out with Bitbucket #14

BitPan opened this issue Nov 16, 2017 · 0 comments

Comments

@BitPan
Copy link

BitPan commented Nov 16, 2017

Hi Team,

After upgraded to version, a lot of our multi-branch projects started to failed to fetch branch information. From Jenkins log I can see a lot of below errors:

org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout waiting for connection
	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConnection(MultiThreadedHttpConnectionManager.java:504)
	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnectionWithTimeout(MultiThreadedHttpConnectionManager.java:423)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:160)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:404)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:330)
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.executeMethod(BitbucketCloudApiClient.java:534)
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequestAsInputStream(BitbucketCloudApiClient.java:556)
Caused: java.io.IOException: Communication error for url: https://api.bitbucket.org/2.0/repositories/xxxxx/xxxxxx/hooks?page=1&pagelen=50
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequestAsInputStream(BitbucketCloudApiClient.java:570)
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequest(BitbucketCloudApiClient.java:575)
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getWebHooks(BitbucketCloudApiClient.java:403)
Caused: java.io.IOException: I/O error when parsing response from URL: https://api.bitbucket.org/2.0/repositories/xxxxx/xxxxxx/hooks?page=1&pagelen=50
	at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getWebHooks(BitbucketCloudApiClient.java:417)
	at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.registerHooks(WebhookAutoRegisterListener.java:151)
	at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.access$000(WebhookAutoRegisterListener.java:64)
	at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener$1.doRun(WebhookAutoRegisterListener.java:118)
	at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

This issue seems like caused by exhausted connection pool when Jenkins is trying to make bitbucket API calls. I found a commit here which seems caused this issue.
238a96d#diff-66513375f9e876a8924d023aea79a71b.

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

1 participant