[JIRA] (JENKINS-57195) Scan organization fails with FileNotFoundException

441 views
Skip to first unread message

g.sironi@elifesciences.org (JIRA)

unread,
Apr 26, 2019, 6:24:04 AM4/26/19
to jenkinsc...@googlegroups.com
Giorgio Sironi created an issue
 
Jenkins / Bug JENKINS-57195
Scan organization fails with FileNotFoundException
Issue Type: Bug Bug
Assignee: Unassigned
Components: github-branch-source-plugin
Created: 2019-04-26 10:23
Environment: Jenkins 2.138.4
github-branch-source 2.4.5
Priority: Minor Minor
Reporter: Giorgio Sironi

When adding a private repository, /computation/console fails with:

Proposing sciencebeam-trainer-grobid
ERROR: [Fri Apr 26 11:04:07 BST 2019] Could not fetch sources from navigator org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator@2a4406b7
java.io.FileNotFoundException: https://api.github.com/repos/elifesciences/sciencebeam-trainer-grobid
	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243)
	at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
	at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
	at org.kohsuke.github.Requester.parse(Requester.java:625)
	at org.kohsuke.github.Requester.parse(Requester.java:607)
	at org.kohsuke.github.Requester._to(Requester.java:285)
Caused: org.kohsuke.github.GHFileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/repos/#get"}
	at org.kohsuke.github.Requester.handleApiError(Requester.java:699)
	at org.kohsuke.github.Requester._to(Requester.java:306)
	at org.kohsuke.github.Requester.to(Requester.java:247)
	at org.kohsuke.github.GitHub.getRepository(GitHub.java:475)
	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:880)
	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:263)
	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1368)
	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1383)
	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:254)
	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:204)
	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:986)
	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:480)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164)
	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:932)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
[Fri Apr 26 11:04:07 BST 2019] Finished organization scan. Scan took 1 min 7 sec
FATAL: Failed to recompute children of Pull Requests (projects)
org.kohsuke.github.GHFileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/repos/#get"}
	at org.kohsuke.github.Requester.handleApiError(Requester.java:699)
	at org.kohsuke.github.Requester._to(Requester.java:306)
	at org.kohsuke.github.Requester.to(Requester.java:247)
	at org.kohsuke.github.GitHub.getRepository(GitHub.java:475)
	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:880)
	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:263)
	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1368)
	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1383)
	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:254)
	at jenkins.scm.api.trait.SCMNavigatorRequest.process(SCMNavigatorRequest.java:204)
	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:986)
	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:480)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164)
	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:932)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Caused by: java.io.FileNotFoundException: https://api.github.com/repos/elifesciences/sciencebeam-trainer-grobid
	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243)
	at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
	at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
	at org.kohsuke.github.Requester.parse(Requester.java:625)
	at org.kohsuke.github.Requester.parse(Requester.java:607)
	at org.kohsuke.github.Requester._to(Requester.java:285)
	... 17 more
Finished: FAILURE 

despite the credentials being allowed to access this repository, with `Write` permission level. Has been difficult to reproduce as after a while it disappears and the scan starts working.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

bitwiseman@gmail.com (JIRA)

unread,
Apr 29, 2019, 3:40:02 PM4/29/19
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Apr 29, 2019, 4:09:01 PM4/29/19
to jenkinsc...@googlegroups.com
Liam Newman commented on Bug JENKINS-57195
 
Re: Scan organization fails with FileNotFoundException

Giorgio Sironi
I suspect this only happens on older PRs that haven't been updated in a while.
Once those PRs are either updated with a new commit or simply closed and reopened, the issue will go away, which aligns with what you describe.
Thank you for the issue report. I will take a look and see what can be done to mitigate it in the future.

bitwiseman@gmail.com (JIRA)

unread,
Apr 29, 2019, 7:14:02 PM4/29/19
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
 
Change By: Liam Newman
Comment: [~giorgiosironi]

I suspect this only happens on older PRs that haven't been updated in a while.  
Once those PRs are either updated with a new commit or simply closed and reopened, the issue will go away, which aligns with what you describe.  
Thank you for the issue report.  I will take a look and see what can be done to mitigate it in the future.

sysadmin@silverorange.com (JIRA)

unread,
Apr 30, 2019, 9:14:02 AM4/30/19
to jenkinsc...@googlegroups.com
Sys Admin edited a comment on Bug JENKINS-57195
 
Re: Scan organization fails with FileNotFoundException
I have a similar but different issue that could possible be related to the same problem.  

 

I have been experiencing problems with my pipline after updating the "GitHub Branch Source" plugin from 2.4.5 to 2.5.0. I'm running the latest Jenkins with all plugins updated. After updating my pipeline is immediately failing with the following error. As soon as I roll the plugin back to 2.4.5 the tests
being begin passing again. Some have suggested to close and re-open the PR. I tried another test this morning, first I updated the plugin then I pushed up a completely new PR, it failed immediately. I then rolled the GitHub Branch Source plugin back to 2.4.5 and the pipeline completed successfully.

 

The full trace:
 
 
Pull request #12 opened

Connecting to
[ https://api.github.com |https://api.github.com/] using xxxxxxxx/****** (xxxxxxxxx Github Personal Access Token)

GitHub has been notified of this commit’s build result

java.io.FileNotFoundException:
[ https://api.github.com/repos/xxxxxxx/xxxxx/commits/xxxxxxxxxxxxx1db43d9ee079016f549a11a0 ]
at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243)
at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
at org.kohsuke.github.Requester.parse(Requester.java:625)
at org.kohsuke.github.Requester.parse(Requester.java:607)
at org.kohsuke.github.Requester._to(Requester.java:285)
Caused: org.kohsuke.github.GHFileNotFoundException: \{"message":"No commit found for SHA: xxxxxxxxxxxxxxxxdb43d9ee079016f549a11a0","documentation_url":"https://developer.github.com/v3/repos/commits/#get-a-single-commit"}

at org.kohsuke.github.Requester.handleApiError(Requester.java:699)
at org.kohsuke.github.Requester._to(Requester.java:306)
at org.kohsuke.github.Requester.to(Requester.java:247)
at org.kohsuke.github.GHRepository.getCommit(GHRepository.java:973)
at org.jenkinsci.plugins.github_branch_source.PullRequestSCMRevision.validateMergeHash(PullRequestSCMRevision.java:118)
at org.jenkinsci.plugins.github_branch_source.GitHubSCMFileSystem.<init>(GitHubSCMFileSystem.java:91)
at org.jenkinsci.plugins.github_branch_source.GitHubSCMFileSystem$BuilderImpl.build(GitHubSCMFileSystem.java:296)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:294)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:103)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293)

at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)

Finished: FAILURE

 

sysadmin@silverorange.com (JIRA)

unread,
Apr 30, 2019, 9:14:02 AM4/30/19
to jenkinsc...@googlegroups.com

I have a similar but different issue that could possible be related to the same problem.  

 

I have been experiencing problems with my pipline after updating the "GitHub Branch Source" plugin from 2.4.5 to 2.5.0. I'm running the latest Jenkins with all plugins updated. After updating my pipeline is immediately failing with the following error. As soon as I roll the plugin back to 2.4.5 the tests being passing again. Some have suggested to close and re-open the PR. I tried another test this morning, first I updated the plugin then I pushed up a completely new PR, it failed immediately. I then rolled the GitHub Branch Source plugin back to 2.4.5 and the pipeline completed successfully.

 

The full trace:
 
 
Pull request #12 opened

Connecting to https://api.github.com using xxxxxxxx/****** (xxxxxxxxx Github Personal Access Token)

sysadmin@silverorange.com (JIRA)

unread,
Apr 30, 2019, 10:04:02 AM4/30/19
to jenkinsc...@googlegroups.com
Sys Admin updated an issue
 
Change By: Sys Admin
Comment:
I have a similar but different issue that could possible be related to the same problem.  

 

I have been experiencing problems with my pipline after updating the "GitHub Branch Source" plugin from 2.4.5 to 2.5.0. I'm running the latest Jenkins with all plugins updated. After updating my pipeline is immediately failing with the following error. As soon as I roll the plugin back to 2.4.5 the tests begin passing again. Some have suggested to close and re-open the PR. I tried another test this morning, first I updated the plugin then I pushed up a completely new PR, it failed immediately. I then rolled the GitHub Branch Source plugin back to 2.4.5 and the pipeline completed successfully.


 

The full trace:
 
 
Pull request #12 opened

Connecting to [https://api.github.com|https://api.github.com/] using xxxxxxxx/****** (xxxxxxxxx Github Personal Access Token)

bitwiseman@gmail.com (JIRA)

unread,
May 1, 2019, 12:56:02 PM5/1/19
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
May 1, 2019, 12:56:03 PM5/1/19
to jenkinsc...@googlegroups.com
Liam Newman started work on Bug JENKINS-57195
 
Change By: Liam Newman
Status: Open In Progress

bitwiseman@gmail.com (JIRA)

unread,
May 1, 2019, 12:57:02 PM5/1/19
to jenkinsc...@googlegroups.com
Liam Newman stopped work on Bug JENKINS-57195
 
Change By: Liam Newman
Status: In Progress Open

bitwiseman@gmail.com (JIRA)

unread,
May 1, 2019, 12:57:02 PM5/1/19
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
May 3, 2019, 7:48:02 PM5/3/19
to jenkinsc...@googlegroups.com
Liam Newman commented on Bug JENKINS-57195
 
Re: Scan organization fails with FileNotFoundException

This sound like some kind of condition where permissions haven't caught up with your settings. Do you get it each time you create a new private repo?

bitwiseman@gmail.com (JIRA)

unread,
May 6, 2019, 2:45:02 PM5/6/19
to jenkinsc...@googlegroups.com
Liam Newman edited a comment on Bug JENKINS-57195
[~giorgiosironi]
This sound like some kind of condition where permissions haven't caught up with your settings.  Do you get it each time you create a new private repo?

g.sironi@elifesciences.org (JIRA)

unread,
May 7, 2019, 4:03:03 AM5/7/19
to jenkinsc...@googlegroups.com

It wasn't deterministic as I've seen the correct behavior happening with some private repos too. If I had some pointers on which logs to look at or turn on, I could create sample repos to try to collect more information on the error (assuming it would reproduce).

 

bitwiseman@gmail.com (JIRA)

unread,
May 9, 2019, 4:27:03 PM5/9/19
to jenkinsc...@googlegroups.com

java.io.FileNotFoundException: https://api.github.com/repos/elifesciences/sciencebeam-trainer-grobid

If you can, when you see this error immedately try that URL (with credentials such as API key) we could check that url is actually available.

bitwiseman@gmail.com (JIRA)

unread,
May 9, 2019, 4:40:02 PM5/9/19
to jenkinsc...@googlegroups.com
Liam Newman edited a comment on Bug JENKINS-57195


If you can, when you see this error immedately try that URL (with credentials such as API key) we could check that url is actually available.
     

also when you see this you might try clearing the Jenkin network cache as suggested here:
https://issues.jenkins-ci.org/browse/JENKINS-54126?focusedCommentId=352154&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-352154
Note that you'll need to delete a different folder name specific to this error instead of the one there, not sure which one.

If you are willing to experiment a little, you could try the okhttp3 version of the plugin (also mentioned in that issue) to see if that makes this problem go away.

bitwiseman@gmail.com (JIRA)

unread,
Feb 10, 2020, 7:45:02 PM2/10/20
to jenkinsc...@googlegroups.com

Giorgio Sironi
Please try this with github-branch-source 2.6.0

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ryan_mccorry@live.co.uk (JIRA)

unread,
Feb 26, 2020, 6:31:06 AM2/26/20
to jenkinsc...@googlegroups.com

Had the same issue, confirmed working when updated to github-branch-source 2.6.0, thanks Liam!

bitwiseman@gmail.com (JIRA)

unread,
May 5, 2020, 7:22:02 PM5/5/20
to jenkinsc...@googlegroups.com
Change By: Liam Newman
Status: Fixed but Unreleased Closed
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

bitwiseman@gmail.com (JIRA)

unread,
May 5, 2020, 7:22:03 PM5/5/20
to jenkinsc...@googlegroups.com
Change By: Liam Newman
Status: Open Fixed but Unreleased
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages