Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50874

When access to gitlab URL fails, log the URL used

    Details

    • Similar Issues:

      Description

      I'm getting problems authenticating against our gitlab. I get an SSL exception from Java. Though I assume Java fails to access some of the gitlab URLs, I would like to know which one, as there shouldn't be any certificate related problems.

      So, if the plugin could catch the exception, and re-wrap it with the URL that failed to load, it would be great.

      Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
              at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
              at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959)
              at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
              at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
              at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514)
              at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
              at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026)
              at sun.security.ssl.Handshaker.process_record(Handshaker.java:961)
              at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072)
              at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
              at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
              at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
              at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396)
              at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
              at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
              at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
              at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
              at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
              at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
              at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
              at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
              at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
              at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
              at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
              at org.jenkinsci.plugins.GitLabSecurityRealm.doFinishLogin(GitLabSecurityRealm.java:321)
              at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
              at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
              ... 76 more
      

        Attachments

          Activity

          Hide
          isaacdong isaac dong added a comment - - edited

          "sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" this means your gitlab server probably uses a self-signed-cert.
          gitlab-auth-plugin does NOT and will NOT support that. https://issues.jenkins-ci.org/browse/JENKINS-44516

          BTW: there is no need to log url, ALL url will get the same error.
           

          Show
          isaacdong isaac dong added a comment - - edited "sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" this means your gitlab server probably uses a self-signed-cert. gitlab-auth-plugin does NOT and will NOT support that. https://issues.jenkins-ci.org/browse/JENKINS-44516 BTW: there is no need to log url, ALL url will get the same error.  

            People

            • Assignee:
              elhabib_med Mohamed El Habib
              Reporter:
              pveselov Pawel Veselov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: