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

Latest SCM API plugin is not working correctly.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • scm-api-plugin
    • None

      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from git@github.com:********
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:1003)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1245)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1309)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      Auto build is working sometime and failing maximum time. Request you to look into this issue. 

          [JENKINS-71844] Latest SCM API plugin is not working correctly.

          girija_patra, which version of SCM API works and which version doesn't?

          Kalle Niemitalo added a comment - girija_patra , which version of SCM API works and which version doesn't?

          Girija added a comment -

          We are using SCM API PluginVersion676.v886669a_199a_a_ plugin in Jenkins 2.387.2 . With same plugin auto deployment is working sometime , not working maximum time. We have to restart Jenkins every time to make auto build work. Please suggest how to resolve the issue.

          Girija added a comment - We are using SCM API PluginVersion676.v886669a_199a_a_ plugin in Jenkins 2.387.2 . With same plugin auto deployment is working sometime , not working maximum time. We have to restart Jenkins every time to make auto build work. Please suggest how to resolve the issue.

          Because the error doesn't happen every time, my first guess was that it could be caused by GitHub throttling, perhaps exacerbated by some change in git-plugin or git-client-plugin.  According to https://github.com/orgs/community/discussions/44515 though, GitHub doesn't "have any hard limits for clones".

          Are there any other messages above the "Error fetching remote repo"?

          Kalle Niemitalo added a comment - Because the error doesn't happen every time, my first guess was that it could be caused by GitHub throttling, perhaps exacerbated by some change in git-plugin or git-client-plugin.  According to https://github.com/orgs/community/discussions/44515 though, GitHub doesn't "have any hard limits for clones". Are there any other messages above the "Error fetching remote repo"?

          Girija added a comment - - edited

          Hi Kalle,

          Below is the full failure build log.

          Started by an SCM change
          > git rev-parse --resolve-git-dir /var/lib/jenkins/caches/git-b3cef0c040581b6cfeb516e8356e3256/.git # timeout=10
          Setting origin to git@github.com:**************
          > git config remote.origin.url git@github.com:************* # timeout=10
          Fetching origin...
          Fetching upstream changes from origin
          > git --version # timeout=10
          > git --version # 'git version 2.34.1'
          > git config --get remote.origin.url # timeout=10
          using GIT_SSH to set credentials
          > git fetch --tags --force --progress – origin +refs/heads/:refs/remotes/origin/ # timeout=10
          hudson.plugins.git.GitException: Command "git fetch --tags --force --progress – origin +refs/heads/:refs/remotes/origin/" returned status code 128:
          stdout:
          stderr: ssh: connect to host ssh.github.com port 443: Connection timed out
          fatal: Could not read from remote repository.

          Please make sure you have the correct access rights
          and the repository exists.

          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2842)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
          at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:394)
          at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:330)
          at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:420)
          at jenkins.scm.api.SCMSource.fetch(SCMSource.java:581)
          at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:99)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:312)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)
          Finished: FAILURE

          As it is working sometime, we don't feel it is issue with access rights. Please suggest us to fix this issue.

           

          Girija added a comment - - edited Hi Kalle, Below is the full failure build log. Started by an SCM change > git rev-parse --resolve-git-dir /var/lib/jenkins/caches/git-b3cef0c040581b6cfeb516e8356e3256/.git # timeout=10 Setting origin to git@github.com:************** > git config remote.origin.url git@github.com:************* # timeout=10 Fetching origin... Fetching upstream changes from origin > git --version # timeout=10 > git --version # 'git version 2.34.1' > git config --get remote.origin.url # timeout=10 using GIT_SSH to set credentials > git fetch --tags --force --progress – origin +refs/heads/ :refs/remotes/origin/ # timeout=10 hudson.plugins.git.GitException: Command "git fetch --tags --force --progress – origin +refs/heads/ :refs/remotes/origin/ " returned status code 128: stdout: stderr: ssh: connect to host ssh.github.com port 443: Connection timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2842) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635) at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:394) at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:330) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:420) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:581) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:99) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:312) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Finished: FAILURE As it is working sometime, we don't feel it is issue with access rights. Please suggest us to fix this issue.  

          SSH would normally use port 22, but Using SSH over the HTTPS port describes that GitHub allows SSH over port 443 too. Does your network have any middleboxes that might interfere with this connection as it is not actually HTTPS?

          Kalle Niemitalo added a comment - SSH would normally use port 22, but Using SSH over the HTTPS port describes that GitHub allows SSH over port 443 too. Does your network have any middleboxes that might interfere with this connection as it is not actually HTTPS?

          Girija added a comment -

          We don't have any middlebox.

          Girija added a comment - We don't have any middlebox.

          girija_patra Hey, can you elaborate on what the problem behavior looks like? Do you see intermittent failures of jobs to build when this happens? It succeeds sometimes, but other times the job doesn't trigger?

          Elijah Shackelford added a comment - girija_patra Hey, can you elaborate on what the problem behavior looks like? Do you see intermittent failures of jobs to build when this happens? It succeeds sometimes, but other times the job doesn't trigger?

          Girija added a comment -

          Hi Elijah, This issue got resolved after i updated Jenkins. With Jenkins 2.414.1 version it is working fine. No Issue with SCM/GitHub, Auto deployment is working fine.

          Girija added a comment - Hi Elijah, This issue got resolved after i updated Jenkins. With Jenkins 2.414.1 version it is working fine. No Issue with SCM/GitHub, Auto deployment is working fine.

          Girija added a comment -

          Hi Elijah, This pollSCM is worked fine for single branch. But it is not working when i configured another branch. Please find the problem details below.

           

          We have a single repo under which we have two branch, Branch A and Branch B. Both the branch have separate Jenkins file like Jenkinsfile1 and Jenkinsfile2. Both the jenkins file have

          triggers

          {             pollSCM 'H/5 * * * *'         }

          lines for auto build.  We created a folder Test and under it configured Multibranch Pipeline job. Auto build is working fine till we have not configured another Multibranch Pipeline job to build from Branch B inside another Test1 folder.  Sometime the pollSCM working fine, sometime failing with below error 

          ERROR: [Tue Oct 03 16:47:29 UTC 2023] Could not update folder level actions from source 67f6afb9-969c-4dbd-8b22-2fe38cb24d2a [Tue Oct 03 16:47:29 UTC 2023] Finished branch indexing. Indexing took 2 min 11 sec FATAL: Failed to recompute children of TEST » XXXXX hudson.plugins.git.GitException: Command "git ls-remote --symref – git@github.com:RETISIO/XXXXX" returned status code 128: stdout: stderr: ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

          We are not sure what causing the issue. It will be grateful to us if you provide the solution to resolve this issue.

          NOTE : Jenkinsfile1 and JenkinsFile2 has same content, only difference is one is for deploy lower environment and another one is for deploy higher environment.

          Girija added a comment - Hi Elijah, This pollSCM is worked fine for single branch. But it is not working when i configured another branch. Please find the problem details below.   We have a single repo under which we have two branch, Branch A and Branch B. Both the branch have separate Jenkins file like Jenkinsfile1 and Jenkinsfile2. Both the jenkins file have triggers {             pollSCM 'H/5 * * * *'         } lines for auto build.  We created a folder Test and under it configured Multibranch Pipeline job. Auto build is working fine till we have not configured another Multibranch Pipeline job to build from Branch B inside another Test1 folder.  Sometime the pollSCM working fine, sometime failing with below error  ERROR: [Tue Oct 03 16:47:29 UTC 2023] Could not update folder level actions from source 67f6afb9-969c-4dbd-8b22-2fe38cb24d2a [Tue Oct 03 16:47:29 UTC 2023] Finished branch indexing. Indexing took 2 min 11 sec FATAL: Failed to recompute children of TEST » XXXXX hudson.plugins.git.GitException: Command "git ls-remote --symref – git@github.com:RETISIO/XXXXX" returned status code 128: stdout: stderr: ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. We are not sure what causing the issue. It will be grateful to us if you provide the solution to resolve this issue. NOTE : Jenkinsfile1 and JenkinsFile2 has same content, only difference is one is for deploy lower environment and another one is for deploy higher environment.

            Unassigned Unassigned
            girija_patra Girija
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: