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

Gitlab group scan access denied (sometimes)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None

      I'm using a Gitlab group with many projects. Upon doing a group scan I often run into problems after a seemingly random amount of projects: 

       

      Checking project xxx/yyy/zzzChecking project xxx/yyy/zzz
      Cannot set web hook: ForbiddenProposing xxx/yyy/zzz
      ERROR: Failed to create or update a subproject xxx/yyy/zzz
      org.gitlab4j.api.GitLabApiException: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <title>ERROR: The requested URL could not be retrieved</title>
      <style type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></style>
      </head><body>
      <h1>ERROR</h1>
      <h2>The requested URL could not be retrieved</h2>
      <hr>
      <p>The following error was encountered while trying to retrieve the URL: <a href="gitlab.xxx.com:443">gitlab.xxx.com:443</a></p>
      <blockquote><p><b>Access Denied.</b></p></blockquote>
      <p>Access control configuration prevents your request from being allowed at this time.  Please contact your service provider if you feel this is incorrect.</p>
      
      <hr>URL: CONNECT gitlab.xxx.com:443 <br>User: - xx.xxx.xxx.xx <br>
      Error: [not available] <br><hr>
      <div id="footer">Generated Mon, 28 Jun 2021 07:27:29 GMT by xxx (squid/2.6.STABLE21)</div></body></html>
       
      at org.gitlab4j.api.AbstractApi.validate(AbstractApi.java:633) 
      at org.gitlab4j.api.AbstractApi.get(AbstractApi.java:213) at org.gitlab4j.api.ProjectApi.getProject(ProjectApi.java:673) 
      at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.getGitlabProject(GitLabSCMSource.java:204)Caused: java.lang.IllegalStateException: Failed to retrieve project vds/admin/building/releases/adams-car/2020/plugins/digital-road-sim-user 
      at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.getGitlabProject(GitLabSCMSource.java:209) 
      at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.retrieve(GitLabSCMSource.java:308) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373) 
      at jenkins.scm.api.SCMSource.fetch(SCMSource.java:327) 
      at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:261) 
      at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1466) 
      at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1481) 
      at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:254) at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:204) at io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator.visitSources(GitLabSCMNavigator.java:282) 
      at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:542) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278) 
      at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165) 
      at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:1031) 
      at hudson.model.ResourceController.execute(ResourceController.java:97) 
      at hudson.model.Executor.run(Executor.java:429)
      

      This does not always happen and not always at the same project. The Gitlab access log from this point in time:

      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_1>/repository/files/Jenkinsfile?ref=f1ef40899c46170a693c2d17b0466a0b3d7c5ea6 HTTP/1.1" 200 798 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 1.94
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_2> HTTP/1.1" 200 1334 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 2.87
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/962/repository/branches?per_page=96&page=1 HTTP/1.1" 200 886 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 4.25
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_1>/repository/files/Jenkinsfile?ref=55da6dc8910b5e581bdf0a7bbbee3e5a5b8e0d4e HTTP/1.1" 200 798 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 1.94
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/962/merge_requests?state=opened&per_page=96&page=1 HTTP/1.1" 200 2 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" -
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_2>/members/all?per_page=96&page=1 HTTP/1.1" 200 1054 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 4.38
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_1>/repository/files/Jenkinsfile?ref=b7eba3b9c7b3ea1cff69d83ead15dd7bb0ba00e1 HTTP/1.1" 200 798 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 1.94
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/960/repository/branches?per_page=96&page=1 HTTP/1.1" 200 406 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 2.30
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/962/repository/tags?per_page=96&page=1 HTTP/1.1" 200 2602 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 4.48
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_1>/repository/files/Jenkinsfile?ref=3f25a09dfcd429fa96a9b9e51081a2869f9b0448 HTTP/1.1" 404 32 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" -
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/960/merge_requests?state=opened&per_page=96&page=1 HTTP/1.1" 200 2 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" -
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_3>/repository/files/Jenkinsfile?ref=e4f030cb7717d293c73aeab0e22af9cdcadddbae HTTP/1.1" 200 797 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 1.94
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_1>/repository/tree?id=<redacted_4>&path=Jenkinsfile&ref=3f25a09dfcd429fa96a9b9e51081a2869f9b0448&recursive=false&per_page=96&page=1 HTTP/1.1" 200 2 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" -
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/960/repository/tags?per_page=96&page=1 HTTP/1.1" 200 493 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 3.27
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_1>/repository/files/Jenkinsfile?ref=1d043eaf70bb93584e89428108950d1bdba5af7a HTTP/1.1" 404 32 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" -
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_3>/repository/files/Jenkinsfile?ref=f1ef40899c46170a693c2d17b0466a0b3d7c5ea6 HTTP/1.1" 200 798 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 1.94
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_2>/repository/files/Jenkinsfile?ref=55995442c35c63d17de950ea453c0af443e58772 HTTP/1.1" 200 581 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 1.89
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_1>/repository/tree?id=<redacted_4>&path=Jenkinsfile&ref=1d043eaf70bb93584e89428108950d1bdba5af7a&recursive=false&per_page=96&page=1 HTTP/1.1" 200 2 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" -
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_3>/repository/files/Jenkinsfile?ref=5f0fcab4821f41f3c12a72f2300469dbf503428b HTTP/1.1" 404 32 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" -
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_2>/hooks?per_page=96&page=1 HTTP/1.1" 200 306 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" 1.82
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_1>/repository/files/Jenkinsfile?ref=8b9c1fb7aa5dc9ee0ec00838b8e62d504ffb71ec HTTP/1.1" 404 32 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" -
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/hooks?per_page=96&page=1 HTTP/1.1" 403 27 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" -
      193.187.198.121 - - [28/Jun/2021:09:27:29 +0200] "GET /api/v4/projects/<redacted_3>/repository/tree?id=<redacted_4>&path=Jenkinsfile&ref=5f0fcab4821f41f3c12a72f2300469dbf503428b&recursive=false&per_page=96&page=1 HTTP/1.1" 200 2 "" "Jersey/2.30.1 (Apache HttpClient 4.5.9)" -
      

            baymac Parichay Barpanda
            jlo88 Jan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: