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

Gitlab client fails to update status for project #368

Closed
jlisam-insikt opened this issue Jun 29, 2016 · 9 comments
Closed

Gitlab client fails to update status for project #368

jlisam-insikt opened this issue Jun 29, 2016 · 9 comments

Comments

@jlisam-insikt
Copy link

jlisam-insikt commented Jun 29, 2016

Issue

Context

  • Gitlab plugin version: 1.2.5
  • Gitlab version: GitLab Community Edition 8.2.3
  • Jenkins version: 1.624
  • JRE: openjdk-1.8.0.91-0

Logs & Traces

Jun 29, 2016 6:05:44 PM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving gitlab project ids
Jun 29, 2016 6:05:44 PM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving the gitlab project id from remote url ********
Jun 29, 2016 6:05:44 PM SEVERE com.dabsquared.gitlabjenkins.util.CommitStatusUpdater updateCommitStatus
Failed to update Gitlab commit status for project '**********'
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.$Proxy82.getCommit(Unknown Source)
    at com.dabsquared.gitlabjenkins.util.CommitStatusUpdater.existsCommit(CommitStatusUpdater.java:91)
    at com.dabsquared.gitlabjenkins.util.CommitStatusUpdater.updateCommitStatus(CommitStatusUpdater.java:46)
    at com.dabsquared.gitlabjenkins.publisher.GitLabCommitStatusPublisher.perform(GitLabCommitStatusPublisher.java:48)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
    at hudson.model.Build$BuildExecution.post2(Build.java:185)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
    at hudson.model.Run.execute(Run.java:1766)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:381)
Caused by: javax.net.ssl.SSLHandshakeException: Could not generate secret
    at sun.security.ssl.ECDHCrypt.getAgreedSecret(ECDHCrypt.java:103)
    at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:1067)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:348)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:543)
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:409)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
    at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
    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
Caused by: java.security.InvalidKeyException: ECDH key agreement requires ECPublicKey for doPhase
    at org.bouncycastle.jcajce.provider.asymmetric.ec.KeyAgreementSpi.engineDoPhase(Unknown Source)
    at javax.crypto.KeyAgreement.doPhase(KeyAgreement.java:567)
    at sun.security.ssl.ECDHCrypt.getAgreedSecret(ECDHCrypt.java:100)
    ... 34 more

Problem description

When the gitlab-plugin calls gitlab to publish build status to GitLab commit, it fails with this message:

Failed to update Gitlab commit status for project '********': RESTEASY004655: Unable to invoke request

Regular MRs work, they get triggered for build.

When I test the connection in the gitlab configuration I get this:

Test Connection
Client error: Could not generate secret

I even tried to run this job with a different jdk via a parameterized build, and I still get the same error.

@coder-hugo
Copy link
Contributor

Caused by: javax.net.ssl.SSLHandshakeException: Could not generate secret
...
Caused by: java.security.InvalidKeyException: ECDH key agreement requires ECPublicKey for doPhase

Looks like an SSL issue. As this plugin uses the standard java methods for invoking SSL calls this is related to your Jenkins setup. Changing the jdk of a build won't effect the code this code. This code will be executed directly by the Jenkins. So you have run the Jenkins with a different jdk to see if this changes the behavior.

@jlisam-insikt
Copy link
Author

jlisam-insikt commented Jun 30, 2016

Thanks. Is there a specific one you guys use to compile and run your code?

@coder-hugo
Copy link
Contributor

I use the oracle jdk 8u92 on my local machine for building the plugin and running Jenkins. And our Jenkins at work runs at the moment with the oracle jdk 8u60.

@omehegan
Copy link
Member

omehegan commented Jul 1, 2016

I run it on OpenJDK 7 with no issues. Java 6 is no longer officially supported by Jenkins.

@jlisam-insikt
Copy link
Author

Ok sounds good. Will try it out tonight.

@jlisam-insikt
Copy link
Author

I switched over to Oracle jdk 8u92 and it worked. Thanks for the help

@prawen
Copy link

prawen commented Apr 27, 2018

Hello,

Facing same issue.

Gitlab Hook Plugin - 1.4.2

GitLab Plugin - 1.5.5

Jenkins - 2.107.2

openjdk version "1.8.0_162"
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)

12:36:21 Failed to add comment on Merge Request for project '4886184': RESTEASY004655: Unable to invoke request
12:36:31 Failed to update Gitlab commit status for project '4886184': RESTEASY004655: Unable to invoke request

But it actually does the comment on Merge request page.

@omehegan
Copy link
Member

omehegan commented May 2, 2018

@prawen GitLab Hook Plugin is irrelevant to me, it provides similar features to GitLab Plugin but is otherwise unrelated and I don't maintain it.

What version of GitLab are you using?

I would suggest you look at the logs on your GitLab server when a build attempts to comment on an MR. It looks like GitLab is having a problem processing the request.

@prawen
Copy link

prawen commented May 2, 2018

Hello,

We are on gitlab.com and now a days gitlab.com is facing some issue. May be because of that it seems.

Anywayz, thanks for your response.

exceed-alae pushed a commit to exceed-alae/gitlab-plugin that referenced this issue May 20, 2022
…found

Fix "No test results found" in Github build status
exceed-alae pushed a commit to exceed-alae/gitlab-plugin that referenced this issue May 20, 2022
Set the pull request after updating the updated timestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants