java.io.IOException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When {{GitHubPushTrigger.start}} is run (generally because a job configuration was just saved), it forks a thread to update the web hooks. If there are any problems doing that, these are sent to the system log, but the person configuring the job may not know to look there (or may not even have permissions to do so). For example, I have gotten stack traces like {code:none} Failed to obtain repository com.cloudbees.jenkins.GitHubRepositoryName$1$1@... java.io.IOException: {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"} at org.kohsuke.github.Requester.handleApiError(Requester.java:427) at org.kohsuke.github.Requester._to(Requester.java:206) at org.kohsuke.github.Requester.to(Requester.java:160) at org.kohsuke.github.GitHub.getUser(GitHub.java:279) at com.cloudbees.jenkins.GitHubRepositoryName$1$1.adapt(GitHubRepositoryName.java:101) at com.cloudbees.jenkins.GitHubRepositoryName$1$1.adapt(GitHubRepositoryName.java:98) at hudson.util.AdaptedIterator.next(AdaptedIterator.java:54) at hudson.util.Iterators$FilterIterator.fetch(Iterators.java:109) at hudson.util.Iterators$FilterIterator.hasNext(Iterators.java:127) at com.cloudbees.jenkins.GitHubPushTrigger$2.run(GitHubPushTrigger.java:144) at ... Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.github.com/users/<myorg> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) at org.kohsuke.github.Requester.parse(Requester.java:383) at org.kohsuke.github.Requester._to(Requester.java:185) ... 16 more {code} and later on the same job {code:none} org.kohsuke.github.GHException: Failed to update jenkins hooks at com.cloudbees.jenkins.GitHubPushTrigger.createJenkinsHook(GitHubPushTrigger.java:164) at com.cloudbees.jenkins.GitHubPushTrigger.access$700(GitHubPushTrigger.java:46) at com.cloudbees.jenkins.GitHubPushTrigger$2.run(GitHubPushTrigger.java:146) at ... Caused by: java.io.FileNotFoundException: https://api.github.com/repos/<myorg>/<myrepo>/hooks at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) at org.kohsuke.github.Requester.parse(Requester.java:383) at org.kohsuke.github.Requester._to(Requester.java:185) at org.kohsuke.github.Requester.to(Requester.java:160) at org.kohsuke.github.GHRepository.createHook(GHRepository.java:754) at com.cloudbees.jenkins.GitHubPushTrigger.createJenkinsHook(GitHubPushTrigger.java:161) ... 10 more {code} By the time these are thrown, it is of course too late to display such errors on the configuration page for the job now, but I would suggest that form validation for the push trigger display any such errors from the _last_ save. (If you are not getting builds triggered, your natural first step would be to double-check the job configuration, where you would see this clearly.)
    via by Jesse Glick,
  • When {{GitHubPushTrigger.start}} is run (generally because a job configuration was just saved), it forks a thread to update the web hooks. If there are any problems doing that, these are sent to the system log, but the person configuring the job may not know to look there (or may not even have permissions to do so). For example, I have gotten stack traces like {code:none} Failed to obtain repository com.cloudbees.jenkins.GitHubRepositoryName$1$1@... java.io.IOException: {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"} at org.kohsuke.github.Requester.handleApiError(Requester.java:427) at org.kohsuke.github.Requester._to(Requester.java:206) at org.kohsuke.github.Requester.to(Requester.java:160) at org.kohsuke.github.GitHub.getUser(GitHub.java:279) at com.cloudbees.jenkins.GitHubRepositoryName$1$1.adapt(GitHubRepositoryName.java:101) at com.cloudbees.jenkins.GitHubRepositoryName$1$1.adapt(GitHubRepositoryName.java:98) at hudson.util.AdaptedIterator.next(AdaptedIterator.java:54) at hudson.util.Iterators$FilterIterator.fetch(Iterators.java:109) at hudson.util.Iterators$FilterIterator.hasNext(Iterators.java:127) at com.cloudbees.jenkins.GitHubPushTrigger$2.run(GitHubPushTrigger.java:144) at ... Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.github.com/users/<myorg> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) at org.kohsuke.github.Requester.parse(Requester.java:383) at org.kohsuke.github.Requester._to(Requester.java:185) ... 16 more {code} and later on the same job {code:none} org.kohsuke.github.GHException: Failed to update jenkins hooks at com.cloudbees.jenkins.GitHubPushTrigger.createJenkinsHook(GitHubPushTrigger.java:164) at com.cloudbees.jenkins.GitHubPushTrigger.access$700(GitHubPushTrigger.java:46) at com.cloudbees.jenkins.GitHubPushTrigger$2.run(GitHubPushTrigger.java:146) at ... Caused by: java.io.FileNotFoundException: https://api.github.com/repos/<myorg>/<myrepo>/hooks at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) at org.kohsuke.github.Requester.parse(Requester.java:383) at org.kohsuke.github.Requester._to(Requester.java:185) at org.kohsuke.github.Requester.to(Requester.java:160) at org.kohsuke.github.GHRepository.createHook(GHRepository.java:754) at com.cloudbees.jenkins.GitHubPushTrigger.createJenkinsHook(GitHubPushTrigger.java:161) ... 10 more {code} By the time these are thrown, it is of course too late to display such errors on the configuration page for the job now, but I would suggest that form validation for the push trigger display any such errors from the _last_ save. (If you are not getting builds triggered, your natural first step would be to double-check the job configuration, where you would see this clearly.)
    via by Jesse Glick,
  • [JIRA] [github-oauth-plugin] (JENKINS-34896) Not retrieving teams
    via by feli...@gmail.com (JIRA),
    • java.io.IOException: {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"} at org.kohsuke.github.Requester.handleApiError(Requester.java:427) at org.kohsuke.github.Requester._to(Requester.java:206) at org.kohsuke.github.Requester.to(Requester.java:160) at org.kohsuke.github.GitHub.getUser(GitHub.java:279) at com.cloudbees.jenkins.GitHubRepositoryName$1$1.adapt(GitHubRepositoryName.java:101) at com.cloudbees.jenkins.GitHubRepositoryName$1$1.adapt(GitHubRepositoryName.java:98) at hudson.util.AdaptedIterator.next(AdaptedIterator.java:54) at hudson.util.Iterators$FilterIterator.fetch(Iterators.java:109) at hudson.util.Iterators$FilterIterator.hasNext(Iterators.java:127) at com.cloudbees.jenkins.GitHubPushTrigger$2.run(GitHubPushTrigger.java:144)

    Users with the same issue

    Unknown visitor1 times, last one,