Make sure to release the connection before allocating another one
We have 10 jobs that triggered by one git-repository (with 10 hooks in it). After upgrade to jenkins 2.1 and plugin 1.2.2 we got job fails on post-build step with message:
ERROR: Build step failed with exception
javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request
at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:287)
at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:436)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:102)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:64)
at com.sun.proxy.$Proxy92.headCommit(Unknown Source)
at com.dabsquared.gitlabjenkins.util.CommitStatusUpdater.existsCommit(CommitStatusUpdater.java:72)
at com.dabsquared.gitlabjenkins.util.CommitStatusUpdater.updateCommitStatus(CommitStatusUpdater.java:37)
at com.dabsquared.gitlabjenkins.publisher.GitLabCommitStatusPublisher.perform(GitLabCommitStatusPublisher.java:41)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.IllegalStateException: Invalid use of BasicClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
at org.apache.http.util.Asserts.check(Asserts.java:34)
at org.apache.http.impl.conn.BasicClientConnectionManager.getConnection(BasicClientConnectionManager.java:162)
at org.apache.http.impl.conn.BasicClientConnectionManager$1.getConnection(BasicClientConnectionManager.java:144)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:423)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:283)
... 16 more
Build step 'Publish build status to GitLab commit (GitLab 8.1+ required)' marked build as failure
Two of ten jobs always completed ok, but another eight failed.
Is this bug or we do something wrong?
Thanks.
I assume this is related to the following bug in resteasy. Do you have got also some of these errors:
java.lang.NullPointerException
at org.jboss.resteasy.util.ReadFromStream.readFromStream(ReadFromStream.java:30)
at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.bufferEntity(ClientResponse.java:307)
at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:48)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:104)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:64)
at com.sun.proxy.$Proxy94.headCommit(Unknown Source)
If yes this should be fixed by the following commit 85f415fe1f65282d9f0101e01fd414acb2a22bdc within the next release.
No, i don't see any NullPointerException in logs. Only messages connection still allocated.
This error doesn't appear within the logs. It's just printed to the log of a job. And this NullPointerException must not be occurred within the same job as this IllegalStateException.
Ok. I'll test next release. Anyway, i don't see any messages in my backtrace, that tells about problems with reading response from gitlab (as mentioned in resteasy bug). Is there any other info i can give to you?
Any plans (dates) of next release? Or may be any way to build plugin with fix by myself?
mvn install
Uploaded the.hpi for 1.2.3-snapshot. Im running it in produktion, works fine :)
Get Outlook for iOShttps://aka.ms/o0ukef
On Fri, May 13, 2016 at 2:39 AM -0700, "Vil Surkin" <[email protected]mailto:[email protected]> wrote:
Any plans (dates) of next release? Or may be any way to build plugin with fix by myself?
You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHubhttps://github.com/jenkinsci/gitlab-plugin/issues/302#issuecomment-218997670
@eskobaba thanks!
I installed plugin from here: https://jenkins.ci.cloudbees.com/job/plugins/job/gitlab-plugin/415/org.jenkins-ci.plugins$gitlab-plugin/ Now everything looks fine. Will look for stability next week.
Will be fixed in 1.2.3 of the plugin.