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

Can't make gitlab-branch-source-plugin work at all

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • windows server and jenkins.war running on a tomcat9

      Hi,

      I'm totally unable to make gitlab-branch-source-plugin work even in the most simplest/purest scenario...

      I kept only this plugin and removed all other gitlab plugins from my jenkins, I also created a user token on my gitlab with maximum permissions.

      Then I created a multibranch project with a gitlab project as "branch sources", provided my gitlab URL and credentials, the owner, then I selected one project in the dropdown list, and finally I saved the job config. I disabled the hooks management from jenkins to avoid errors when saving the job.

      Then I tried to "scan the gitlab project" and I get:

      ERROR: [mar. févr. 02 18:32:31 CET 2021] Could not update folder level actions from source 020a3776-afd6-40d2-a104-0d7107b6eb82
      org.gitlab4j.api.GitLabApiException: 404 Project Not Found
       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 archi/configuration-server
       at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.getGitlabProject(GitLabSCMSource.java:209)
       at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.getGitlabProject(GitLabSCMSource.java:196)
       at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.retrieveActions(GitLabSCMSource.java:570)
       at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:848)
       at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:598)
       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.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032)
       at hudson.model.ResourceController.execute(ResourceController.java:97)
       at hudson.model.Executor.run(Executor.java:429)
      [mar. févr. 02 18:32:31 CET 2021] Finished branch indexing. Indexing took 0,11 s
      FATAL: Failed to recompute children of configuration-server
      java.lang.IllegalStateException: Failed to retrieve project archi/configuration-server
       at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.getGitlabProject(GitLabSCMSource.java:209)
       at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.getGitlabProject(GitLabSCMSource.java:196)
       at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource.retrieveActions(GitLabSCMSource.java:570)
       at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:848)
       at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:598)
       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.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032)
       at hudson.model.ResourceController.execute(ResourceController.java:97)
       at hudson.model.Executor.run(Executor.java:429)
      Caused by: org.gitlab4j.api.GitLabApiException: 404 Project Not Found
       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)
       ... 9 more

       

      The jenkins logs I get are:

      04-Feb-2021 14:37:00.866 AVERTISSEMENT [Handling POST /jenkins/job/configuration-server/descriptorByName/io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource/fillProjectPathItems from 127.0.0.1 : http-nio-8081-exec-7] io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource$DescriptorImpl.doFillProjectPathItems Exception caught:org.gitlab4j.api.GitLabApiException: 404 Group Not Found
       org.gitlab4j.api.GitLabApiException: 404 Group Not Found
       at org.gitlab4j.api.AbstractApi.validate(AbstractApi.java:633)
       at org.gitlab4j.api.AbstractApi.get(AbstractApi.java:213)
       at org.gitlab4j.api.Pager.<init>(Pager.java:92)
       at org.gitlab4j.api.GroupApi.getProjects(GroupApi.java:430)
       at org.gitlab4j.api.GroupApi.getProjects(GroupApi.java:400)
       at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource$DescriptorImpl.doFillProjectPathItems(GitLabSCMSource.java:850)
       at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
       at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
       at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
       at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
       at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)

       

      Now, in Gitlab, the group shows: 

      I'm not sure whether this could be an issue

       

      This plugin would be the real thing though if it did worked as the documentation showed...

      Can you please help ?

       

      Best regards,

      Gregory

            baymac Parichay Barpanda
            ganne Gregory Anne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: